chore: switch to ic-btc-kyt canister (#427) #1536
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run non-interactive demo | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
GH_TOKEN: ${{ github.token }} | |
jobs: | |
# readme: | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# os: [ macos-14, ubuntu-22.04 ] | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# - name: Run the README code parts | |
# run: bin/test-readme | |
demo_current: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-14, ubuntu-22.04] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Add user path | |
run: | | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
echo "$PWD/bin" >> $GITHUB_PATH | |
- name: Unbork mac | |
if: matrix.os == 'macos-14' | |
run: | | |
brew install bash | |
echo "/usr/local/bin" >> $GITHUB_PATH | |
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
- name: Install dependencies | |
run: ./bin/dfx-sns-demo-install --verbose | |
- name: Run the demo with the current default ic commits | |
run: bin/dfx-sns-demo --config_index 0 | |
- name: Create and finalize an additional SNS | |
run: | | |
./bin/dfx-sns-demo-mksns --config_index 1 | |
./bin/dfx-sns-sale-buy | |
./bin/dfx-sns-sale-finalize | |
- name: Create lots of SNS | |
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-14' | |
run: | | |
# Stop the replica to let it persist all its state before we save the state. | |
dfx stop | |
echo "Waiting for replica to stop" | |
for (( i=100; i>0; i-- )); do | |
echo "$i" | |
pgrep replica || break | |
sleep 1 | |
done | |
echo "Making sure the replica is dead" | |
./bin/dfx-network-stop | |
sleep 1 | |
echo "Saving state" | |
bin/dfx-snapshot-save --verbose --snapshot state.tar.xz | |
- name: Upload state | |
if: matrix.os != 'macos-14' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: snsdemo | |
path: state.tar.xz | |
retention-days: 3 | |
demo_latest: | |
if: true # Claim that snsdemo works with the latest IC repo commit (true) or acknowledge that it doesn't (false). | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-14, ubuntu-22.04] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Add user path | |
run: | | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
echo "$PWD/bin" >> $GITHUB_PATH | |
- name: Unbork mac | |
if: matrix.os == 'macos-14' | |
run: | | |
brew install bash | |
echo "/usr/local/bin" >> $GITHUB_PATH | |
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
- name: Install dependencies | |
run: ./bin/dfx-sns-demo-install --verbose | |
# Clone the ic repo so that we can find the latest published commit. | |
- name: Checkout ic repo | |
uses: actions/checkout@v3 | |
with: | |
repository: dfinity/ic | |
ref: master | |
fetch-depth: 100 | |
path: ic | |
- name: Run the demo with the latest repo | |
run: bin/dfx-sns-demo --ic_commit latest --ic_dir ic --config_index 0 | |
- name: Create and finalize an additional SNS | |
run: | | |
./bin/dfx-sns-demo-mksns --config_index 1 | |
./bin/dfx-sns-sale-buy | |
./bin/dfx-sns-sale-finalize | |
- name: Create lots of SNS | |
if: matrix.os != 'macos-14' | |
run: | | |
./bin/dfx-sns-demo-mksns-parallel -s 10 --config_index_offset 2 -m snsdemo8 |