From cb986666ca587fedcc867a6b33968d916a85e916 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 23 May 2024 15:52:18 +0200 Subject: [PATCH 01/18] add build and upload omni-bencher binary steps --- .../release-30_publish_release_draft.yml | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index a9e521051d04..4c4c50840729 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -23,10 +23,31 @@ jobs: echo "stable=$RUST_STABLE_VERSION" >> $GITHUB_OUTPUT build-runtimes: - uses: "./.github/workflows/srtool.yml" + uses: "./.github/workflows/release-srtool.yml" with: excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template" + build-frame-omni-bencher: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + + - name: Build frame-omni-bencher binary + run: | + sudo apt update + sudo apt install -y protobuf-compiler + + cargo build --locked --release -p frame-omni-bencher + target/release/frame-omni-bencher --version + + - name: Upload frame-omni-bencher binary + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + with: + name: frame-omni-bencher + path: target/release/frame-omni-bencher + + publish-release-draft: runs-on: ubuntu-latest needs: [get-rust-versions, build-runtimes] @@ -98,7 +119,7 @@ jobs: draft: true publish-runtimes: - needs: [ build-runtimes, publish-release-draft ] + needs: [ build-runtimes, build-frame-omni-bencher, publish-release-draft ] continue-on-error: true runs-on: ubuntu-latest strategy: @@ -129,6 +150,25 @@ jobs: asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm asset_content_type: application/wasm + publish-binaries: + needs: [ build-frame-omni-bencher, publish-release-draft ] + continue-on-error: true + runs-on: ubuntu-latest + strategy: + matrix: + binary: [frame-omni-bencher] + + steps: + - name: Upload frame-omni-bencher binary + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} + asset_path: ${{ matrix.binary }}/ ${{ matrix.binary }} + asset_name: ${{ matrix.binary }} + asset_content_type: application/octet-stream + post_to_matrix: runs-on: ubuntu-latest needs: publish-release-draft From 366b7f951b5f72b5901eb1288176d802c13bc214 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 23 May 2024 15:54:23 +0200 Subject: [PATCH 02/18] don't wait for omni-bencher in rumtimes publishing --- .github/workflows/release-30_publish_release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 4c4c50840729..2312ca65f55f 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -119,7 +119,7 @@ jobs: draft: true publish-runtimes: - needs: [ build-runtimes, build-frame-omni-bencher, publish-release-draft ] + needs: [ build-runtimes, publish-release-draft ] continue-on-error: true runs-on: ubuntu-latest strategy: From cd600277f6b016a61724e6c96a08bcb223bd4bff Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 23 May 2024 16:54:16 +0200 Subject: [PATCH 03/18] fix typo in the path --- .github/workflows/release-30_publish_release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 2312ca65f55f..c574bf76e954 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -165,7 +165,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} - asset_path: ${{ matrix.binary }}/ ${{ matrix.binary }} + asset_path: ${{ matrix.binary }}/${{ matrix.binary }} asset_name: ${{ matrix.binary }} asset_content_type: application/octet-stream From 6c120df365f90de1e0b56344a4d013aa9c6eb4e2 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 23 May 2024 18:24:04 +0200 Subject: [PATCH 04/18] add download omni-bencher artifact --- .github/workflows/release-30_publish_release_draft.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index c574bf76e954..e9822f024ac3 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -159,6 +159,11 @@ jobs: binary: [frame-omni-bencher] steps: + - name: Download artifacts + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + with: + name: ${{ matrix.binary }} + - name: Upload frame-omni-bencher binary uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 env: From b1b74bcfdc932d71aa1a6809a097f4853a61882d Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Thu, 23 May 2024 18:57:22 +0200 Subject: [PATCH 05/18] test extended path to binary --- .github/workflows/release-30_publish_release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index e9822f024ac3..dbc34ac17c1b 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -170,7 +170,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} - asset_path: ${{ matrix.binary }}/${{ matrix.binary }} + asset_path: polkadot-sdk/${{ matrix.binary }}/${{ matrix.binary }} asset_name: ${{ matrix.binary }} asset_content_type: application/octet-stream From 51441ec7b0e2a3e9d94723fc97fffb71e06b3a22 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 08:28:50 +0200 Subject: [PATCH 06/18] adjust path to the bin artifact --- .github/workflows/release-30_publish_release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index dbc34ac17c1b..2ca5d13436d1 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -170,7 +170,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} - asset_path: polkadot-sdk/${{ matrix.binary }}/${{ matrix.binary }} + asset_path: ${{ github.workspace}}/${{ matrix.binary }}/${{ matrix.binary }} asset_name: ${{ matrix.binary }} asset_content_type: application/octet-stream From c935181fd66bf6eb0dd47db5d39493def19fd9d8 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 08:57:13 +0200 Subject: [PATCH 07/18] adjust path once again --- .github/workflows/release-30_publish_release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 2ca5d13436d1..9576a7d8f13e 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -170,7 +170,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} - asset_path: ${{ github.workspace}}/${{ matrix.binary }}/${{ matrix.binary }} + asset_path: ${{ github.workspace}}/${{ matrix.binary }} asset_name: ${{ matrix.binary }} asset_content_type: application/octet-stream From a10197aba28275dc3bd2ee32969b40a3a9318b99 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 09:32:55 +0200 Subject: [PATCH 08/18] make name of the upload binary step generic --- .github/workflows/release-30_publish_release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 9576a7d8f13e..86c72058c06e 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -164,7 +164,7 @@ jobs: with: name: ${{ matrix.binary }} - - name: Upload frame-omni-bencher binary + - name: Upload ${{ matrix.binary }} binary uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 771a366a3ece158fe4f53a36e6af437ec28cecd2 Mon Sep 17 00:00:00 2001 From: Egor_P Date: Fri, 24 May 2024 12:10:27 +0200 Subject: [PATCH 09/18] use production profile Co-authored-by: Branislav Kontur --- .github/workflows/release-30_publish_release_draft.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 86c72058c06e..0ad8b3749e4d 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -38,8 +38,8 @@ jobs: sudo apt update sudo apt install -y protobuf-compiler - cargo build --locked --release -p frame-omni-bencher - target/release/frame-omni-bencher --version + cargo build --locked --profile=production -p frame-omni-bencher + target/production/frame-omni-bencher --version - name: Upload frame-omni-bencher binary uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 From e449ac09ccc89573e44f222ba1dd03b46f874133 Mon Sep 17 00:00:00 2001 From: Egor_P Date: Fri, 24 May 2024 12:10:47 +0200 Subject: [PATCH 10/18] use production profile Co-authored-by: Branislav Kontur --- .github/workflows/release-30_publish_release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 0ad8b3749e4d..a70f209fb7f5 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -45,7 +45,7 @@ jobs: uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: frame-omni-bencher - path: target/release/frame-omni-bencher + path: target/production/frame-omni-bencher publish-release-draft: From bbf010080a5743b24a4fb8d012d599880935e2fa Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 14:47:44 +0200 Subject: [PATCH 11/18] add chain-spec-builder to release --- .../release-30_publish_release_draft.yml | 81 ++++++++++++------- 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index a70f209fb7f5..7499b90cc6d8 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -22,35 +22,51 @@ jobs: RUST_STABLE_VERSION=$(curl -sS https://raw.githubusercontent.com/paritytech/scripts/master/dockerfiles/ci-unified/Dockerfile | grep -oP 'ARG RUST_STABLE_VERSION=\K[^ ]+') echo "stable=$RUST_STABLE_VERSION" >> $GITHUB_OUTPUT + prepare-tooling: + runs-on: ubuntu-latest + steps: + - name: Prepare tooling + run: | + URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.4/tera-cli_linux_amd64.deb + wget $URL -O tera.deb + sudo dpkg -i tera.deb + + sudo apt update + sudo apt install -y protobuf-compiler + build-runtimes: uses: "./.github/workflows/release-srtool.yml" with: excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template" - build-frame-omni-bencher: - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + # build-binaries: + # runs-on: ubuntu-latest + # needs: [ prepare-tooling ] + # strategy: + # matrix: + # binary: [ frame-omni-bencher, chain-spec-builder ] + # steps: + # - name: Checkout sources + # uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - name: Build frame-omni-bencher binary - run: | - sudo apt update - sudo apt install -y protobuf-compiler + # - name: Build ${{ matrix.binary }} binary + # run: | + # package= ${{ matrix.binary }} + # [[ ${{ matrix.binary }} ~= chain-spec-builder ]] && package=staging-${{ matrix.binary }} - cargo build --locked --profile=production -p frame-omni-bencher - target/production/frame-omni-bencher --version + # cargo build --locked --profile=production -p ${package} --bin ${{ matrix.binary }} + # target/production/${{ matrix.binary }} --version - - name: Upload frame-omni-bencher binary - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - name: frame-omni-bencher - path: target/production/frame-omni-bencher + # - name: Upload ${{ matrix.binary }} binary + # uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + # with: + # name: ${{ matrix.binary }} + # path: target/production/${{ matrix.binary }} publish-release-draft: runs-on: ubuntu-latest - needs: [get-rust-versions, build-runtimes] + needs: [ get-rust-versions, prepare-tooling, build-runtimes ] outputs: release_url: ${{ steps.create-release.outputs.html_url }} asset_upload_url: ${{ steps.create-release.outputs.upload_url }} @@ -58,12 +74,6 @@ jobs: - name: Checkout uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - name: Prepare tooling - run: | - URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.4/tera-cli_linux_amd64.deb - wget $URL -O tera.deb - sudo dpkg -i tera.deb - - name: Download artifacts uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 @@ -151,18 +161,29 @@ jobs: asset_content_type: application/wasm publish-binaries: - needs: [ build-frame-omni-bencher, publish-release-draft ] + needs: [ prepare-tooling, publish-release-draft ] continue-on-error: true runs-on: ubuntu-latest strategy: matrix: - binary: [frame-omni-bencher] + binary: [frame-omni-bencher, chain-spec-builder] steps: - - name: Download artifacts - uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - with: - name: ${{ matrix.binary }} + # - name: Download artifacts + # uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + # with: + # name: ${{ matrix.binary }} + + - name: Checkout sources + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + + - name: Build ${{ matrix.binary }} binary + run: | + package= ${{ matrix.binary }} + [[ ${{ matrix.binary }} ~= chain-spec-builder ]] && package=staging-${{ matrix.binary }} + + cargo build --locked --profile=production -p ${package} --bin ${{ matrix.binary }} + target/production/${{ matrix.binary }} --version - name: Upload ${{ matrix.binary }} binary uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 @@ -170,7 +191,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} - asset_path: ${{ github.workspace}}/${{ matrix.binary }} + asset_path: ${{ github.workspace}}/target/production/${{ matrix.binary }} asset_name: ${{ matrix.binary }} asset_content_type: application/octet-stream From c5950e97534529af35643d967844b1e2c74d5063 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 16:05:36 +0200 Subject: [PATCH 12/18] test uplaod bins --- .../release-30_publish_release_draft.yml | 148 +++++++++--------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 7499b90cc6d8..68d2a3f19a18 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -74,48 +74,48 @@ jobs: - name: Checkout uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - name: Download artifacts - uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - - - name: Prepare draft - id: draft - env: - RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ASSET_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/asset-hub-rococo-runtime/asset-hub-rococo-srtool-digest.json - ASSET_HUB_WESTEND_DIGEST: ${{ github.workspace}}/asset-hub-westend-runtime/asset-hub-westend-srtool-digest.json - BRIDGE_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/bridge-hub-rococo-runtime/bridge-hub-rococo-srtool-digest.json - BRIDGE_HUB_WESTEND_DIGEST: ${{ github.workspace}}/bridge-hub-westend-runtime/bridge-hub-westend-srtool-digest.json - COLLECTIVES_WESTEND_DIGEST: ${{ github.workspace}}/collectives-westend-runtime/collectives-westend-srtool-digest.json - CONTRACTS_ROCOCO_DIGEST: ${{ github.workspace}}/contracts-rococo-runtime/contracts-rococo-srtool-digest.json - CORETIME_ROCOCO_DIGEST: ${{ github.workspace}}/coretime-rococo-runtime/coretime-rococo-srtool-digest.json - CORETIME_WESTEND_DIGEST: ${{ github.workspace}}/coretime-westend-runtime/coretime-westend-srtool-digest.json - GLUTTON_WESTEND_DIGEST: ${{ github.workspace}}/glutton-westend-runtime/glutton-westend-srtool-digest.json - PEOPLE_ROCOCO_DIGEST: ${{ github.workspace}}/people-rococo-runtime/people-rococo-srtool-digest.json - PEOPLE_WESTEND_DIGEST: ${{ github.workspace}}/people-westend-runtime/people-westend-srtool-digest.json - ROCOCO_DIGEST: ${{ github.workspace}}/rococo-runtime/rococo-srtool-digest.json - WESTEND_DIGEST: ${{ github.workspace}}/westend-runtime/westend-srtool-digest.json - run: | - . ./.github/scripts/common/lib.sh - - export REF1=$(get_latest_release_tag) - if [[ -z "${{ inputs.version }}" ]]; then - export REF2="${{ github.ref_name }}" - else - export REF2="${{ inputs.version }}" - fi - echo "REL_TAG=$REF2" >> $GITHUB_ENV - export VERSION=$(echo "$REF2" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/') - - ./scripts/release/build-changelogs.sh + # - name: Download artifacts + # uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - - name: Archive artifact context.json - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - with: - name: release-notes-context - path: | - scripts/release/context.json - **/*-srtool-digest.json + # - name: Prepare draft + # id: draft + # env: + # RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # ASSET_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/asset-hub-rococo-runtime/asset-hub-rococo-srtool-digest.json + # ASSET_HUB_WESTEND_DIGEST: ${{ github.workspace}}/asset-hub-westend-runtime/asset-hub-westend-srtool-digest.json + # BRIDGE_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/bridge-hub-rococo-runtime/bridge-hub-rococo-srtool-digest.json + # BRIDGE_HUB_WESTEND_DIGEST: ${{ github.workspace}}/bridge-hub-westend-runtime/bridge-hub-westend-srtool-digest.json + # COLLECTIVES_WESTEND_DIGEST: ${{ github.workspace}}/collectives-westend-runtime/collectives-westend-srtool-digest.json + # CONTRACTS_ROCOCO_DIGEST: ${{ github.workspace}}/contracts-rococo-runtime/contracts-rococo-srtool-digest.json + # CORETIME_ROCOCO_DIGEST: ${{ github.workspace}}/coretime-rococo-runtime/coretime-rococo-srtool-digest.json + # CORETIME_WESTEND_DIGEST: ${{ github.workspace}}/coretime-westend-runtime/coretime-westend-srtool-digest.json + # GLUTTON_WESTEND_DIGEST: ${{ github.workspace}}/glutton-westend-runtime/glutton-westend-srtool-digest.json + # PEOPLE_ROCOCO_DIGEST: ${{ github.workspace}}/people-rococo-runtime/people-rococo-srtool-digest.json + # PEOPLE_WESTEND_DIGEST: ${{ github.workspace}}/people-westend-runtime/people-westend-srtool-digest.json + # ROCOCO_DIGEST: ${{ github.workspace}}/rococo-runtime/rococo-srtool-digest.json + # WESTEND_DIGEST: ${{ github.workspace}}/westend-runtime/westend-srtool-digest.json + # run: | + # . ./.github/scripts/common/lib.sh + + # export REF1=$(get_latest_release_tag) + # if [[ -z "${{ inputs.version }}" ]]; then + # export REF2="${{ github.ref_name }}" + # else + # export REF2="${{ inputs.version }}" + # fi + # echo "REL_TAG=$REF2" >> $GITHUB_ENV + # export VERSION=$(echo "$REF2" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/') + + # ./scripts/release/build-changelogs.sh + + # - name: Archive artifact context.json + # uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + # with: + # name: release-notes-context + # path: | + # scripts/release/context.json + # **/*-srtool-digest.json - name: Create draft release id: create-release @@ -125,40 +125,40 @@ jobs: with: tag_name: ${{ env.REL_TAG }} release_name: Polkadot ${{ env.REL_TAG }} - body_path: ${{ github.workspace}}/scripts/release/RELEASE_DRAFT.md + # body_path: ${{ github.workspace}}/scripts/release/RELEASE_DRAFT.md draft: true - publish-runtimes: - needs: [ build-runtimes, publish-release-draft ] - continue-on-error: true - runs-on: ubuntu-latest - strategy: - matrix: ${{ fromJSON(needs.build-runtimes.outputs.published_runtimes) }} - - steps: - - name: Checkout sources - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - - name: Download artifacts - uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - - - name: Get runtime info - env: - JSON: release-notes-context/${{ matrix.chain }}-runtime/${{ matrix.chain }}-srtool-digest.json - run: | - >>$GITHUB_ENV echo ASSET=$(find ${{ matrix.chain }}-runtime -name '*.compact.compressed.wasm') - >>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion) - - - name: Upload compressed ${{ matrix.chain }} v${{ env.SPEC }} wasm - if: ${{ matrix.chain != 'rococo-parachain' }} - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} - asset_path: ${{ env.ASSET }} - asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm - asset_content_type: application/wasm + # publish-runtimes: + # needs: [ build-runtimes, publish-release-draft ] + # continue-on-error: true + # runs-on: ubuntu-latest + # strategy: + # matrix: ${{ fromJSON(needs.build-runtimes.outputs.published_runtimes) }} + + # steps: + # - name: Checkout sources + # uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + + # - name: Download artifacts + # uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + + # - name: Get runtime info + # env: + # JSON: release-notes-context/${{ matrix.chain }}-runtime/${{ matrix.chain }}-srtool-digest.json + # run: | + # >>$GITHUB_ENV echo ASSET=$(find ${{ matrix.chain }}-runtime -name '*.compact.compressed.wasm') + # >>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion) + + # - name: Upload compressed ${{ matrix.chain }} v${{ env.SPEC }} wasm + # if: ${{ matrix.chain != 'rococo-parachain' }} + # uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} + # asset_path: ${{ env.ASSET }} + # asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm + # asset_content_type: application/wasm publish-binaries: needs: [ prepare-tooling, publish-release-draft ] @@ -179,7 +179,7 @@ jobs: - name: Build ${{ matrix.binary }} binary run: | - package= ${{ matrix.binary }} + package=${{ matrix.binary }} [[ ${{ matrix.binary }} ~= chain-spec-builder ]] && package=staging-${{ matrix.binary }} cargo build --locked --profile=production -p ${package} --bin ${{ matrix.binary }} From 2d965e3b3cf47a9056bbca12bc14605ed9b8aa9d Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 16:12:24 +0200 Subject: [PATCH 13/18] test --- .github/workflows/release-30_publish_release_draft.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 68d2a3f19a18..0cd3dae306ff 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -34,10 +34,10 @@ jobs: sudo apt update sudo apt install -y protobuf-compiler - build-runtimes: - uses: "./.github/workflows/release-srtool.yml" - with: - excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template" + # build-runtimes: + # uses: "./.github/workflows/release-srtool.yml" + # with: + # excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template" # build-binaries: # runs-on: ubuntu-latest From 387af96370e24f8ffdadbb9dd24aefaa880c2147 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 16:13:35 +0200 Subject: [PATCH 14/18] test --- .github/workflows/release-30_publish_release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 0cd3dae306ff..7d4218ae85e0 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -66,7 +66,7 @@ jobs: publish-release-draft: runs-on: ubuntu-latest - needs: [ get-rust-versions, prepare-tooling, build-runtimes ] + needs: [ get-rust-versions, prepare-tooling ] outputs: release_url: ${{ steps.create-release.outputs.html_url }} asset_upload_url: ${{ steps.create-release.outputs.upload_url }} From 6ede5bf67a1462d10b81e11a996d50e2c2130394 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 16:29:41 +0200 Subject: [PATCH 15/18] one more test --- .../release-30_publish_release_draft.yml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 7d4218ae85e0..9ccacfd16b33 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -77,11 +77,11 @@ jobs: # - name: Download artifacts # uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - # - name: Prepare draft - # id: draft - # env: - # RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }} - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Prepare draft + id: draft + env: + RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # ASSET_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/asset-hub-rococo-runtime/asset-hub-rococo-srtool-digest.json # ASSET_HUB_WESTEND_DIGEST: ${{ github.workspace}}/asset-hub-westend-runtime/asset-hub-westend-srtool-digest.json # BRIDGE_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/bridge-hub-rococo-runtime/bridge-hub-rococo-srtool-digest.json @@ -95,16 +95,16 @@ jobs: # PEOPLE_WESTEND_DIGEST: ${{ github.workspace}}/people-westend-runtime/people-westend-srtool-digest.json # ROCOCO_DIGEST: ${{ github.workspace}}/rococo-runtime/rococo-srtool-digest.json # WESTEND_DIGEST: ${{ github.workspace}}/westend-runtime/westend-srtool-digest.json - # run: | - # . ./.github/scripts/common/lib.sh - - # export REF1=$(get_latest_release_tag) - # if [[ -z "${{ inputs.version }}" ]]; then - # export REF2="${{ github.ref_name }}" - # else - # export REF2="${{ inputs.version }}" - # fi - # echo "REL_TAG=$REF2" >> $GITHUB_ENV + run: | + . ./.github/scripts/common/lib.sh + + export REF1=$(get_latest_release_tag) + if [[ -z "${{ inputs.version }}" ]]; then + export REF2="${{ github.ref_name }}" + else + export REF2="${{ inputs.version }}" + fi + echo "REL_TAG=$REF2" >> $GITHUB_ENV # export VERSION=$(echo "$REF2" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/') # ./scripts/release/build-changelogs.sh From 683e1d399dc77a340034e36f1565f9ba2e08fe43 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 17:30:06 +0200 Subject: [PATCH 16/18] reorg flow --- .../release-30_publish_release_draft.yml | 191 +++++++++--------- 1 file changed, 90 insertions(+), 101 deletions(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 9ccacfd16b33..1ce691a5b016 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -34,39 +34,39 @@ jobs: sudo apt update sudo apt install -y protobuf-compiler - # build-runtimes: - # uses: "./.github/workflows/release-srtool.yml" - # with: - # excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template" - - # build-binaries: - # runs-on: ubuntu-latest - # needs: [ prepare-tooling ] - # strategy: - # matrix: - # binary: [ frame-omni-bencher, chain-spec-builder ] - # steps: - # - name: Checkout sources - # uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - # - name: Build ${{ matrix.binary }} binary - # run: | - # package= ${{ matrix.binary }} - # [[ ${{ matrix.binary }} ~= chain-spec-builder ]] && package=staging-${{ matrix.binary }} - - # cargo build --locked --profile=production -p ${package} --bin ${{ matrix.binary }} - # target/production/${{ matrix.binary }} --version - - # - name: Upload ${{ matrix.binary }} binary - # uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - # with: - # name: ${{ matrix.binary }} - # path: target/production/${{ matrix.binary }} + build-runtimes: + uses: "./.github/workflows/release-srtool.yml" + with: + excluded_runtimes: "substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template" + + build-binaries: + runs-on: ubuntu-latest + needs: [ prepare-tooling ] + strategy: + matrix: + binary: [ frame-omni-bencher, chain-spec-builder ] + steps: + - name: Checkout sources + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + + - name: Build ${{ matrix.binary }} binary + run: | + package=${{ matrix.binary }} + [[ ${{ matrix.binary }} =~ chain-spec-builder ]] && package=staging-${{ matrix.binary }} + + cargo build --locked --profile=production -p ${package} --bin ${{ matrix.binary }} + target/production/${{ matrix.binary }} --version + + - name: Upload ${{ matrix.binary }} binary + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + with: + name: ${{ matrix.binary }} + path: target/production/${{ matrix.binary }} publish-release-draft: runs-on: ubuntu-latest - needs: [ get-rust-versions, prepare-tooling ] + needs: [ get-rust-versions, prepare-tooling, build-runtimes ] outputs: release_url: ${{ steps.create-release.outputs.html_url }} asset_upload_url: ${{ steps.create-release.outputs.upload_url }} @@ -74,27 +74,27 @@ jobs: - name: Checkout uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - # - name: Download artifacts - # uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + - name: Download artifacts + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - name: Prepare draft id: draft env: RUSTC_STABLE: ${{ needs.get-rust-versions.outputs.rustc-stable }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # ASSET_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/asset-hub-rococo-runtime/asset-hub-rococo-srtool-digest.json - # ASSET_HUB_WESTEND_DIGEST: ${{ github.workspace}}/asset-hub-westend-runtime/asset-hub-westend-srtool-digest.json - # BRIDGE_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/bridge-hub-rococo-runtime/bridge-hub-rococo-srtool-digest.json - # BRIDGE_HUB_WESTEND_DIGEST: ${{ github.workspace}}/bridge-hub-westend-runtime/bridge-hub-westend-srtool-digest.json - # COLLECTIVES_WESTEND_DIGEST: ${{ github.workspace}}/collectives-westend-runtime/collectives-westend-srtool-digest.json - # CONTRACTS_ROCOCO_DIGEST: ${{ github.workspace}}/contracts-rococo-runtime/contracts-rococo-srtool-digest.json - # CORETIME_ROCOCO_DIGEST: ${{ github.workspace}}/coretime-rococo-runtime/coretime-rococo-srtool-digest.json - # CORETIME_WESTEND_DIGEST: ${{ github.workspace}}/coretime-westend-runtime/coretime-westend-srtool-digest.json - # GLUTTON_WESTEND_DIGEST: ${{ github.workspace}}/glutton-westend-runtime/glutton-westend-srtool-digest.json - # PEOPLE_ROCOCO_DIGEST: ${{ github.workspace}}/people-rococo-runtime/people-rococo-srtool-digest.json - # PEOPLE_WESTEND_DIGEST: ${{ github.workspace}}/people-westend-runtime/people-westend-srtool-digest.json - # ROCOCO_DIGEST: ${{ github.workspace}}/rococo-runtime/rococo-srtool-digest.json - # WESTEND_DIGEST: ${{ github.workspace}}/westend-runtime/westend-srtool-digest.json + ASSET_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/asset-hub-rococo-runtime/asset-hub-rococo-srtool-digest.json + ASSET_HUB_WESTEND_DIGEST: ${{ github.workspace}}/asset-hub-westend-runtime/asset-hub-westend-srtool-digest.json + BRIDGE_HUB_ROCOCO_DIGEST: ${{ github.workspace}}/bridge-hub-rococo-runtime/bridge-hub-rococo-srtool-digest.json + BRIDGE_HUB_WESTEND_DIGEST: ${{ github.workspace}}/bridge-hub-westend-runtime/bridge-hub-westend-srtool-digest.json + COLLECTIVES_WESTEND_DIGEST: ${{ github.workspace}}/collectives-westend-runtime/collectives-westend-srtool-digest.json + CONTRACTS_ROCOCO_DIGEST: ${{ github.workspace}}/contracts-rococo-runtime/contracts-rococo-srtool-digest.json + CORETIME_ROCOCO_DIGEST: ${{ github.workspace}}/coretime-rococo-runtime/coretime-rococo-srtool-digest.json + CORETIME_WESTEND_DIGEST: ${{ github.workspace}}/coretime-westend-runtime/coretime-westend-srtool-digest.json + GLUTTON_WESTEND_DIGEST: ${{ github.workspace}}/glutton-westend-runtime/glutton-westend-srtool-digest.json + PEOPLE_ROCOCO_DIGEST: ${{ github.workspace}}/people-rococo-runtime/people-rococo-srtool-digest.json + PEOPLE_WESTEND_DIGEST: ${{ github.workspace}}/people-westend-runtime/people-westend-srtool-digest.json + ROCOCO_DIGEST: ${{ github.workspace}}/rococo-runtime/rococo-srtool-digest.json + WESTEND_DIGEST: ${{ github.workspace}}/westend-runtime/westend-srtool-digest.json run: | . ./.github/scripts/common/lib.sh @@ -105,17 +105,17 @@ jobs: export REF2="${{ inputs.version }}" fi echo "REL_TAG=$REF2" >> $GITHUB_ENV - # export VERSION=$(echo "$REF2" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/') + export VERSION=$(echo "$REF2" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+).*$/\1/') - # ./scripts/release/build-changelogs.sh + ./scripts/release/build-changelogs.sh - # - name: Archive artifact context.json - # uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 - # with: - # name: release-notes-context - # path: | - # scripts/release/context.json - # **/*-srtool-digest.json + - name: Archive artifact context.json + uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 + with: + name: release-notes-context + path: | + scripts/release/context.json + **/*-srtool-digest.json - name: Create draft release id: create-release @@ -125,65 +125,54 @@ jobs: with: tag_name: ${{ env.REL_TAG }} release_name: Polkadot ${{ env.REL_TAG }} - # body_path: ${{ github.workspace}}/scripts/release/RELEASE_DRAFT.md + body_path: ${{ github.workspace}}/scripts/release/RELEASE_DRAFT.md draft: true - # publish-runtimes: - # needs: [ build-runtimes, publish-release-draft ] - # continue-on-error: true - # runs-on: ubuntu-latest - # strategy: - # matrix: ${{ fromJSON(needs.build-runtimes.outputs.published_runtimes) }} - - # steps: - # - name: Checkout sources - # uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - # - name: Download artifacts - # uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - - # - name: Get runtime info - # env: - # JSON: release-notes-context/${{ matrix.chain }}-runtime/${{ matrix.chain }}-srtool-digest.json - # run: | - # >>$GITHUB_ENV echo ASSET=$(find ${{ matrix.chain }}-runtime -name '*.compact.compressed.wasm') - # >>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion) - - # - name: Upload compressed ${{ matrix.chain }} v${{ env.SPEC }} wasm - # if: ${{ matrix.chain != 'rococo-parachain' }} - # uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} - # asset_path: ${{ env.ASSET }} - # asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm - # asset_content_type: application/wasm - - publish-binaries: - needs: [ prepare-tooling, publish-release-draft ] + publish-runtimes: + needs: [ build-runtimes, publish-release-draft ] continue-on-error: true runs-on: ubuntu-latest strategy: - matrix: - binary: [frame-omni-bencher, chain-spec-builder] + matrix: ${{ fromJSON(needs.build-runtimes.outputs.published_runtimes) }} steps: - # - name: Download artifacts - # uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 - # with: - # name: ${{ matrix.binary }} - - name: Checkout sources uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - - name: Build ${{ matrix.binary }} binary + - name: Download artifacts + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + + - name: Get runtime info + env: + JSON: release-notes-context/${{ matrix.chain }}-runtime/${{ matrix.chain }}-srtool-digest.json run: | - package=${{ matrix.binary }} - [[ ${{ matrix.binary }} ~= chain-spec-builder ]] && package=staging-${{ matrix.binary }} + >>$GITHUB_ENV echo ASSET=$(find ${{ matrix.chain }}-runtime -name '*.compact.compressed.wasm') + >>$GITHUB_ENV echo SPEC=$(<${JSON} jq -r .runtimes.compact.subwasm.core_version.specVersion) - cargo build --locked --profile=production -p ${package} --bin ${{ matrix.binary }} - target/production/${{ matrix.binary }} --version + - name: Upload compressed ${{ matrix.chain }} v${{ env.SPEC }} wasm + if: ${{ matrix.chain != 'rococo-parachain' }} + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} + asset_path: ${{ env.ASSET }} + asset_name: ${{ matrix.chain }}_runtime-v${{ env.SPEC }}.compact.compressed.wasm + asset_content_type: application/wasm + + publish-binaries: + needs: [ publish-release-draft, build-binaries ] + continue-on-error: true + runs-on: ubuntu-latest + strategy: + matrix: + binary: [frame-omni-bencher, chain-spec-builder] + + steps: + - name: Download artifacts + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + with: + name: ${{ matrix.binary }} - name: Upload ${{ matrix.binary }} binary uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 #v1.0.2 @@ -191,7 +180,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.publish-release-draft.outputs.asset_upload_url }} - asset_path: ${{ github.workspace}}/target/production/${{ matrix.binary }} + asset_path: ${{ github.workspace}}/${{ matrix.binary }} asset_name: ${{ matrix.binary }} asset_content_type: application/octet-stream From f171a3c60e441f3307501613ac05482bd3f9b4aa Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 22:01:34 +0200 Subject: [PATCH 17/18] reorg tools installation --- .../release-30_publish_release_draft.yml | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 1ce691a5b016..bf2b99d54f5f 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -22,18 +22,6 @@ jobs: RUST_STABLE_VERSION=$(curl -sS https://raw.githubusercontent.com/paritytech/scripts/master/dockerfiles/ci-unified/Dockerfile | grep -oP 'ARG RUST_STABLE_VERSION=\K[^ ]+') echo "stable=$RUST_STABLE_VERSION" >> $GITHUB_OUTPUT - prepare-tooling: - runs-on: ubuntu-latest - steps: - - name: Prepare tooling - run: | - URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.4/tera-cli_linux_amd64.deb - wget $URL -O tera.deb - sudo dpkg -i tera.deb - - sudo apt update - sudo apt install -y protobuf-compiler - build-runtimes: uses: "./.github/workflows/release-srtool.yml" with: @@ -41,7 +29,6 @@ jobs: build-binaries: runs-on: ubuntu-latest - needs: [ prepare-tooling ] strategy: matrix: binary: [ frame-omni-bencher, chain-spec-builder ] @@ -49,6 +36,11 @@ jobs: - name: Checkout sources uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - name: Install protobuf-compiler + run: | + sudo apt update + sudo apt install -y protobuf-compiler + - name: Build ${{ matrix.binary }} binary run: | package=${{ matrix.binary }} @@ -66,7 +58,7 @@ jobs: publish-release-draft: runs-on: ubuntu-latest - needs: [ get-rust-versions, prepare-tooling, build-runtimes ] + needs: [ get-rust-versions, build-runtimes ] outputs: release_url: ${{ steps.create-release.outputs.html_url }} asset_upload_url: ${{ steps.create-release.outputs.upload_url }} @@ -77,6 +69,12 @@ jobs: - name: Download artifacts uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + - name: Prepare tooling + run: | + URL=https://github.com/chevdor/tera-cli/releases/download/v0.2.4/tera-cli_linux_amd64.deb + wget $URL -O tera.deb + sudo dpkg -i tera.deb + - name: Prepare draft id: draft env: From 7aa822d6724e8a68c4960b4d78062bbe238a360d Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Fri, 24 May 2024 22:49:51 +0200 Subject: [PATCH 18/18] build bins separately --- .../workflows/release-30_publish_release_draft.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index bf2b99d54f5f..f39eb4c1716e 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -43,11 +43,13 @@ jobs: - name: Build ${{ matrix.binary }} binary run: | - package=${{ matrix.binary }} - [[ ${{ matrix.binary }} =~ chain-spec-builder ]] && package=staging-${{ matrix.binary }} - - cargo build --locked --profile=production -p ${package} --bin ${{ matrix.binary }} - target/production/${{ matrix.binary }} --version + if [[ ${{ matrix.binary }} =~ chain-spec-builder ]]; then + cargo build --locked --profile=production -p staging-${{ matrix.binary }} --bin ${{ matrix.binary }} + target/production/${{ matrix.binary }} -h + else + cargo build --locked --profile=production -p ${{ matrix.binary }} + target/production/${{ matrix.binary }} --version + fi - name: Upload ${{ matrix.binary }} binary uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1