chore(deps): bump serde_with from 3.16.1 to 3.21.0 (#1658) #87
Workflow file for this run
This file contains hidden or 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: Release Runtime Build | |
| on: | |
| push: | |
| tags: | |
| - runtime-[0-9]+* | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| RELEASE_TAG: ${{ github.ref_name }} | |
| SUBWASM_VERSION: 0.16.1 | |
| jobs: | |
| checks-and-tests: | |
| # Just to ensure this runs AFTER the tracing runtimes are built, for the sake of generating a release faster | |
| needs: evm-tracing-runtimes | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - name: Free disk space | |
| run: | | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| df -h | |
| - name: Checkout the source code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Install deps | |
| run: sudo apt -y install protobuf-compiler | |
| - name: Install & display rust toolchain | |
| run: rustup show | |
| - name: Check targets are installed correctly | |
| run: rustup target list --installed | |
| - name: Install cargo-nextest | |
| run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin | |
| - name: Check all features compilation | |
| run: cargo check --features try-runtime,runtime-benchmarks --locked | |
| - name: Run all tests | |
| run: make test-all | |
| evm-tracing-runtimes: | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - name: Checkout the source code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Install deps | |
| run: sudo apt -y install protobuf-compiler | |
| - name: Install & display rust toolchain | |
| run: rustup show | |
| - name: Check targets are installed correctly | |
| run: rustup target list --installed | |
| - name: Build optimized runtimes with evm tracing | |
| run: cargo build --profile production --locked --features on-chain-release-build,evm-tracing -p astar-runtime -p shiden-runtime -p shibuya-runtime | |
| - name: rename evm tracing runtimes | |
| run: | | |
| mv target/production/wbuild/astar-runtime/astar_runtime.compact.compressed.wasm target/production/wbuild/astar-runtime/astar_evm_tracing_runtime.compact.compressed.wasm | |
| mv target/production/wbuild/shiden-runtime/shiden_runtime.compact.compressed.wasm target/production/wbuild/shiden-runtime/shiden_evm_tracing_runtime.compact.compressed.wasm | |
| mv target/production/wbuild/shibuya-runtime/shibuya_runtime.compact.compressed.wasm target/production/wbuild/shibuya-runtime/shibuya_evm_tracing_runtime.compact.compressed.wasm | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: astar-evm-tracing-runtime | |
| path: target/production/wbuild/astar-runtime/astar_evm_tracing_runtime.compact.compressed.wasm | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: shiden-evm-tracing-runtime | |
| path: target/production/wbuild/shiden-runtime/shiden_evm_tracing_runtime.compact.compressed.wasm | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: shibuya-evm-tracing-runtime | |
| path: target/production/wbuild/shibuya-runtime/shibuya_evm_tracing_runtime.compact.compressed.wasm | |
| srtool: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| chain: ["astar", "shiden", "shibuya"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Srtool build | |
| id: srtool_build | |
| uses: chevdor/srtool-actions@v0.8.0 | |
| env: | |
| # needed to enable metadata hash generation | |
| BUILD_OPTS: "--features on-chain-release-build" | |
| with: | |
| profile: production | |
| chain: ${{ matrix.chain }} | |
| runtime_dir: runtime/${{ matrix.chain }} | |
| - name: Summary | |
| run: | | |
| echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json | |
| cat ${{ matrix.chain }}-srtool-digest.json | |
| echo "Compact Runtime: ${{ steps.srtool_build.outputs.wasm }}" | |
| echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}" | |
| cp ${{ steps.srtool_build.outputs.wasm }} ${{ matrix.chain }}_runtime.compact.wasm | |
| cp ${{ steps.srtool_build.outputs.wasm_compressed }} ${{ matrix.chain }}_runtime.compact.compressed.wasm | |
| # it takes a while to build the runtime, so let's save the artifact as soon as we have it | |
| - name: Archive Artifacts for ${{ matrix.chain }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.chain }}-runtime | |
| path: | | |
| ${{ matrix.chain }}_runtime.compact.wasm | |
| ${{ matrix.chain }}_runtime.compact.compressed.wasm | |
| ${{ matrix.chain }}-srtool-digest.json | |
| # We now get extra information thanks to subwasm | |
| - name: Install subwasm | |
| run: | | |
| wget https://github.com/chevdor/subwasm/releases/download/v${{ env.SUBWASM_VERSION }}/subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb | |
| sudo dpkg -i subwasm_linux_amd64_v${{ env.SUBWASM_VERSION }}.deb | |
| subwasm --version | |
| - name: Show Runtime information | |
| shell: bash | |
| run: | | |
| subwasm info ${{ steps.srtool_build.outputs.wasm }} | |
| subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }} | |
| subwasm --json info ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-info.json | |
| subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.chain }}-compressed-info.json | |
| - name: Extract the metadata | |
| shell: bash | |
| run: | | |
| subwasm meta ${{ steps.srtool_build.outputs.wasm }} | |
| subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-metadata.json | |
| - name: Check the metadata diff | |
| shell: bash | |
| # the following subwasm call will error for chains that are not known and/or live, that includes shell for instance | |
| run: | | |
| subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} || \ | |
| echo "Subwasm call failed, check the logs. This is likely because ${{ matrix.chain }} is not known by subwasm" | \ | |
| tee ${{ matrix.chain }}-diff.txt | |
| - name: Archive Subwasm results | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.chain }}-runtime-subwasm | |
| path: | | |
| ${{ matrix.chain }}-info.json | |
| ${{ matrix.chain }}-compressed-info.json | |
| ${{ matrix.chain }}-metadata.json | |
| ${{ matrix.chain }}-diff.txt | |
| publish-release-draft: | |
| needs: [evm-tracing-runtimes, srtool] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download astar runtime | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: astar-runtime | |
| path: runtime-artifacts | |
| - name: Download shiden runtime | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: shiden-runtime | |
| path: runtime-artifacts | |
| - name: Download shibuya runtime | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: shibuya-runtime | |
| path: runtime-artifacts | |
| - name: Use Node.js 20.x | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Get the latest runtime release | |
| id: latest-release | |
| # We're making an assumption that the latest runtime release will be within the last 30 releases | |
| run: | | |
| releases=$(curl -s https://api.github.com/repos/AstarNetwork/Astar/releases) | |
| latest_runtime_tag=$(echo "$releases" | jq -r ' | |
| [ | |
| (.[] | select(.name | test("^runtime-\\d{4,}$"; "i")) | .tag_name), | |
| (.[] | select(.name | test("^v\\d+\\.\\d+\\.\\d+$"; "i")) | .tag_name) | |
| ] | first | |
| ') | |
| echo "latest_runtime_tag=$latest_runtime_tag" >> $GITHUB_OUTPUT | |
| echo "$latest_runtime_tag" | |
| - name: Generate Release Body | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| id: generate-release-body | |
| run: | | |
| cd .github/scripts | |
| yarn | |
| yarn -s run ts-node generate-release-body.ts generate \ | |
| --owner "${{ github.repository_owner }}" \ | |
| --repo "$(basename ${{ github.repository }})" \ | |
| --from "${{ steps.latest-release.outputs.latest_runtime_tag }}" \ | |
| --to "${{ github.ref_name }}" \ | |
| --type runtime \ | |
| --srtool-report-folder '../../runtime-artifacts/' \ | |
| > ../../body.md | |
| - name: Create Release Draft | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create "$RELEASE_TAG" \ | |
| --draft \ | |
| --title "$RELEASE_TAG" \ | |
| --notes-file body.md | |
| upload-runtimes: | |
| needs: publish-release-draft | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| chain: ["astar", "shiden", "shibuya"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| - name: Download runtime | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: ${{ matrix.chain }}-runtime | |
| - name: Download runtime subwasm info | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: ${{ matrix.chain }}-runtime-subwasm | |
| - name: Get runtime version | |
| id: get-runtime-version | |
| run: | | |
| ls -R | |
| chain=${{ matrix.chain }} | |
| runtime_version=$(cat $chain-compressed-info.json | jq '.core_version' | tr -d '"' | cut -d ' ' -f 1) | |
| echo $runtime_version | |
| echo "runtime=$(echo $runtime_version)" >> $GITHUB_ENV | |
| echo "${{ matrix.chain }}=$(echo $runtime_version)" >> $GITHUB_OUTPUT | |
| - name: Upload ${{ matrix.chain }} Wasm | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| chain=${{ matrix.chain }} | |
| runtime_version="${{ env.runtime }}" | |
| mv "${chain}_runtime.compact.compressed.wasm" "${runtime_version}.wasm" | |
| gh release upload "$RELEASE_TAG" "${runtime_version}.wasm" | |
| - name: Upload ${{ matrix.chain }} Metadata and Info | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| chain=${{ matrix.chain }} | |
| gh release upload "$RELEASE_TAG" \ | |
| "${chain}-metadata.json" \ | |
| "${chain}-compressed-info.json" \ | |
| "${chain}-srtool-digest.json" | |
| outputs: | |
| astar_runtime_version: ${{ steps.get-runtime-version.outputs.astar }} | |
| shiden_runtime_version: ${{ steps.get-runtime-version.outputs.shiden }} | |
| shibuya_runtime_version: ${{ steps.get-runtime-version.outputs.shibuya }} | |
| upload-evm-tracing-artifacts: | |
| needs: [publish-release-draft, upload-runtimes] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| - name: Download evm tracing runtime | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: astar-evm-tracing-runtime | |
| path: evm-tracing-artifacts | |
| - name: Download evm tracing runtime | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: shiden-evm-tracing-runtime | |
| path: evm-tracing-artifacts | |
| - name: Download evm tracing runtime | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: shibuya-evm-tracing-runtime | |
| path: evm-tracing-artifacts | |
| - name: Rename evm tracing | |
| run: | | |
| cd evm-tracing-artifacts | |
| mv astar_evm_tracing_runtime.compact.compressed.wasm ${{needs.upload-runtimes.outputs.astar_runtime_version}}_evm_tracing_runtime.compact.compressed.wasm | |
| mv shiden_evm_tracing_runtime.compact.compressed.wasm ${{needs.upload-runtimes.outputs.shiden_runtime_version}}_evm_tracing_runtime.compact.compressed.wasm | |
| mv shibuya_evm_tracing_runtime.compact.compressed.wasm ${{needs.upload-runtimes.outputs.shibuya_runtime_version}}_evm_tracing_runtime.compact.compressed.wasm | |
| - name: Compress folder | |
| run: | | |
| tar zcvf evm-tracing-artifacts.tar.gz evm-tracing-artifacts | |
| - name: Upload evm tracing binary artifact | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| asset_name="evm-tracing-artifacts-${RELEASE_TAG}.tar.gz" | |
| mv evm-tracing-artifacts.tar.gz "$asset_name" | |
| gh release upload "$RELEASE_TAG" "$asset_name" |