Skip to content

Commit

Permalink
Merge branch 'main' into bot-ic-update
Browse files Browse the repository at this point in the history
  • Loading branch information
dskloetd authored Nov 4, 2024
2 parents da50bbf + 80c1f4f commit e52413f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# strategy:
# fail-fast: false
# matrix:
# os: [ macos-12, ubuntu-22.04 ]
# os: [ macos-14, ubuntu-22.04 ]
# steps:
# - name: Checkout
# uses: actions/checkout@v3
Expand All @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-22.04]
os: [macos-14, ubuntu-22.04]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -32,7 +32,7 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$PWD/bin" >> $GITHUB_PATH
- name: Unbork mac
if: matrix.os == 'macos-12'
if: matrix.os == 'macos-14'
run: |
brew install bash
echo "/usr/local/bin" >> $GITHUB_PATH
Expand All @@ -49,11 +49,11 @@ jobs:
./bin/dfx-sns-sale-buy
./bin/dfx-sns-sale-finalize
- name: Create lots of SNS
if: matrix.os != 'macos-12'
if: matrix.os != 'macos-14'
run: |
./bin/dfx-sns-demo-mksns-parallel -s 10 --config_index_offset 2 -m snsdemo8
- name: Save state
if: matrix.os != 'macos-12'
if: matrix.os != 'macos-14'
run: |
# Stop the replica to let it persist all its state before we save the state.
dfx stop
Expand All @@ -69,7 +69,7 @@ jobs:
echo "Saving state"
bin/dfx-snapshot-save --verbose --snapshot state.tar.xz
- name: Upload state
if: matrix.os != 'macos-12'
if: matrix.os != 'macos-14'
uses: actions/upload-artifact@v3
with:
name: snsdemo
Expand All @@ -81,7 +81,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-22.04]
os: [macos-14, ubuntu-22.04]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -90,7 +90,7 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$PWD/bin" >> $GITHUB_PATH
- name: Unbork mac
if: matrix.os == 'macos-12'
if: matrix.os == 'macos-14'
run: |
brew install bash
echo "/usr/local/bin" >> $GITHUB_PATH
Expand All @@ -115,6 +115,6 @@ jobs:
./bin/dfx-sns-sale-buy
./bin/dfx-sns-sale-finalize
- name: Create lots of SNS
if: matrix.os != 'macos-12'
if: matrix.os != 'macos-14'
run: |
./bin/dfx-sns-demo-mksns-parallel -s 10 --config_index_offset 2 -m snsdemo8
6 changes: 5 additions & 1 deletion bin/dfx-sns-demo-mksns-parallel
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@ create_all_sns() {
PROCESSES=()
echo "I am $$"
for ((i = 0; i < NUM_SNS_TO_MAKE; i++)); do
# Creating wallet canisters in parallel started occasionally failing with
# 0.24.1. When creating 10 in parallel, almost always at least 1 would fail.
# So we create the users outside the background process.
DEMO_USER="snsdemo_$i"
make_user "$DEMO_USER"
(
echo "Starting $BASHPID"
DEMO_USER="snsdemo_$i"
make_user "$DEMO_USER"
become_user "$DEMO_USER"

./bin/dfx-sns-demo-mksns-config --config_index $((CONFIG_INDEX_OFFSET + i)) --unique_logo "$UNIQUE_LOGO"
Expand Down
7 changes: 7 additions & 0 deletions bin/dfx-stock-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ if [ "${PARALLEL_SNS_COUNT:-0}" -gt 0 ]; then
dfx-sns-demo-mksns-parallel --network "$DFX_NETWORK" --num_sns "$PARALLEL_SNS_COUNT" --majority snsdemo8 --config_index_offset 2 --unique_logo "$UNIQUE_LOGO"
fi

SNS_COUNT="$(dfx canister call nns-sns-wasm list_deployed_snses '(record{})' | idl2json | jq -r '.instances | length')"
EXPECTED_SNS_COUNT="$((2 + PARALLEL_SNS_COUNT))"
if [[ "$SNS_COUNT" != "$EXPECTED_SNS_COUNT" ]]; then
echo "❌ Expected $EXPECTED_SNS_COUNT SNSes. Found $SNS_COUNT"
exit 1
fi

: Set up ckbtc canisters
dfx-ckbtc-import --prefix ckbtc_
dfx-ckbtc-deploy --prefix ckbtc_ --network "$DFX_NETWORK" --yes
Expand Down

0 comments on commit e52413f

Please sign in to comment.