Skip to content

Commit

Permalink
Merge pull request #2838 from antmicro/umarcor/latest/compat
Browse files Browse the repository at this point in the history
ci: update deprecated 'latest' for backwards compatibility
  • Loading branch information
kgugala authored Aug 5, 2022
2 parents ee6c747 + ad98b96 commit 635a2ac
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
15 changes: 4 additions & 11 deletions .github/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,11 @@ esac
export CMAKE_FLAGS="-GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DINSTALL_FAMILIES=${INSTALL_FAMILIES}"

echo "Set environment variables for F4PGA CLI utils"
export F4PGA_INSTALL_DIR="placeholder"
# TODO: We should place the content in subdir F4PGA_FAM, to use the default in f4pga instead of overriding F4PGA_ENV_SHARE here.
case "$FPGA_FAM" in
xc7)
export F4PGA_INSTALL_DIR="placeholder"
export F4PGA_BIN_DIR="$(cd $(dirname "$0"); pwd)/../../env/conda/envs/symbiflow_arch_def_base/bin"
# TODO: We should place the content in subdir F4PGA_FAM, to use the default in f4pga instead of overriding F4PGA_ENV_SHARE here.
export F4PGA_SHARE_DIR="$(cd $(dirname "$0"); pwd)/../../install/share/f4pga"
;;
eos-s3)
export F4PGA_INSTALL_DIR="placeholder"
export F4PGA_SHARE_DIR="${INSTALL_DIR}"/share/f4pga
export F4PGA_BIN_DIR="${INSTALL_DIR}"/bin/
;;
xc7) export F4PGA_SHARE_DIR="$(cd $(dirname "$0"); pwd)/../../install/share/f4pga" ;;
eos-s3) export F4PGA_SHARE_DIR="${INSTALL_DIR}"/share/f4pga ;;
esac

source $(dirname "$0")/setup-and-activate.sh
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/Automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ jobs:
DO_UPLOAD = '${{ github.event_name == 'push' && github.ref_name == 'main' }}' == 'true'
print(f'> TIMESTAMP: {TIMESTAMP}')
PACKAGE_RE = re_compile("symbiflow-arch-defs-([a-zA-Z0-9_-]+)-([a-z0-9])")
def write_latest(package_name, timestamp, artifact):
with (Path("install") / f"symbiflow-{package_name}-latest").open("w") as wptr:
wptr.write(
'https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/'
f'symbiflow-arch-defs/continuous/install/{TIMESTAMP}/{artifact}'
)
with (Path(__file__).parent.parent.parent / 'packages.list').open('r') as rptr:
for artifact in rptr.read().splitlines():
if DO_UPLOAD:
Expand All @@ -81,13 +89,12 @@ jobs:
m = PACKAGE_RE.match(artifact)
assert m, f"Package name not recognized! {artifact}"
package_name = m.group(1)
if package_name == "install":
package_name = "toolchain"
with (Path("install") / f"symbiflow-{package_name}-latest").open("w") as wptr:
wptr.write(
'https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/'
f'symbiflow-arch-defs/continuous/install/{TIMESTAMP}/{artifact}'
)
write_latest(package_name, TIMESTAMP, artifact)
if package_name == 'install-xc7':
write_latest('toolchain', TIMESTAMP, artifact)
if package_name == 'benchmarks-xc7':
write_latest('benchmarks', TIMESTAMP, artifact)
if DO_UPLOAD:
run('gsutil -m rsync $* -r install gs://${{ secrets.GCP_STORAGE_BUCKET }}/', shell=True, check=False)
EOF
Expand Down

0 comments on commit 635a2ac

Please sign in to comment.