From cd8170bc5b79270a7876fd1c4e71d989bcd747e3 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 19 Oct 2023 15:40:39 +0200 Subject: [PATCH 01/11] adjust GHA to be able to set specific repo --- .github/workflows/manual-fellow-runtimes.yml | 162 ++++++++++++++----- .gitignore | 1 + 2 files changed, 119 insertions(+), 44 deletions(-) diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index eeb783f..b6c75fe 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -13,6 +13,10 @@ on: description: The SRTOOL tag to use default: 1.70.0 required: false + repo: + description: The repo to be used to build runtimes from + default: polkadot-fellows/runtimes + required: false ref: description: The ref to be used for the repo default: main @@ -24,64 +28,130 @@ on: - cron: "00 04 * * 1" jobs: + find-runtimes: + name: Scan repo ${{ inputs.repo }} ${{ inputs.ref }} + outputs: + runtime: ${{ steps.get_runtimes_list.outputs.runtime }} + runs-on: ubuntu-latest + steps: + - name: Checkout the srtool repo + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + fetch-depth: 0 + path: srtool + + - name: Cache runtimes list for ${{ github.sha }} + id: cache_runtimes_list + if: inputs.cache == 'true' + uses: actions/cache@v3 + with: + key: runtimes-list-${{ github.sha }} + path: | + fellows-runtimes/runtimes_list.json + + - name: Checkout repo ${{ inputs.repo }} + if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + repository: ${{ inputs.repo }} + ref: ${{ inputs.ref }} + fetch-depth: 0 + path: fellows-runtimes + + - name: Install tooling + if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} + run: | + TOML_CLI_VERSION=0.2.4 + URL=https://github.com/chevdor/toml-cli/releases/download/v${TOML_CLI_VERSION}/toml_linux_amd64_v${TOML_CLI_VERSION}.deb + curl -L $URL --output toml.deb + sudo dpkg -i toml.deb + toml --version; jq --version + + - name: Scan runtimes + if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} + + run: | + . ./srtool/scripts/lib.sh + + echo "Github workspace: ${{ github.workspace }}" + echo "Current folder: $(pwd)"; ls -al + cd fellows-runtimes; ls -al + + MATRIX=$(find_runtimes | tee runtimes_list.json) + echo $MATRIX + + - name: Get runtimes list + id: get_runtimes_list + run: | + cd fellows-runtimes; ls -al + MATRIX=$(cat runtimes_list.json) + echo $MATRIX + echo "runtime=$MATRIX" >> $GITHUB_OUTPUT + build: - name: Build ${{ matrix.chain }} ${{ github.event.inputs.ref }} + name: Build ${{ matrix.chain }} ${{ inputs.ref }} + needs: + - find-runtimes strategy: fail-fast: false - matrix: - include: - # Relay - - runtime_dir: relay/kusama - runtime: staging-kusama-runtime - chain: staging-kusama - - runtime_dir: relay/polkadot - runtime: polkadot-runtime - chain: polkadot - - # System parachains / Asset Hub - - runtime_dir: system-parachains/asset-hubs/asset-hub-kusama - runtime: asset-hub-kusama-runtime - chain: asset-hub-kusama - - runtime_dir: system-parachains/asset-hubs/asset-hub-polkadot - runtime: asset-hub-polkadot-runtime - chain: asset-hub-polkadot - - # System parachains / Bridge Hub - - runtime_dir: system-parachains/bridge-hubs/bridge-hub-kusama - runtime: bridge-hub-kusama-runtime - chain: bridge-hub-kusama - - runtime_dir: system-parachains/bridge-hubs/bridge-hub-polkadot - runtime: bridge-hub-polkadot-runtime - chain: bridge-hub-polkadot - - # System parachains / Collectives - - runtime_dir: system-parachains/collectives/collectives-polkadot - runtime: collectives-polkadot-runtime - chain: collectives-polkadot + matrix: ${{ fromJSON(needs.find-runtimes.outputs.runtime) }} + # matrix: + # include: + # # Relay + # - runtime_dir: relay/kusama + # runtime: staging-kusama-runtime + # chain: staging-kusama + # - runtime_dir: relay/polkadot + # runtime: polkadot-runtime + # chain: polkadot + + # # System parachains / Asset Hub + # - runtime_dir: system-parachains/asset-hubs/asset-hub-kusama + # runtime: asset-hub-kusama-runtime + # chain: asset-hub-kusama + # - runtime_dir: system-parachains/asset-hubs/asset-hub-polkadot + # runtime: asset-hub-polkadot-runtime + # chain: asset-hub-polkadot + + # # System parachains / Bridge Hub + # - runtime_dir: system-parachains/bridge-hubs/bridge-hub-kusama + # runtime: bridge-hub-kusama-runtime + # chain: bridge-hub-kusama + # - runtime_dir: system-parachains/bridge-hubs/bridge-hub-polkadot + # runtime: bridge-hub-polkadot-runtime + # chain: bridge-hub-polkadot + + # # System parachains / Collectives + # - runtime_dir: system-parachains/collectives/collectives-polkadot + # runtime: collectives-polkadot-runtime + # chain: collectives-polkadot runs-on: ubuntu-latest steps: - name: Cache ${{ matrix.chain }} runtime for ${{ github.sha }} id: cache_runtime - if: github.event.inputs.cache == 'true' - uses: actions/cache@v3 + if: inputs.cache == 'true' + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2 with: key: ${{ matrix.chain }}-${{ github.sha }} path: | - sdk/${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime + fellows-runtimes/${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - name: Checkout + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} with: - repository: polkadot-fellows/runtimes - ref: ${{ github.event.inputs.ref }} + repository: ${{ inputs.repo }} + ref: ${{ inputs.ref }} fetch-depth: 0 + path: fellows-runtimes - name: Srtool build id: srtool_build if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} uses: chevdor/srtool-actions@v0.8.0 with: + workdir: fellows-runtimes chain: ${{ matrix.chain }} runtime_dir: ${{ matrix.runtime_dir }} image: ${{ github.event.inputs.image }} @@ -91,6 +161,7 @@ jobs: - name: Store build artifacts to disk id: cache_digest if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} + working-directory: fellows-runtimes run: | cached_output=${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime/ digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json @@ -113,6 +184,7 @@ jobs: echo "wasm_compressed=$wasm_compressed" >> "$GITHUB_OUTPUT" - name: Summary + working-directory: fellows-runtimes run: | cached_output=${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime/ digest_file=${cached_output}/${{ matrix.chain }}-srtool-digest.json @@ -127,9 +199,9 @@ jobs: with: name: ${{ matrix.chain }}-runtime path: | - ${{ steps.srtool_build.outputs.wasm }} - ${{ steps.srtool_build.outputs.wasm_compressed }} - ${{ matrix.chain }}-srtool-digest.json + fellows-runtimes/${{ steps.srtool_build.outputs.wasm }} + fellows-runtimes/${{ steps.srtool_build.outputs.wasm_compressed }} + fellows-runtimes/${{ matrix.chain }}-srtool-digest.json # We now get extra information thanks to subwasm, - name: Install subwasm ${{ env.SUBWASM_VERSION }} @@ -144,10 +216,12 @@ jobs: 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 }}-info_compressed.json + - name: Extract the metadata 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 run: | subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt @@ -157,7 +231,7 @@ jobs: with: name: ${{ matrix.chain }}-runtime path: | - ${{ matrix.chain }}-info.json - ${{ matrix.chain }}-info_compressed.json - ${{ matrix.chain }}-metadata.json - ${{ matrix.chain }}-diff.txt + fellows-runtimes/${{ matrix.chain }}-info.json + fellows-runtimes/${{ matrix.chain }}-info_compressed.json + fellows-runtimes/${{ matrix.chain }}-metadata.json + fellows-runtimes/${{ matrix.chain }}-diff.txt diff --git a/.gitignore b/.gitignore index bc0fee5..9dfd2ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .env digests +.idea From 39cc56252a899ecca18073a646a69b96da12a214 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 19 Oct 2023 16:05:23 +0200 Subject: [PATCH 02/11] chnage srtool-action version --- .github/workflows/manual-fellow-runtimes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index b6c75fe..c5b663c 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -149,7 +149,7 @@ jobs: - name: Srtool build id: srtool_build if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} - uses: chevdor/srtool-actions@v0.8.0 + uses: chevdor/srtool-actions@wk-230920-add-debug with: workdir: fellows-runtimes chain: ${{ matrix.chain }} From dd4fd795ff140ec6977eb3431aa9ca20e185f9f1 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 19 Oct 2023 16:39:30 +0200 Subject: [PATCH 03/11] add missing working-directory param --- .github/workflows/manual-fellow-runtimes.yml | 34 ++------------------ 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index c5b663c..1f7f607 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -95,37 +95,6 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJSON(needs.find-runtimes.outputs.runtime) }} - # matrix: - # include: - # # Relay - # - runtime_dir: relay/kusama - # runtime: staging-kusama-runtime - # chain: staging-kusama - # - runtime_dir: relay/polkadot - # runtime: polkadot-runtime - # chain: polkadot - - # # System parachains / Asset Hub - # - runtime_dir: system-parachains/asset-hubs/asset-hub-kusama - # runtime: asset-hub-kusama-runtime - # chain: asset-hub-kusama - # - runtime_dir: system-parachains/asset-hubs/asset-hub-polkadot - # runtime: asset-hub-polkadot-runtime - # chain: asset-hub-polkadot - - # # System parachains / Bridge Hub - # - runtime_dir: system-parachains/bridge-hubs/bridge-hub-kusama - # runtime: bridge-hub-kusama-runtime - # chain: bridge-hub-kusama - # - runtime_dir: system-parachains/bridge-hubs/bridge-hub-polkadot - # runtime: bridge-hub-polkadot-runtime - # chain: bridge-hub-polkadot - - # # System parachains / Collectives - # - runtime_dir: system-parachains/collectives/collectives-polkadot - # runtime: collectives-polkadot-runtime - # chain: collectives-polkadot - runs-on: ubuntu-latest steps: - name: Cache ${{ matrix.chain }} runtime for ${{ github.sha }} @@ -211,6 +180,7 @@ jobs: subwasm --version - name: Show Runtime information + working-directory: fellows-runtimes run: | subwasm info ${{ steps.srtool_build.outputs.wasm }} subwasm info ${{ steps.srtool_build.outputs.wasm_compressed }} @@ -218,11 +188,13 @@ jobs: subwasm --json info ${{ steps.srtool_build.outputs.wasm_compressed }} > ${{ matrix.chain }}-info_compressed.json - name: Extract the metadata + working-directory: fellows-runtimes 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 + working-directory: fellows-runtimes run: | subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt From 75a6560a0d7418490940cb580702f8638f75d675 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 20 Oct 2023 15:41:46 +0200 Subject: [PATCH 04/11] add the commit hash from the target repo as the key for cashe --- .github/workflows/manual-fellow-runtimes.yml | 29 ++++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index 1f7f607..83520cd 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -32,6 +32,7 @@ jobs: name: Scan repo ${{ inputs.repo }} ${{ inputs.ref }} outputs: runtime: ${{ steps.get_runtimes_list.outputs.runtime }} + commit_hash: ${{ steps.get_commit_hash.outputs.commit_hash }} runs-on: ubuntu-latest steps: - name: Checkout the srtool repo @@ -40,17 +41,7 @@ jobs: fetch-depth: 0 path: srtool - - name: Cache runtimes list for ${{ github.sha }} - id: cache_runtimes_list - if: inputs.cache == 'true' - uses: actions/cache@v3 - with: - key: runtimes-list-${{ github.sha }} - path: | - fellows-runtimes/runtimes_list.json - - name: Checkout repo ${{ inputs.repo }} - if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: repository: ${{ inputs.repo }} @@ -58,6 +49,20 @@ jobs: fetch-depth: 0 path: fellows-runtimes + - name: Get commit hash for ${{ inputs.repo }} ${{ inputs.ref }} + id: get_commit_hash + run: | + echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Cache runtimes list for ${{ steps.get_commit_hash.outputs.commit_hash }} + id: cache_runtimes_list + if: inputs.cache == 'true' + uses: actions/cache@v3 + with: + key: runtimes-list-${{ steps.get_commit_hash.outputs.commit_hash }} + path: | + fellows-runtimes/runtimes_list.json + - name: Install tooling if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} run: | @@ -97,12 +102,12 @@ jobs: matrix: ${{ fromJSON(needs.find-runtimes.outputs.runtime) }} runs-on: ubuntu-latest steps: - - name: Cache ${{ matrix.chain }} runtime for ${{ github.sha }} + - name: Cache ${{ matrix.chain }} runtime for ${{ needs.find-runtimes.outputs.commit_hash }} id: cache_runtime if: inputs.cache == 'true' uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2 with: - key: ${{ matrix.chain }}-${{ github.sha }} + key: ${{ matrix.chain }}-${{ needs.find-runtimes.outputs.commit_hash }} path: | fellows-runtimes/${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime From d1b03afb6041337dedf363048d94d2fc257764ac Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 20 Oct 2023 15:51:34 +0200 Subject: [PATCH 05/11] add working directory to get hash --- .github/workflows/manual-fellow-runtimes.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index 83520cd..0bd82e5 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -51,6 +51,7 @@ jobs: - name: Get commit hash for ${{ inputs.repo }} ${{ inputs.ref }} id: get_commit_hash + working-directory: fellows-runtimes run: | echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT From f378500027215ffd10db1e6775ffd1f42bdfd35a Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Mon, 23 Oct 2023 11:14:34 +0200 Subject: [PATCH 06/11] use get_values instead of srtool_build to retrieve wasms from cache --- .github/workflows/manual-fellow-runtimes.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index 0bd82e5..9c36291 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -174,8 +174,8 @@ jobs: with: name: ${{ matrix.chain }}-runtime path: | - fellows-runtimes/${{ steps.srtool_build.outputs.wasm }} - fellows-runtimes/${{ steps.srtool_build.outputs.wasm_compressed }} + fellows-runtimes/${{ steps.get_values.outputs.wasm }} + fellows-runtimes/${{ steps.get_values.outputs.wasm_compressed }} fellows-runtimes/${{ matrix.chain }}-srtool-digest.json # We now get extra information thanks to subwasm, @@ -188,21 +188,21 @@ jobs: - name: Show Runtime information working-directory: fellows-runtimes 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 }}-info_compressed.json + subwasm info ${{ steps.get_values.outputs.wasm }} + subwasm info ${{ steps.get_values.outputs.wasm_compressed }} + subwasm --json info ${{ steps.get_values.outputs.wasm }} > ${{ matrix.chain }}-info.json + subwasm --json info ${{ steps.get_values.outputs.wasm_compressed }} > ${{ matrix.chain }}-info_compressed.json - name: Extract the metadata working-directory: fellows-runtimes run: | - subwasm meta ${{ steps.srtool_build.outputs.wasm }} - subwasm --json meta ${{ steps.srtool_build.outputs.wasm }} > ${{ matrix.chain }}-metadata.json + subwasm meta ${{ steps.get_values.outputs.wasm }} + subwasm --json meta ${{ steps.get_values.outputs.wasm }} > ${{ matrix.chain }}-metadata.json - name: Check the metadata diff working-directory: fellows-runtimes run: | - subwasm diff ${{ steps.srtool_build.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt + subwasm diff ${{ steps.get_values.outputs.wasm }} --chain-b ${{ matrix.chain }} | tee ${{ matrix.chain }}-diff.txt - name: Archive Subwasm results uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 From 4ba7da041c1a67f2b94a3b9cd7bc8276ca41f1bb Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Mon, 23 Oct 2023 14:02:36 +0200 Subject: [PATCH 07/11] add repo choice and change caching for sdk --- .github/workflows/manual-polkadot-sdk.yml | 38 ++++++++++++++--------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/manual-polkadot-sdk.yml b/.github/workflows/manual-polkadot-sdk.yml index c6c72e1..84c9bce 100644 --- a/.github/workflows/manual-polkadot-sdk.yml +++ b/.github/workflows/manual-polkadot-sdk.yml @@ -12,6 +12,10 @@ on: srtool_tag: description: The SRTOOL tag to use default: 1.70.0 + repo: + description: The repo to be used to build runtimes from + default: paritytech/polkadot-sdk + required: false ref: description: The ref to be used for the repo default: master @@ -23,9 +27,10 @@ on: jobs: find-runtimes: - name: Scan Polkadot SDK ${{ github.event.inputs.ref }} + name: Scan repo ${{ inputs.repo }} ${{ inputs.ref }} outputs: runtime: ${{ steps.get_runtimes_list.outputs.runtime }} + commit_hash: ${{ steps.get_commit_hash.outputs.commit_hash }} runs-on: ubuntu-latest steps: - name: Checkout the srtool repo @@ -34,17 +39,7 @@ jobs: fetch-depth: 0 path: srtool - - name: Cache runtimes list for ${{ github.sha }} - id: cache_runtimes_list - if: github.event.inputs.cache == 'true' - uses: actions/cache@v3 - with: - key: runtimes-list-${{ github.sha }} - path: | - sdk/runtimes_list.json - - - name: Checkout the Polkadot SDK repo - if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} + - name: Checkout repo ${{ inputs.repo }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: repository: paritytech/polkadot-sdk @@ -52,6 +47,21 @@ jobs: fetch-depth: 0 path: sdk + - name: Get commit hash for ${{ inputs.repo }} ${{ inputs.ref }} + id: get_commit_hash + working-directory: sdk + run: | + echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Cache runtimes list for ${{ steps.get_commit_hash.outputs.commit_hash }} + id: cache_runtimes_list + if: github.event.inputs.cache == 'true' + uses: actions/cache@v3 + with: + key: runtimes-list-${{ steps.get_commit_hash.outputs.commit_hash }} + path: | + sdk/runtimes_list.json + - name: Install tooling if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} run: | @@ -109,12 +119,12 @@ jobs: ls -al ls -al sdk - - name: Cache ${{ matrix.chain }} runtime for ${{ github.sha }} + - name: Cache ${{ matrix.chain }} runtime for ${{ needs.find-runtimes.outputs.commit_hash }} id: cache_runtime if: github.event.inputs.cache == 'true' uses: actions/cache@v3 with: - key: ${{ matrix.chain }}-${{ github.sha }} + key: ${{ matrix.chain }}-${{ needs.find-runtimes.outputs.commit_hash }} path: | sdk/${{ matrix.runtime_dir }}/target/srtool/release/wbuild/${{ matrix.chain }}-runtime From e8b6bae7014cf504addaf03bf25e6abba71664a6 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Tue, 24 Oct 2023 11:26:23 +0200 Subject: [PATCH 08/11] move TOML_CLI_VERSION to the env section --- .github/workflows/manual-fellow-runtimes.yml | 4 ++-- .github/workflows/manual-polkadot-sdk.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index 9c36291..04a16cb 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -2,6 +2,7 @@ name: Manual Build - Fellowship env: SUBWASM_VERSION: 0.20.0 + TOML_CLI_VERSION: 0.2.4 on: workflow_dispatch: @@ -67,8 +68,7 @@ jobs: - name: Install tooling if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} run: | - TOML_CLI_VERSION=0.2.4 - URL=https://github.com/chevdor/toml-cli/releases/download/v${TOML_CLI_VERSION}/toml_linux_amd64_v${TOML_CLI_VERSION}.deb + URL=https://github.com/chevdor/toml-cli/releases/download/v${{ env.TOML_CLI_VERSION }}/toml_linux_amd64_v${{ env.TOML_CLI_VERSION }}.deb curl -L $URL --output toml.deb sudo dpkg -i toml.deb toml --version; jq --version diff --git a/.github/workflows/manual-polkadot-sdk.yml b/.github/workflows/manual-polkadot-sdk.yml index 84c9bce..6fdb5aa 100644 --- a/.github/workflows/manual-polkadot-sdk.yml +++ b/.github/workflows/manual-polkadot-sdk.yml @@ -2,6 +2,7 @@ name: Manual Build - Polkadot SDK env: SUBWASM_VERSION: 0.20.0 + TOML_CLI_VERSION: 0.2.4 on: workflow_dispatch: @@ -65,8 +66,7 @@ jobs: - name: Install tooling if: ${{ steps.cache_runtimes_list.outputs.cache-hit != 'true' }} run: | - TOML_CLI_VERSION=0.2.4 - URL=https://github.com/chevdor/toml-cli/releases/download/v${TOML_CLI_VERSION}/toml_linux_amd64_v${TOML_CLI_VERSION}.deb + URL=https://github.com/chevdor/toml-cli/releases/download/v${{ env.TOML_CLI_VERSION }}/toml_linux_amd64_v${{ env.TOML_CLI_VERSION }}.deb curl -L $URL --output toml.deb sudo dpkg -i toml.deb toml --version; jq --version From 164f15b6f154a0cf216f7ddc73f2c782523aff78 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Mon, 30 Oct 2023 17:00:54 +0100 Subject: [PATCH 09/11] update srtool-action version --- .github/workflows/manual-fellow-runtimes.yml | 2 +- .github/workflows/manual-polkadot-sdk.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index 04a16cb..26f0919 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -124,7 +124,7 @@ jobs: - name: Srtool build id: srtool_build if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} - uses: chevdor/srtool-actions@wk-230920-add-debug + uses: chevdor/srtool-actions@d7c66d9766f633abab95127ee910dd96892f8e3b #0.9.0 with: workdir: fellows-runtimes chain: ${{ matrix.chain }} diff --git a/.github/workflows/manual-polkadot-sdk.yml b/.github/workflows/manual-polkadot-sdk.yml index 6fdb5aa..052e59b 100644 --- a/.github/workflows/manual-polkadot-sdk.yml +++ b/.github/workflows/manual-polkadot-sdk.yml @@ -131,7 +131,7 @@ jobs: - name: Srtool build id: srtool_build if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} - uses: chevdor/srtool-actions@wk-230920-add-debug + uses: chevdor/srtool-actions@d7c66d9766f633abab95127ee910dd96892f8e3b #0.9.0 with: workdir: sdk chain: ${{ matrix.chain }} From 72be07d718480c6021fab5e09a4e1ca538bcd3fc Mon Sep 17 00:00:00 2001 From: Wilfried Kopp Date: Mon, 30 Oct 2023 17:04:53 +0100 Subject: [PATCH 10/11] Switch to the latest srtool GHA --- .github/workflows/manual-acala.yml | 2 +- .github/workflows/manual-fellow-runtimes.yml | 2 +- .github/workflows/manual-moonbeam.yml | 2 +- .github/workflows/manual-polkadot-sdk.yml | 2 +- .github/workflows/manual-shiden.yml | 2 +- .github/workflows/manual.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/manual-acala.yml b/.github/workflows/manual-acala.yml index 4b84410..d735134 100644 --- a/.github/workflows/manual-acala.yml +++ b/.github/workflows/manual-acala.yml @@ -34,7 +34,7 @@ jobs: - name: Srtool build id: srtool_build - uses: chevdor/srtool-actions@v0.8.0 + uses: chevdor/srtool-actions@v0.9.0 with: chain: ${{ matrix.chain }} tag: ${{ github.event.inputs.srtool_tag }} diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index 26f0919..cc25a04 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -124,7 +124,7 @@ jobs: - name: Srtool build id: srtool_build if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} - uses: chevdor/srtool-actions@d7c66d9766f633abab95127ee910dd96892f8e3b #0.9.0 + uses: chevdor/srtool-actions@dv0.9.0 with: workdir: fellows-runtimes chain: ${{ matrix.chain }} diff --git a/.github/workflows/manual-moonbeam.yml b/.github/workflows/manual-moonbeam.yml index d31640b..d87b582 100644 --- a/.github/workflows/manual-moonbeam.yml +++ b/.github/workflows/manual-moonbeam.yml @@ -33,7 +33,7 @@ jobs: - name: Srtool build id: srtool_build - uses: chevdor/srtool-actions@v0.8.0 + uses: chevdor/srtool-actions@v0.9.0 with: chain: ${{ matrix.chain }} tag: ${{ github.event.inputs.srtool_tag }} diff --git a/.github/workflows/manual-polkadot-sdk.yml b/.github/workflows/manual-polkadot-sdk.yml index 052e59b..7da149b 100644 --- a/.github/workflows/manual-polkadot-sdk.yml +++ b/.github/workflows/manual-polkadot-sdk.yml @@ -131,7 +131,7 @@ jobs: - name: Srtool build id: srtool_build if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} - uses: chevdor/srtool-actions@d7c66d9766f633abab95127ee910dd96892f8e3b #0.9.0 + uses: chevdor/srtool-actions@v0.9.0 with: workdir: sdk chain: ${{ matrix.chain }} diff --git a/.github/workflows/manual-shiden.yml b/.github/workflows/manual-shiden.yml index 9baf1ee..066a24f 100644 --- a/.github/workflows/manual-shiden.yml +++ b/.github/workflows/manual-shiden.yml @@ -34,7 +34,7 @@ jobs: - name: Srtool build id: srtool_build - uses: chevdor/srtool-actions@v0.8.0 + uses: chevdor/srtool-actions@v0.9.0 with: chain: ${{ matrix.chain }} tag: ${{ github.event.inputs.srtool_tag }} diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index adf2b70..aec1c04 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -47,7 +47,7 @@ jobs: - name: Srtool build id: srtool_build - uses: chevdor/srtool-actions@v0.8.0 + uses: chevdor/srtool-actions@v0.9.0 with: chain: ${{ github.event.inputs.chain }} package: ${{ github.event.inputs.package }} From 86da55be312bfe0c74719782490f52de6649a7a2 Mon Sep 17 00:00:00 2001 From: Wilfried Kopp Date: Mon, 30 Oct 2023 17:06:16 +0100 Subject: [PATCH 11/11] Typo --- .github/workflows/manual-fellow-runtimes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-fellow-runtimes.yml b/.github/workflows/manual-fellow-runtimes.yml index cc25a04..ad46947 100644 --- a/.github/workflows/manual-fellow-runtimes.yml +++ b/.github/workflows/manual-fellow-runtimes.yml @@ -124,7 +124,7 @@ jobs: - name: Srtool build id: srtool_build if: ${{ steps.cache_runtime.outputs.cache-hit != 'true' }} - uses: chevdor/srtool-actions@dv0.9.0 + uses: chevdor/srtool-actions@v0.9.0 with: workdir: fellows-runtimes chain: ${{ matrix.chain }}