From 668986025322c153480cfcbf2d1b11f8763f30fe Mon Sep 17 00:00:00 2001 From: Jason I Date: Wed, 24 Apr 2024 15:26:14 -0700 Subject: [PATCH] chore: add new workflow to download latest ic and test examples --- .../check-interface-spec-compatibility.yml | 88 +++++++++++++++++++ .../hosting-photo-storage-example.test.sh | 9 ++ .../hosting-photo-storage-example.yml | 20 +---- .../hosting-static-website-example.yaml | 1 + .../hosting-unity-webgl-example.yaml | 1 + .../motoko-actor_reference-example.yaml | 1 + .github/workflows/motoko-basic-bitcoin.yaml | 1 + .../workflows/motoko-basic-dao-example.yml | 1 + .github/workflows/motoko-calc-example.yaml | 1 + .../workflows/motoko-cert_var-example.yaml | 1 + .github/workflows/motoko-classes-example.yaml | 1 + .../motoko-composite-query-example.yaml | 1 + .github/workflows/motoko-counter-example.yaml | 1 + .github/workflows/motoko-defi-example.yml | 1 + .github/workflows/motoko-dip721-example.yml | 1 + .github/workflows/motoko-echo-example.yaml | 1 + .../motoko-encrypted-notes-example.yml | 1 + .../motoko-encrypted-notes-vetkd-example.yml | 1 + .../workflows/motoko-factorial-example.yaml | 1 + .github/workflows/motoko-hello-example.yml | 1 + .../workflows/motoko-hello-world-example.yaml | 1 + .../motoko-hello_cycles-example.yaml | 1 + .../motoko-http_counter-example.yaml | 1 + .../workflows/motoko-icp-transfer-example.yml | 1 + .../workflows/motoko-icrc2-swap-example.yml | 1 + ...internet-identity-integration-example.yaml | 1 + .github/workflows/motoko-invoice-e2e.yaml | 1 + .github/workflows/motoko-invoice-unit.yaml | 1 + .../motoko-ios-notifications-example.yml | 1 + .github/workflows/motoko-life-example.yaml | 1 + .../motoko-minimal-counter-dapp-example.yaml | 1 + .../motoko-persistent-storage-example.yaml | 1 + .../workflows/motoko-phone-book-example.yaml | 1 + .github/workflows/motoko-pub-sub-example.yaml | 1 + .../workflows/motoko-quicksort-example.yaml | 1 + .../workflows/motoko-random_maze-example.yaml | 1 + .../motoko-send-http-get-example.yml | 1 + .../motoko-send-http-post-example.yml | 1 + .../motoko-simple-to-do-example.yaml | 1 + .../workflows/motoko-superheroes-example.yaml | 1 + .../motoko-threshold-ecdsa-example.yaml | 1 + .../motoko-token-transfer-example.yml | 1 + .../motoko-token-transfer-from-example.yml | 1 + .github/workflows/motoko-vetkd-example.yml | 1 + .github/workflows/motoko-whoami-example.yaml | 1 + .github/workflows/provision-linux.sh | 6 +- .../workflows/rust-basic-bitcoin-example.yml | 1 + .github/workflows/rust-basic-dao-example.yml | 1 + .../workflows/rust-canister-info-example.yml | 1 + .../rust-composite_query-example.yml | 1 + .github/workflows/rust-counter-example.yml | 1 + .github/workflows/rust-defi-example.yml | 1 + .github/workflows/rust-dip721-example.yml | 1 + .../rust-encrypted-notes-example.yml | 1 + .../rust-encrypted-notes-vetkd-example.yml | 1 + .github/workflows/rust-hello-example.yml | 1 + .../workflows/rust-icp-transfer-example.yml | 1 + .github/workflows/rust-nft-wallet-example.yml | 1 + .../rust-performance_counters-example.yaml | 1 + .../rust-periodic_tasks-example.yaml | 1 + .github/workflows/rust-pub-sub-example.yml | 1 + .github/workflows/rust-qrcode-example.yaml | 1 + .../workflows/rust-send-http-get-example.yml | 1 + .../workflows/rust-send-http-post-example.yml | 1 + .../rust-threshold-ecdsa-example.yml | 1 + .../workflows/rust-token-transfer-example.yml | 1 + .../rust-token-transfer-from-example.yml | 1 + .github/workflows/rust-vetkd-example.yml | 1 + 68 files changed, 170 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/check-interface-spec-compatibility.yml create mode 100755 .github/workflows/hosting-photo-storage-example.test.sh diff --git a/.github/workflows/check-interface-spec-compatibility.yml b/.github/workflows/check-interface-spec-compatibility.yml new file mode 100644 index 000000000..b14da5069 --- /dev/null +++ b/.github/workflows/check-interface-spec-compatibility.yml @@ -0,0 +1,88 @@ +# A GitHub Actions workflow that regularly installs the latest replica and builds/deploys all examples +name: Check Examples Compatibility with Latest IC SHA + +on: + # TODO: remove `push` trigger; this is only for testing + push: + schedule: + # run the test suite every monday + - cron: '0 0 * * MON' + +jobs: + build-and-deploy-examples-against-latest-ic-sha-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # First, check if there is a newer version and update the artifacts referencing the version + - name: Check new ic version + id: update + run: | + # Not all ic commits are built and released, so we go through the last commits until we found one + # which has associated artefacts + while read -r sha + do + echo "sha: $sha" + # Send a HEAD to the URL to see if it exists + if curl --fail --head --silent --location \ + "https://download.dfinity.systems/ic/$sha/binaries/x86_64-linux/replica.gz" + then + echo "$sha appears to have associated binary, using" + latest_sha="$sha" + break + else + echo "$sha does not seem to have associated binary" + fi + done < <(curl \ + -SsL \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/dfinity/ic/commits | jq -cMr '.[] | .sha') + + # If we couldn't find any sha with associated artefacts, abort + if [ -z "${latest_sha:-}" ] + then + echo no sha found + exit 1 + fi + + - name: Download latest ic artifacts + run: | + curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/replica.gz" + curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/canister_sandbox.gz" + curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-admin.gz" + curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-btc-adapter.gz" + curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-https-outcalls-adapter.gz" + curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-nns-init.gz" + curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/ic-starter.gz" + curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/sandbox_launcher.gz" + curl -O "https://download.dfinity.systems/ic/$latest_sha/binaries/x86_64-linux/sns.gz" + + - name: Overwrite artifacts in dfx cache + run: | + gzip -d replica.gz + mv replica $(dfx cache show) + gzip -d canister_sandbox.gz + mv canister_sandbox $(dfx cache show) + gzip -d ic-admin.gz + mv ic-admin $(dfx cache show) + gzip -d ic-btc-adapter.gz + mv ic-btc-adapter $(dfx cache show) + gzip -d ic-https-outcalls-adapter.gz + mv ic-https-outcalls-adapter $(dfx cache show) + gzip -d ic-nns-init.gz + mv ic-nns-init $(dfx cache show) + gzip -d ic-starter.gz + mv ic-starter $(dfx cache show) + gzip -d sandbox_launcher.gz + mv sandbox_launcher $(dfx cache show) + gzip -d sns.gz + mv sns $(dfx cache show) + + - name: Skip cache install + run: | + export "skip_dfx_cache_install=1" + + - name: Build and deploy all examples + run: | + .github/workflows/hosting-photo-storage-example.test.sh \ No newline at end of file diff --git a/.github/workflows/hosting-photo-storage-example.test.sh b/.github/workflows/hosting-photo-storage-example.test.sh new file mode 100755 index 000000000..5541ce627 --- /dev/null +++ b/.github/workflows/hosting-photo-storage-example.test.sh @@ -0,0 +1,9 @@ +#!/bin/bash +pushd hosting/photo-storage +# verify frontend deps install and build +npm install +npm run build +# verify that frontend asset canister deploys +dfx start --background +dfx deploy +popd \ No newline at end of file diff --git a/.github/workflows/hosting-photo-storage-example.yml b/.github/workflows/hosting-photo-storage-example.yml index 8bd933b96..471bb5aad 100644 --- a/.github/workflows/hosting-photo-storage-example.yml +++ b/.github/workflows/hosting-photo-storage-example.yml @@ -1,5 +1,7 @@ name: hosting-photo-storage on: + workflow_dispatch: + workflow_call: push: branches: - master @@ -21,14 +23,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Hosting Photo Storage Darwin run: | - pushd hosting/photo-storage - # verify frontend deps install and build - npm install - npm run build - # verify that frontend asset canister deploys - dfx start --background - dfx deploy - popd + .github/workflows/hosting-photo-storage-example.test.sh hosting-photo-storage-linux: runs-on: ubuntu-20.04 steps: @@ -37,11 +32,4 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Hosting Photo Storage Linux run: | - pushd hosting/photo-storage - # verify frontend deps install and build - npm install - npm run build - # verify that frontend asset canister deploys - dfx start --background - dfx deploy - popd + .github/workflows/hosting-photo-storage-example.test.sh diff --git a/.github/workflows/hosting-static-website-example.yaml b/.github/workflows/hosting-static-website-example.yaml index c9d3a0631..bd0bb0b5a 100644 --- a/.github/workflows/hosting-static-website-example.yaml +++ b/.github/workflows/hosting-static-website-example.yaml @@ -1,5 +1,6 @@ name: hosting-static-website on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/hosting-unity-webgl-example.yaml b/.github/workflows/hosting-unity-webgl-example.yaml index 769b8d53f..d87fba788 100644 --- a/.github/workflows/hosting-unity-webgl-example.yaml +++ b/.github/workflows/hosting-unity-webgl-example.yaml @@ -1,5 +1,6 @@ name: hosting-unity-webgl on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-actor_reference-example.yaml b/.github/workflows/motoko-actor_reference-example.yaml index dc9426e7c..7b669bcfe 100644 --- a/.github/workflows/motoko-actor_reference-example.yaml +++ b/.github/workflows/motoko-actor_reference-example.yaml @@ -1,5 +1,6 @@ name: motoko-actor-reference on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-basic-bitcoin.yaml b/.github/workflows/motoko-basic-bitcoin.yaml index cdf457627..9f35ad236 100644 --- a/.github/workflows/motoko-basic-bitcoin.yaml +++ b/.github/workflows/motoko-basic-bitcoin.yaml @@ -1,5 +1,6 @@ name: motoko-basic-bitcoin on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-basic-dao-example.yml b/.github/workflows/motoko-basic-dao-example.yml index 004c1f8c2..b8db93bbc 100644 --- a/.github/workflows/motoko-basic-dao-example.yml +++ b/.github/workflows/motoko-basic-dao-example.yml @@ -1,5 +1,6 @@ name: motoko-basic-dao on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-calc-example.yaml b/.github/workflows/motoko-calc-example.yaml index 57fd57697..08e141062 100644 --- a/.github/workflows/motoko-calc-example.yaml +++ b/.github/workflows/motoko-calc-example.yaml @@ -1,5 +1,6 @@ name: motoko-calc on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-cert_var-example.yaml b/.github/workflows/motoko-cert_var-example.yaml index d3ac82d30..1b8f0428f 100644 --- a/.github/workflows/motoko-cert_var-example.yaml +++ b/.github/workflows/motoko-cert_var-example.yaml @@ -1,5 +1,6 @@ name: motoko-cert-var on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-classes-example.yaml b/.github/workflows/motoko-classes-example.yaml index d955d8c8c..94204379d 100644 --- a/.github/workflows/motoko-classes-example.yaml +++ b/.github/workflows/motoko-classes-example.yaml @@ -1,5 +1,6 @@ name: motoko-classes on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-composite-query-example.yaml b/.github/workflows/motoko-composite-query-example.yaml index 9d5d40e43..3bd7f80b3 100644 --- a/.github/workflows/motoko-composite-query-example.yaml +++ b/.github/workflows/motoko-composite-query-example.yaml @@ -1,5 +1,6 @@ name: motoko-composite-query on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-counter-example.yaml b/.github/workflows/motoko-counter-example.yaml index 676825f57..7a35ae9fa 100644 --- a/.github/workflows/motoko-counter-example.yaml +++ b/.github/workflows/motoko-counter-example.yaml @@ -1,5 +1,6 @@ name: motoko-counter on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-defi-example.yml b/.github/workflows/motoko-defi-example.yml index fb4488213..bfd9ddee9 100644 --- a/.github/workflows/motoko-defi-example.yml +++ b/.github/workflows/motoko-defi-example.yml @@ -1,5 +1,6 @@ name: motoko-defi on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-dip721-example.yml b/.github/workflows/motoko-dip721-example.yml index ad3b2bc16..7b58a354e 100644 --- a/.github/workflows/motoko-dip721-example.yml +++ b/.github/workflows/motoko-dip721-example.yml @@ -1,5 +1,6 @@ name: motoko-dip721 on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-echo-example.yaml b/.github/workflows/motoko-echo-example.yaml index edf9795b7..3471d11f7 100644 --- a/.github/workflows/motoko-echo-example.yaml +++ b/.github/workflows/motoko-echo-example.yaml @@ -1,5 +1,6 @@ name: motoko-echo on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-encrypted-notes-example.yml b/.github/workflows/motoko-encrypted-notes-example.yml index 7c7e8435f..4cae3ba33 100644 --- a/.github/workflows/motoko-encrypted-notes-example.yml +++ b/.github/workflows/motoko-encrypted-notes-example.yml @@ -1,5 +1,6 @@ name: motoko-encrypted-notes on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-encrypted-notes-vetkd-example.yml b/.github/workflows/motoko-encrypted-notes-vetkd-example.yml index 5c1fb5ea6..0b9d64cc4 100644 --- a/.github/workflows/motoko-encrypted-notes-vetkd-example.yml +++ b/.github/workflows/motoko-encrypted-notes-vetkd-example.yml @@ -1,5 +1,6 @@ name: motoko-encrypted-notes-vetkd on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-factorial-example.yaml b/.github/workflows/motoko-factorial-example.yaml index b99dfd015..96a6f919b 100644 --- a/.github/workflows/motoko-factorial-example.yaml +++ b/.github/workflows/motoko-factorial-example.yaml @@ -1,5 +1,6 @@ name: motoko-factorial on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-hello-example.yml b/.github/workflows/motoko-hello-example.yml index 58576cb7f..46c2c991f 100644 --- a/.github/workflows/motoko-hello-example.yml +++ b/.github/workflows/motoko-hello-example.yml @@ -1,5 +1,6 @@ name: motoko-hello on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-hello-world-example.yaml b/.github/workflows/motoko-hello-world-example.yaml index ebd1e4565..1306dfa61 100644 --- a/.github/workflows/motoko-hello-world-example.yaml +++ b/.github/workflows/motoko-hello-world-example.yaml @@ -1,5 +1,6 @@ name: motoko-hello-world on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-hello_cycles-example.yaml b/.github/workflows/motoko-hello_cycles-example.yaml index a314786b3..d2cffefd3 100644 --- a/.github/workflows/motoko-hello_cycles-example.yaml +++ b/.github/workflows/motoko-hello_cycles-example.yaml @@ -1,5 +1,6 @@ name: motoko-hello_cycles on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-http_counter-example.yaml b/.github/workflows/motoko-http_counter-example.yaml index f19891c6b..849aa3fb9 100644 --- a/.github/workflows/motoko-http_counter-example.yaml +++ b/.github/workflows/motoko-http_counter-example.yaml @@ -1,5 +1,6 @@ name: motoko-http_counter on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-icp-transfer-example.yml b/.github/workflows/motoko-icp-transfer-example.yml index 8f6117e63..548f1a4dc 100644 --- a/.github/workflows/motoko-icp-transfer-example.yml +++ b/.github/workflows/motoko-icp-transfer-example.yml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-5 name: motoko-icp_transfer on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-icrc2-swap-example.yml b/.github/workflows/motoko-icrc2-swap-example.yml index 1714fcc3d..31b7f954f 100644 --- a/.github/workflows/motoko-icrc2-swap-example.yml +++ b/.github/workflows/motoko-icrc2-swap-example.yml @@ -1,5 +1,6 @@ name: motoko-icrc2-swap on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-internet-identity-integration-example.yaml b/.github/workflows/motoko-internet-identity-integration-example.yaml index 22bb64a5a..4369b8019 100644 --- a/.github/workflows/motoko-internet-identity-integration-example.yaml +++ b/.github/workflows/motoko-internet-identity-integration-example.yaml @@ -1,5 +1,6 @@ name: motoko-internet-identity-integration on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-invoice-e2e.yaml b/.github/workflows/motoko-invoice-e2e.yaml index 019539c9d..87e1e5dc2 100644 --- a/.github/workflows/motoko-invoice-e2e.yaml +++ b/.github/workflows/motoko-invoice-e2e.yaml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-9 name: motoko-invoice-canister-e2e on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-invoice-unit.yaml b/.github/workflows/motoko-invoice-unit.yaml index ed904888b..363f29e15 100644 --- a/.github/workflows/motoko-invoice-unit.yaml +++ b/.github/workflows/motoko-invoice-unit.yaml @@ -1,5 +1,6 @@ name: motoko-invoice-canister-unit on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-ios-notifications-example.yml b/.github/workflows/motoko-ios-notifications-example.yml index 7f1771268..12835f477 100644 --- a/.github/workflows/motoko-ios-notifications-example.yml +++ b/.github/workflows/motoko-ios-notifications-example.yml @@ -1,5 +1,6 @@ name: motoko-ios-notifications on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-life-example.yaml b/.github/workflows/motoko-life-example.yaml index 114455822..9261d3925 100644 --- a/.github/workflows/motoko-life-example.yaml +++ b/.github/workflows/motoko-life-example.yaml @@ -1,5 +1,6 @@ name: motoko-life on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-minimal-counter-dapp-example.yaml b/.github/workflows/motoko-minimal-counter-dapp-example.yaml index a2f4d4993..76ddffe96 100644 --- a/.github/workflows/motoko-minimal-counter-dapp-example.yaml +++ b/.github/workflows/motoko-minimal-counter-dapp-example.yaml @@ -1,5 +1,6 @@ name: motoko-minimal-counter-dapp on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-persistent-storage-example.yaml b/.github/workflows/motoko-persistent-storage-example.yaml index 8d7674316..2817dfe78 100644 --- a/.github/workflows/motoko-persistent-storage-example.yaml +++ b/.github/workflows/motoko-persistent-storage-example.yaml @@ -1,5 +1,6 @@ name: motoko-persistent-storage on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-phone-book-example.yaml b/.github/workflows/motoko-phone-book-example.yaml index 39ed27fd9..0af665866 100644 --- a/.github/workflows/motoko-phone-book-example.yaml +++ b/.github/workflows/motoko-phone-book-example.yaml @@ -1,5 +1,6 @@ name: motoko-phone-book on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-pub-sub-example.yaml b/.github/workflows/motoko-pub-sub-example.yaml index 66b2440b2..b61775650 100644 --- a/.github/workflows/motoko-pub-sub-example.yaml +++ b/.github/workflows/motoko-pub-sub-example.yaml @@ -1,5 +1,6 @@ name: motoko-pub-sub on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-quicksort-example.yaml b/.github/workflows/motoko-quicksort-example.yaml index 7d1fba054..231b75aab 100644 --- a/.github/workflows/motoko-quicksort-example.yaml +++ b/.github/workflows/motoko-quicksort-example.yaml @@ -1,5 +1,6 @@ name: motoko-quicksort on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-random_maze-example.yaml b/.github/workflows/motoko-random_maze-example.yaml index 618bd6f62..5e81cdbab 100644 --- a/.github/workflows/motoko-random_maze-example.yaml +++ b/.github/workflows/motoko-random_maze-example.yaml @@ -1,5 +1,6 @@ name: motoko-random_maze on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-send-http-get-example.yml b/.github/workflows/motoko-send-http-get-example.yml index f4ad771e5..afdc024c9 100644 --- a/.github/workflows/motoko-send-http-get-example.yml +++ b/.github/workflows/motoko-send-http-get-example.yml @@ -1,5 +1,6 @@ name: motoko-send-http-get-example on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-send-http-post-example.yml b/.github/workflows/motoko-send-http-post-example.yml index 806004886..962ac1656 100644 --- a/.github/workflows/motoko-send-http-post-example.yml +++ b/.github/workflows/motoko-send-http-post-example.yml @@ -1,5 +1,6 @@ name: motoko-send-http-post-example on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-simple-to-do-example.yaml b/.github/workflows/motoko-simple-to-do-example.yaml index 0c376c761..941259e2e 100644 --- a/.github/workflows/motoko-simple-to-do-example.yaml +++ b/.github/workflows/motoko-simple-to-do-example.yaml @@ -1,5 +1,6 @@ name: motoko-simple-to-do on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-superheroes-example.yaml b/.github/workflows/motoko-superheroes-example.yaml index 33d49b91c..f6e84456b 100644 --- a/.github/workflows/motoko-superheroes-example.yaml +++ b/.github/workflows/motoko-superheroes-example.yaml @@ -1,5 +1,6 @@ name: motoko-superheroes on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-threshold-ecdsa-example.yaml b/.github/workflows/motoko-threshold-ecdsa-example.yaml index ff05143fa..f2751f132 100644 --- a/.github/workflows/motoko-threshold-ecdsa-example.yaml +++ b/.github/workflows/motoko-threshold-ecdsa-example.yaml @@ -1,5 +1,6 @@ name: motoko-threshold-ecdsa on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-token-transfer-example.yml b/.github/workflows/motoko-token-transfer-example.yml index fc4cc2fd4..479b7c4cb 100644 --- a/.github/workflows/motoko-token-transfer-example.yml +++ b/.github/workflows/motoko-token-transfer-example.yml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-5 name: motoko-token_transfer on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-token-transfer-from-example.yml b/.github/workflows/motoko-token-transfer-from-example.yml index a9532fa12..9cbf7d719 100644 --- a/.github/workflows/motoko-token-transfer-from-example.yml +++ b/.github/workflows/motoko-token-transfer-from-example.yml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-5 name: motoko-token_transfer_from on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-vetkd-example.yml b/.github/workflows/motoko-vetkd-example.yml index c6ffae834..b8075f1a1 100644 --- a/.github/workflows/motoko-vetkd-example.yml +++ b/.github/workflows/motoko-vetkd-example.yml @@ -1,5 +1,6 @@ name: motoko-vetkd on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/motoko-whoami-example.yaml b/.github/workflows/motoko-whoami-example.yaml index 533073d9b..4ad269c76 100644 --- a/.github/workflows/motoko-whoami-example.yaml +++ b/.github/workflows/motoko-whoami-example.yaml @@ -1,5 +1,6 @@ name: motoko-whoami on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/provision-linux.sh b/.github/workflows/provision-linux.sh index 507527fd9..e4b533252 100755 --- a/.github/workflows/provision-linux.sh +++ b/.github/workflows/provision-linux.sh @@ -17,7 +17,11 @@ DFX_VERSION=${DFX_VERSION:=0.19.0} DFXVM_INIT_YES=true bash install-dfx.sh rm install-dfx.sh echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH source "$HOME/.local/share/dfx/env" -dfx cache install +if [[ -z "${skip_dfx_cache_install}" ]]; then + echo "Skipping dfx cache install" +else + dfx cache install +fi # Install ic-repl version=0.1.2 diff --git a/.github/workflows/rust-basic-bitcoin-example.yml b/.github/workflows/rust-basic-bitcoin-example.yml index 672647463..340587505 100644 --- a/.github/workflows/rust-basic-bitcoin-example.yml +++ b/.github/workflows/rust-basic-bitcoin-example.yml @@ -1,5 +1,6 @@ name: rust-basic-bitcoin on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-basic-dao-example.yml b/.github/workflows/rust-basic-dao-example.yml index 8e524a7b5..5ac3a0309 100644 --- a/.github/workflows/rust-basic-dao-example.yml +++ b/.github/workflows/rust-basic-dao-example.yml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-4 name: rust-basic-dao on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-canister-info-example.yml b/.github/workflows/rust-canister-info-example.yml index e5cb1d0f9..e79fd5f83 100644 --- a/.github/workflows/rust-canister-info-example.yml +++ b/.github/workflows/rust-canister-info-example.yml @@ -1,5 +1,6 @@ name: rust-canister-info on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-composite_query-example.yml b/.github/workflows/rust-composite_query-example.yml index e835811e1..b349b0a79 100644 --- a/.github/workflows/rust-composite_query-example.yml +++ b/.github/workflows/rust-composite_query-example.yml @@ -1,5 +1,6 @@ name: rust-composite_query on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-counter-example.yml b/.github/workflows/rust-counter-example.yml index 8d7341a2c..c932ecc0f 100644 --- a/.github/workflows/rust-counter-example.yml +++ b/.github/workflows/rust-counter-example.yml @@ -1,5 +1,6 @@ name: rust-counter on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-defi-example.yml b/.github/workflows/rust-defi-example.yml index 385c69520..dd73e03cf 100644 --- a/.github/workflows/rust-defi-example.yml +++ b/.github/workflows/rust-defi-example.yml @@ -1,5 +1,6 @@ name: rust-defi on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-dip721-example.yml b/.github/workflows/rust-dip721-example.yml index 989c7a936..9d8dbb6d0 100644 --- a/.github/workflows/rust-dip721-example.yml +++ b/.github/workflows/rust-dip721-example.yml @@ -1,5 +1,6 @@ name: rust-dip721 on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-encrypted-notes-example.yml b/.github/workflows/rust-encrypted-notes-example.yml index 22e7180cd..21ca57396 100644 --- a/.github/workflows/rust-encrypted-notes-example.yml +++ b/.github/workflows/rust-encrypted-notes-example.yml @@ -1,5 +1,6 @@ name: rust-encrypted-notes on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-encrypted-notes-vetkd-example.yml b/.github/workflows/rust-encrypted-notes-vetkd-example.yml index b8f82ca2c..0049aa369 100644 --- a/.github/workflows/rust-encrypted-notes-vetkd-example.yml +++ b/.github/workflows/rust-encrypted-notes-vetkd-example.yml @@ -1,5 +1,6 @@ name: rust-encrypted-notes-vetkd on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-hello-example.yml b/.github/workflows/rust-hello-example.yml index 9c64dbdc0..71e8ad4a3 100644 --- a/.github/workflows/rust-hello-example.yml +++ b/.github/workflows/rust-hello-example.yml @@ -1,5 +1,6 @@ name: rust-hello on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-icp-transfer-example.yml b/.github/workflows/rust-icp-transfer-example.yml index e3e83c552..7471fc2a2 100644 --- a/.github/workflows/rust-icp-transfer-example.yml +++ b/.github/workflows/rust-icp-transfer-example.yml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-5 name: rust-icp_transfer on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-nft-wallet-example.yml b/.github/workflows/rust-nft-wallet-example.yml index 30925ded9..3d28ae212 100644 --- a/.github/workflows/rust-nft-wallet-example.yml +++ b/.github/workflows/rust-nft-wallet-example.yml @@ -1,5 +1,6 @@ name: rust-nft-wallet on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-performance_counters-example.yaml b/.github/workflows/rust-performance_counters-example.yaml index 008022422..d3402bfd9 100644 --- a/.github/workflows/rust-performance_counters-example.yaml +++ b/.github/workflows/rust-performance_counters-example.yaml @@ -1,5 +1,6 @@ name: rust-performance_counters on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-periodic_tasks-example.yaml b/.github/workflows/rust-periodic_tasks-example.yaml index 2e1a05c13..ed9b0b23c 100644 --- a/.github/workflows/rust-periodic_tasks-example.yaml +++ b/.github/workflows/rust-periodic_tasks-example.yaml @@ -1,5 +1,6 @@ name: rust-periodic_tasks on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-pub-sub-example.yml b/.github/workflows/rust-pub-sub-example.yml index 5aded17b1..e696cfdb5 100644 --- a/.github/workflows/rust-pub-sub-example.yml +++ b/.github/workflows/rust-pub-sub-example.yml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-6 name: rust-pub-sub on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-qrcode-example.yaml b/.github/workflows/rust-qrcode-example.yaml index a3b1d91e2..4a194659b 100644 --- a/.github/workflows/rust-qrcode-example.yaml +++ b/.github/workflows/rust-qrcode-example.yaml @@ -1,5 +1,6 @@ name: rust-qrcode on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-send-http-get-example.yml b/.github/workflows/rust-send-http-get-example.yml index 2f9acbdd2..5aef5a5bc 100644 --- a/.github/workflows/rust-send-http-get-example.yml +++ b/.github/workflows/rust-send-http-get-example.yml @@ -1,5 +1,6 @@ name: rust-send-http-get-example on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-send-http-post-example.yml b/.github/workflows/rust-send-http-post-example.yml index 4a1c457a0..67b61c9d6 100644 --- a/.github/workflows/rust-send-http-post-example.yml +++ b/.github/workflows/rust-send-http-post-example.yml @@ -1,5 +1,6 @@ name: rust-send-http-post-example on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-threshold-ecdsa-example.yml b/.github/workflows/rust-threshold-ecdsa-example.yml index 282e70394..b830a6672 100644 --- a/.github/workflows/rust-threshold-ecdsa-example.yml +++ b/.github/workflows/rust-threshold-ecdsa-example.yml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-7 name: rust-threshold-ecdsa on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-token-transfer-example.yml b/.github/workflows/rust-token-transfer-example.yml index 473f7f116..64bb257e9 100644 --- a/.github/workflows/rust-token-transfer-example.yml +++ b/.github/workflows/rust-token-transfer-example.yml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-5 name: rust-token_transfer on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-token-transfer-from-example.yml b/.github/workflows/rust-token-transfer-from-example.yml index bb411bfd8..1fb7a9b81 100644 --- a/.github/workflows/rust-token-transfer-from-example.yml +++ b/.github/workflows/rust-token-transfer-from-example.yml @@ -1,6 +1,7 @@ # Known failure: https://dfinity.atlassian.net/browse/EM-5 name: rust-token_transfer_from on: + workflow_dispatch: push: branches: - master diff --git a/.github/workflows/rust-vetkd-example.yml b/.github/workflows/rust-vetkd-example.yml index 94e06370f..2cb604f5c 100644 --- a/.github/workflows/rust-vetkd-example.yml +++ b/.github/workflows/rust-vetkd-example.yml @@ -1,5 +1,6 @@ name: rust-vetkd on: + workflow_dispatch: push: branches: - master