Skip to content

Commit

Permalink
chore: specify arch
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason I committed Apr 29, 2024
1 parent d436e82 commit 60903bf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/provision-darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/provision-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/update-dfx-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 60903bf

Please sign in to comment.