Make test-migrations-via-try-runtime CI job depend on live-sync-credi… #2848
Workflow file for this run
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: Build WASM Runtime | |
on: | |
push: | |
branches: [main, testnet, dev] | |
pull_request: | |
branches: [testnet, dev] | |
workflow_dispatch: | |
permissions: read-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Srtool build | |
id: srtool_build | |
uses: chevdor/srtool-actions@v0.8.0 | |
with: | |
chain: "creditcoin" | |
runtime_dir: runtime | |
package: creditcoin-node-runtime | |
workdir: ${{ github.workspace }} | |
tag: "1.66.1" # FIXME: remove this option (use the latest) once we're building w/ stable rust | |
- name: Summary | |
run: | | |
echo '${{ steps.srtool_build.outputs.json }}' | jq . > creditcoin-srtool-digest.json | |
cat creditcoin-srtool-digest.json | |
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}" | |
- name: Archive Runtime | |
uses: actions/upload-artifact@v3 | |
with: | |
name: creditcoin-runtime-${{ github.sha }} | |
path: | | |
${{ steps.srtool_build.outputs.wasm_compressed }} | |
creditcoin-srtool-digest.json | |
update-wasm-on-devnet: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/dev' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: creditcoin-runtime-${{ github.sha }} | |
path: wasm | |
- name: Install JS Dependencies | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- run: | | |
npm install -g yarn | |
pushd ./creditcoin-js && yarn install && yarn pack && popd | |
yarn --cwd ./scripts/js upgrade 'creditcoin-js' | |
- name: Install Subwasm | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: --locked --git https://github.com/chevdor/subwasm --tag v0.17.1 | |
- name: Update WASM | |
working-directory: scripts/js | |
env: | |
CTCQA_URL: ${{ secrets.CTCQA_URL }} | |
QA_SUDO_KEY: ${{ secrets.QA_SUDO_KEY }} | |
run: | | |
yarn runtimeUpgrade "$CTCQA_URL" \ | |
../../wasm/runtime/target/srtool/release/wbuild/creditcoin-node-runtime/creditcoin_node_runtime.compact.compressed.wasm "$QA_SUDO_KEY" |