From 60903bf3454d923f71805ee700d8980f4c378621 Mon Sep 17 00:00:00 2001 From: Jason I Date: Mon, 29 Apr 2024 09:46:18 -0700 Subject: [PATCH] chore: specify arch --- .github/workflows/provision-darwin.sh | 1 + .github/workflows/provision-linux.sh | 1 + .github/workflows/update-dfx-cache.sh | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/provision-darwin.sh b/.github/workflows/provision-darwin.sh index 5d93df948..c0a00c459 100755 --- a/.github/workflows/provision-darwin.sh +++ b/.github/workflows/provision-darwin.sh @@ -29,6 +29,7 @@ dfx cache install if [ -f "${GITHUB_WORKSPACE}/.ic-commit" ]; then stable_sha=$(curl https://raw.githubusercontent.com/dfinity/examples/master/.ic-commit) current_sha=$(sed <"$GITHUB_WORKSPACE/.ic-commit" 's/#.*$//' | sed '/^$/d') + arch="x86_64-darwin" if [ "$current_sha" != "$stable_sha" ]; then sh "$GITHUB_WORKSPACE/.github/workflows/update-dfx-cache.sh" fi diff --git a/.github/workflows/provision-linux.sh b/.github/workflows/provision-linux.sh index c39372723..f9cf23e60 100755 --- a/.github/workflows/provision-linux.sh +++ b/.github/workflows/provision-linux.sh @@ -23,6 +23,7 @@ dfx cache install if [ -f "${GITHUB_WORKSPACE}/.ic-commit" ]; then stable_sha=$(curl https://raw.githubusercontent.com/dfinity/examples/master/.ic-commit) current_sha=$(sed <"$GITHUB_WORKSPACE/.ic-commit" 's/#.*$//' | sed '/^$/d') + arch="x86_64-linux" if [ "$current_sha" != "$stable_sha" ]; then sh "$GITHUB_WORKSPACE/.github/workflows/update-dfx-cache.sh" fi diff --git a/.github/workflows/update-dfx-cache.sh b/.github/workflows/update-dfx-cache.sh index 79cd65b02..08c1af636 100755 --- a/.github/workflows/update-dfx-cache.sh +++ b/.github/workflows/update-dfx-cache.sh @@ -3,20 +3,20 @@ current_sha=$(sed <"$GITHUB_WORKSPACE/.ic-commit" 's/#.*$//' | sed '/^$/d') # Download latest ic artifacts -curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/replica.gz" -curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/canister_sandbox.gz" -curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-admin.gz" -curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-btc-adapter.gz" -curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-https-outcalls-adapter.gz" -curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-nns-init.gz" -curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/ic-starter.gz" -curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/sandbox_launcher.gz" -curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/x86_64-linux/sns.gz" +curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/$arch/replica.gz" +curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/$arch/canister_sandbox.gz" +curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/$arch/ic-admin.gz" +curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/$arch/ic-btc-adapter.gz" +curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/$arch/ic-https-outcalls-adapter.gz" +curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/$arch/ic-nns-init.gz" +curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/$arch/ic-starter.gz" +curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/$arch/sandbox_launcher.gz" +curl -O "https://download.dfinity.systems/ic/$current_sha/binaries/$arch/sns.gz" # Overwrite artifacts in dfx cache -sudo gzip -d replica.gz && sudo chmod +x replica && sudo mv replica $(dfx cache show) -sudo gzip -d canister_sandbox.gz && sudo chmod +x canister_sandbox && sudo mv canister_sandbox $(dfx cache show) -sudo gzip -d ic-starter.gz && sudo chmod +x ic-starter && sudo mv ic-starter $(dfx cache show) +gzip -d replica.gz && chmod +x replica && mv replica $(dfx cache show) +gzip -d canister_sandbox.gz && chmod +x canister_sandbox && mv canister_sandbox $(dfx cache show) +gzip -d ic-starter.gz && chmod +x ic-starter && mv ic-starter $(dfx cache show) #gzip -d sandbox_launcher.gz && chmod +x sandbox_launcher && mv sandbox_launcher $(dfx cache show) #gzip -d ic-admin.gz && chmod +x ic-admin && mv ic-admin $(dfx cache show) #gzip -d ic-btc-adapter.gz && chmod +x ic-btc-adapter && mv ic-btc-adapter $(dfx cache show)