Auto merge auto-update-weights-for-dev-1d592e0feda1746efaf3c30f7b3d253171dd01f2 to dev #3518
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@v4 | |
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@v4 | |
with: | |
name: creditcoin-runtime-${{ github.sha }} | |
path: wasm | |
- name: Install JS Dependencies | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: | | |
npm install -g yarn | |
pushd ./creditcoin-js && yarn install && yarn pack && popd | |
yarn --cwd ./scripts/js upgrade 'creditcoin-js' | |
- name: Install Subwasm | |
uses: gluwa/cargo@dev | |
with: | |
command: install | |
args: --locked --git https://github.com/chevdor/subwasm --tag v0.17.1 | |
- name: Update WASM | |
working-directory: scripts/js | |
env: | |
DEVNET_URL: wss://rpc.devnet.creditcoin.network/ws | |
SUDO_KEY: ${{ secrets.QA_SUDO_KEY }} | |
run: | | |
yarn runtimeUpgrade "$DEVNET_URL" \ | |
../../wasm/runtime/target/srtool/release/wbuild/creditcoin-node-runtime/creditcoin_node_runtime.compact.compressed.wasm "$SUDO_KEY" 0 |