Skip to content

Commit

Permalink
Try installing the big wasm at once
Browse files Browse the repository at this point in the history
  • Loading branch information
dskloetd committed Oct 1, 2024
1 parent 4528049 commit a0bc401
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/deploy-to-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@ jobs:
jq 'del(.canisters[env.CANISTER_NAME].remote.id[env.DFX_NETWORK])' dfx.json | sponge dfx.json
DFX_NETWORK="$DFX_NETWORK" jq 'del(.canisters.internet_identity.remote.id[env.DFX_NETWORK])' dfx.json | sponge dfx.json
dfx-canister set-id --network "$DFX_NETWORK" --canister_name "$CANISTER_NAME" --canister_id "$SNS_AGGREGATOR_APP_SUBNET_CANISTER_ID"
- name: Do dfx commands
run: |
set -x
dfx canister status nns-dapp --network "$DFX_NETWORK"
dfx canister update-settings nns-dapp --compute-allocation 0 --network "$DFX_NETWORK"
dfx canister status nns-dapp --network "$DFX_NETWORK"
dfx canister update-settings nns-dapp --freezing-threshold 2592000 --network "$DFX_NETWORK"
dfx canister status nns-dapp --network "$DFX_NETWORK"
false
- name: Build wasms and config
uses: ./.github/actions/build_nns_dapp # Builds sns_aggregator as well.
with:
Expand All @@ -104,6 +95,11 @@ jobs:
dfx canister status --network app "$canister"
set +x
done
- name: Set compute allocation of nns-dapp
run: |
set -x
dfx canister update-settings nns-dapp --freezing-threshold 10000 --network "$DFX_NETWORK"
dfx canister update-settings sns_aggregator --compute-allocation 1 --network "$DFX_NETWORK"
- name: Deploy nns-dapp
if: (inputs.canisters == 'all') || (inputs.canisters == 'nns-dapp') || ( github.event_name != 'workflow_dispatch' )
run: |
Expand All @@ -120,6 +116,11 @@ jobs:
--mode "${{ inputs.mode || 'upgrade' }}" \
--wasm "out/nns-dapp_noassets.wasm.gz" \
--argument_file "out/nns-dapp-arg-${DFX_NETWORK}.did"
- name: Restore compute allocation of nns-dapp
if: always()
run: |
set -x
dfx canister update-settings nns-dapp --compute-allocation 0 --network "$DFX_NETWORK"
dfx canister update-settings nns-dapp --freezing-threshold 2592000 --network "$DFX_NETWORK"
- name: Deploy sns_aggregator
if: (inputs.canisters == 'all') || (inputs.canisters == 'sns_aggregator') || ( github.event_name != 'workflow_dispatch' )
Expand Down
6 changes: 5 additions & 1 deletion scripts/nns-dapp/deploy-in-chunks
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ ARGUMENT="$(cat "$ARGUMENT_FILE")"
# before and after every step to miss as little as possible.
dfx canister logs --network "$DFX_NETWORK" "$CANISTER_NAME"

dfx canister install --mode "$DFX_MODE" --yes --network "$DFX_NETWORK" "$CANISTER_NAME" --argument "$ARGUMENT" --wasm "$WASM"
#dfx canister install --mode "$DFX_MODE" --yes --network "$DFX_NETWORK" "$CANISTER_NAME" --argument "$ARGUMENT" --wasm "$WASM"
dfx canister install --mode "$DFX_MODE" --yes --network "$DFX_NETWORK" "$CANISTER_NAME" --argument "$ARGUMENT" --wasm "out/nns-dapp.wasm.gz"

dfx canister logs --network "$DFX_NETWORK" "$CANISTER_NAME"

exit 0

./scripts/nns-dapp/upload-asset-tarball --network "$DFX_NETWORK" --chunk out/chunks/assets.xaa.tar.xz

dfx canister logs --network "$DFX_NETWORK" "$CANISTER_NAME"
Expand Down

0 comments on commit a0bc401

Please sign in to comment.