From 6988d7516f80ef0f599474ec74953535e9a73a7a Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 11:39:44 +0200 Subject: [PATCH 01/15] ci: Pin the srtool action and image of the runtime release The release built with chevdor/srtool-actions@v0.9.2 and the srtool image tag 1.81.0, both of which can be moved to other content. Pin the action to its v0.9.2 commit and the image to 1.81.0-0.17.0 by digest (the image the current releases were built with; the action pulls :, so the tag input carries the digest), and name the pinned image in the release notes so the build can be reproduced with it. --- .github/workflows/release.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2ad0f5b7..5b1200dfc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,10 +3,10 @@ # # The wasm that goes into a runtime-upgrade referendum must be reproducible: # anyone with the same commit, srtool image and build options must arrive at -# the same hash. This job builds the runtime inside the pinned srtool image -# (rustc matching rust-toolchain.toml), records the srtool/subwasm report, -# and — when a release tag is known — attaches the compressed wasm and the -# report to the GitHub release for that tag. +# the same hash. This job builds the runtime inside the srtool image pinned +# by digest (rustc matching rust-toolchain.toml), records the srtool/subwasm +# report, and — when a release tag is known — attaches the compressed wasm +# and the report to the GitHub release for that tag. # # Usage: # * Push a tag `pendulum-release-` (or `amplitude-release-`) on @@ -44,6 +44,9 @@ jobs: # their signed extensions; without the embedded metadata hash every # transaction signed with it (mode 1, as Ledger signs) is rejected. BUILD_OPTS: --features metadata-hash + # The srtool image (rustc 1.81.0), pinned by digest so a moved tag cannot + # change the build. + SRTOOL_IMAGE_TAG: 1.81.0-0.17.0@sha256:9cff8845b2640c89524f4df6f176c43d55b02d0e75ba58dd517d501b33e26f1a steps: - name: Resolve chain and tag id: meta @@ -90,11 +93,12 @@ jobs: - name: Build with srtool id: srtool - uses: chevdor/srtool-actions@v0.9.2 + uses: chevdor/srtool-actions@48e9baed50ca414936dfac59d34d8b9bbe581abd # v0.9.2 with: package: ${{ steps.meta.outputs.chain }}-runtime runtime_dir: runtime/${{ steps.meta.outputs.chain }} - tag: "1.81.0" + # The action runs :, so the tag carries the digest. + tag: ${{ env.SRTOOL_IMAGE_TAG }} - name: Check that the metadata hash is embedded shell: bash @@ -119,7 +123,7 @@ jobs: { echo "## ${{ steps.meta.outputs.chain }} runtime — srtool build" echo - echo "Commit: \`${{ steps.commit.outputs.sha }}\` · srtool image: \`paritytech/srtool:1.81.0\` · BUILD_OPTS: \`$BUILD_OPTS\` · reproduce with the same commit, image and BUILD_OPTS." + echo "Commit: \`${{ steps.commit.outputs.sha }}\` · srtool image: \`paritytech/srtool:$SRTOOL_IMAGE_TAG\` · BUILD_OPTS: \`$BUILD_OPTS\` · reproduce with the same commit, image and BUILD_OPTS." echo echo "For \`parachainSystem.authorizeUpgrade\` use **\`blake2_256\`** below (the code hash the chain recomputes from the wasm at enactment); \`proposal_hash\` is the preimage hash of a \`system.setCode\` call and \`parachain_authorize_upgrade_hash\` is derived from the authorize call — neither is the value to authorize." echo From f3ce428637d7941e4389632e3e57436f25c20205 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 11:40:41 +0200 Subject: [PATCH 02/15] ci: Publish runtime releases from a separate job The release ran in one job with a contents: write token, which the checkout also stored in the workspace that the srtool container mounts. Build in a job with the read-only default and without persisted credentials, and pass the wasm, report and release notes as an artifact to a publish job that alone holds contents: write and runs only when a release tag is known. Event values, workflow inputs and the srtool outputs reach the shell steps through env instead of being expanded into the scripts. --- .github/workflows/release.yml | 74 +++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b1200dfc..3cfa7dff1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,10 +3,11 @@ # # The wasm that goes into a runtime-upgrade referendum must be reproducible: # anyone with the same commit, srtool image and build options must arrive at -# the same hash. This job builds the runtime inside the srtool image pinned -# by digest (rustc matching rust-toolchain.toml), records the srtool/subwasm -# report, and — when a release tag is known — attaches the compressed wasm -# and the report to the GitHub release for that tag. +# the same hash. The build job builds the runtime inside the srtool image +# pinned by digest (rustc matching rust-toolchain.toml) and records the +# srtool/subwasm report; when a release tag is known, the publish job (the +# only one with write access) attaches the compressed wasm and the report to +# the GitHub release for that tag. # # Usage: # * Push a tag `pendulum-release-` (or `amplitude-release-`) on @@ -33,12 +34,17 @@ on: required: false default: "" +permissions: + contents: read + jobs: build: name: srtool build runs-on: ubuntu-latest - permissions: - contents: write + outputs: + chain: ${{ steps.meta.outputs.chain }} + tag: ${{ steps.meta.outputs.tag }} + sha: ${{ steps.commit.outputs.sha }} env: # srtool passes this to cargo. The runtimes keep CheckMetadataHash in # their signed extensions; without the embedded metadata hash every @@ -51,13 +57,16 @@ jobs: - name: Resolve chain and tag id: meta shell: bash + env: + INPUT_TAG: ${{ github.event.inputs.tag }} + INPUT_CHAIN: ${{ github.event.inputs.chain }} run: | - if [ "${{ github.event_name }}" = "push" ]; then - TAG="${{ github.ref_name }}" + if [ "$GITHUB_EVENT_NAME" = "push" ]; then + TAG="$GITHUB_REF_NAME" CHAIN="${TAG%%-release-*}" else - TAG="${{ github.event.inputs.tag }}" - CHAIN="${{ github.event.inputs.chain }}" + TAG="$INPUT_TAG" + CHAIN="$INPUT_CHAIN" fi case "$CHAIN" in pendulum|amplitude) ;; @@ -70,12 +79,14 @@ jobs: fi echo "chain=$CHAIN" >> "$GITHUB_OUTPUT" echo "tag=$TAG" >> "$GITHUB_OUTPUT" - echo "ref=${TAG:-${{ github.ref }}}" >> "$GITHUB_OUTPUT" + echo "ref=${TAG:-$GITHUB_REF}" >> "$GITHUB_OUTPUT" - uses: actions/checkout@v5 with: ref: ${{ steps.meta.outputs.ref }} fetch-depth: 0 + # The srtool container mounts the workspace; keep the token out of it. + persist-credentials: false - name: Check the commit to build id: commit @@ -118,22 +129,27 @@ jobs: - name: Record the srtool report shell: bash + env: + CHAIN: ${{ steps.meta.outputs.chain }} + SHA: ${{ steps.commit.outputs.sha }} + SRTOOL_JSON: ${{ steps.srtool.outputs.json }} + WASM_COMPRESSED: ${{ steps.srtool.outputs.wasm_compressed }} run: | - echo '${{ steps.srtool.outputs.json }}' | jq . > srtool-${{ steps.meta.outputs.chain }}.json + printf '%s\n' "$SRTOOL_JSON" | jq . > "srtool-$CHAIN.json" { - echo "## ${{ steps.meta.outputs.chain }} runtime — srtool build" + echo "## $CHAIN runtime — srtool build" echo - echo "Commit: \`${{ steps.commit.outputs.sha }}\` · srtool image: \`paritytech/srtool:$SRTOOL_IMAGE_TAG\` · BUILD_OPTS: \`$BUILD_OPTS\` · reproduce with the same commit, image and BUILD_OPTS." + echo "Commit: \`$SHA\` · srtool image: \`paritytech/srtool:$SRTOOL_IMAGE_TAG\` · BUILD_OPTS: \`$BUILD_OPTS\` · reproduce with the same commit, image and BUILD_OPTS." echo echo "For \`parachainSystem.authorizeUpgrade\` use **\`blake2_256\`** below (the code hash the chain recomputes from the wasm at enactment); \`proposal_hash\` is the preimage hash of a \`system.setCode\` call and \`parachain_authorize_upgrade_hash\` is derived from the authorize call — neither is the value to authorize." echo echo '```json' - jq '.runtimes.compressed.subwasm // .' srtool-${{ steps.meta.outputs.chain }}.json + jq '.runtimes.compressed.subwasm // .' "srtool-$CHAIN.json" echo '```' } > release-notes.md cat release-notes.md >> "$GITHUB_STEP_SUMMARY" - cp "${{ steps.srtool.outputs.wasm_compressed }}" ./${{ steps.meta.outputs.chain }}_runtime.compact.compressed.wasm - sha256sum ./${{ steps.meta.outputs.chain }}_runtime.compact.compressed.wasm | tee -a release-notes.md + cp "$WASM_COMPRESSED" "./${CHAIN}_runtime.compact.compressed.wasm" + sha256sum "./${CHAIN}_runtime.compact.compressed.wasm" | tee -a release-notes.md - uses: actions/upload-artifact@v4 with: @@ -144,13 +160,23 @@ jobs: release-notes.md if-no-files-found: error - - name: Publish the GitHub release - if: steps.meta.outputs.tag != '' - uses: softprops/action-gh-release@v2 + publish: + name: Publish the GitHub release + needs: build + if: needs.build.outputs.tag != '' + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/download-artifact@v4 + with: + name: ${{ needs.build.outputs.chain }}-runtime-${{ needs.build.outputs.sha }} + + - uses: softprops/action-gh-release@v2 with: - tag_name: ${{ steps.meta.outputs.tag }} - name: ${{ steps.meta.outputs.tag }} + tag_name: ${{ needs.build.outputs.tag }} + name: ${{ needs.build.outputs.tag }} body_path: release-notes.md files: | - ${{ steps.meta.outputs.chain }}_runtime.compact.compressed.wasm - srtool-${{ steps.meta.outputs.chain }}.json + ${{ needs.build.outputs.chain }}_runtime.compact.compressed.wasm + srtool-${{ needs.build.outputs.chain }}.json From 4affd15cb2f4c0ba2a6f9da056af2eb64c14588e Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 11:42:36 +0200 Subject: [PATCH 03/15] ci: Default workflows to a read-only token and pin actions by commit Give every workflow a contents: read default and grant more only to the job that needs it (the version-bump job pushes a branch and opens a pull request, so it gets contents and pull-requests write). Pin every third-party action, including those of the shared composite action, to a full commit SHA with its version as a comment, so a moved tag or branch cannot change what runs. Each pin is the commit its tag or branch resolves to now, except foundry-toolchain: v1 moved to v1.9.2 only hours ago, so it stays on v1.9.1 until that release has been reviewed. --- .github/actions/shared/action.yml | 4 ++-- .github/workflows/clippy-checks.yml | 9 ++++++--- .github/workflows/link-check.yml | 7 +++++-- .github/workflows/migration-tests.yml | 11 +++++++---- .github/workflows/release-node.yml | 5 ++++- .github/workflows/release.yml | 8 ++++---- .github/workflows/test-code.yml | 11 +++++++---- .github/workflows/version-up.yml | 14 ++++++++++---- 8 files changed, 45 insertions(+), 24 deletions(-) diff --git a/.github/actions/shared/action.yml b/.github/actions/shared/action.yml index 3ebf0215f..41e82d826 100644 --- a/.github/actions/shared/action.yml +++ b/.github/actions/shared/action.yml @@ -26,7 +26,7 @@ runs: # Free GitHub Actions Environment Disk Space - name: Maximize Build Space - uses: jlumbroso/free-disk-space@main + uses: jlumbroso/free-disk-space@36e9a5af4eddb91fc11aec4c6f6f79b3cc0cb523 # main with: tool-cache: false large-packages: false @@ -45,7 +45,7 @@ runs: # Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo - name: Cache cargo registry - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: | ~/.cargo/registry diff --git a/.github/workflows/clippy-checks.yml b/.github/workflows/clippy-checks.yml index e17d68e5f..1964f5405 100644 --- a/.github/workflows/clippy-checks.yml +++ b/.github/workflows/clippy-checks.yml @@ -6,18 +6,21 @@ on: branches: - main +permissions: + contents: read + jobs: clippy-checks: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - name: Free up Space and Installation uses: ./.github/actions/shared - name: Clippy -- Main - uses: actions-rs/cargo@v1 + uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 with: command: clippy # `manual_inspect` (clippy 1.81) fires inside the `#[pallet::pallet]` expansion of our @@ -25,7 +28,7 @@ jobs: args: --release --all-features -- -W clippy::all -A clippy::style -A clippy::manual_inspect -A forgetting_copy_types -A forgetting_references - name: Clippy -- All Targets (except integration) - uses: actions-rs/cargo@v1 + uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 with: command: clippy # We are a bit more forgiving when it comes to the code in tests and only check for correctness diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 02ee084d0..5b54e0827 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -8,12 +8,15 @@ on: branches: - main +permissions: + contents: read + jobs: markdown-link-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 - - uses: gaurav-nelson/github-action-markdown-link-check@v1 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + - uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368 # v1 with: use-quiet-mode: 'yes' config-file: '.github/workflows/mlc_config.json' diff --git a/.github/workflows/migration-tests.yml b/.github/workflows/migration-tests.yml index 2d2c5a5eb..19e066634 100644 --- a/.github/workflows/migration-tests.yml +++ b/.github/workflows/migration-tests.yml @@ -17,6 +17,9 @@ on: branches: - main +permissions: + contents: read + jobs: contracts: name: Foundry (contracts) @@ -25,11 +28,11 @@ jobs: run: working-directory: contracts steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: submodules: recursive - - uses: foundry-rs/foundry-toolchain@v1 + - uses: foundry-rs/foundry-toolchain@908c540300062bd5a7e473851cdb4282204cee09 # v1.9.1 with: version: stable @@ -50,9 +53,9 @@ jobs: run: working-directory: ${{ matrix.package }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 20 cache: npm diff --git a/.github/workflows/release-node.yml b/.github/workflows/release-node.yml index 4b0417a8d..a069d5998 100644 --- a/.github/workflows/release-node.yml +++ b/.github/workflows/release-node.yml @@ -8,6 +8,9 @@ on: branches: - 'main' +permissions: + contents: read + jobs: release_check: # This job will only run if: @@ -21,7 +24,7 @@ jobs: steps: - name: Check out repository code - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - name: Get Node Version id: get-version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3cfa7dff1..9382ce6c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,7 +81,7 @@ jobs: echo "tag=$TAG" >> "$GITHUB_OUTPUT" echo "ref=${TAG:-$GITHUB_REF}" >> "$GITHUB_OUTPUT" - - uses: actions/checkout@v5 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: ref: ${{ steps.meta.outputs.ref }} fetch-depth: 0 @@ -151,7 +151,7 @@ jobs: cp "$WASM_COMPRESSED" "./${CHAIN}_runtime.compact.compressed.wasm" sha256sum "./${CHAIN}_runtime.compact.compressed.wasm" | tee -a release-notes.md - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: ${{ steps.meta.outputs.chain }}-runtime-${{ steps.commit.outputs.sha }} path: | @@ -168,11 +168,11 @@ jobs: permissions: contents: write steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: name: ${{ needs.build.outputs.chain }}-runtime-${{ needs.build.outputs.sha }} - - uses: softprops/action-gh-release@v2 + - uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2 with: tag_name: ${{ needs.build.outputs.tag }} name: ${{ needs.build.outputs.tag }} diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 11025f6e1..22903b59c 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -6,6 +6,9 @@ on: branches: - main +permissions: + contents: read + jobs: test-code: runs-on: ubuntu-latest @@ -15,24 +18,24 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - name: Free up Space and Installation uses: ./.github/actions/shared - name: Install Protoc - uses: arduino/setup-protoc@v1 + uses: arduino/setup-protoc@149f6c87b92550901b26acd1632e11c3662e381f # v1.3.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Test - uses: actions-rs/cargo@v1 + uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 with: command: test args: --release - name: Test for Runtime Benchmarks - uses: actions-rs/cargo@v1 + uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 with: command: test args: --release --features=runtime-benchmarks,try-runtime \ No newline at end of file diff --git a/.github/workflows/version-up.yml b/.github/workflows/version-up.yml index 00a27aa97..9e6d1023b 100644 --- a/.github/workflows/version-up.yml +++ b/.github/workflows/version-up.yml @@ -23,13 +23,19 @@ on: type: boolean default: true +permissions: + contents: read + jobs: bump-version: runs-on: ubuntu-latest name: bump version + permissions: + contents: write + pull-requests: write steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: fetch-depth: 0 @@ -70,7 +76,7 @@ jobs: - name: "Read file contents" id: read-file - uses: juliangruber/read-file-action@v1 + uses: juliangruber/read-file-action@271ff311a4947af354c6abcd696a306553b9ec18 # v1.1.8 with: path: ./changes.txt @@ -85,7 +91,7 @@ jobs: - name: Put current date into a variable id: date-now - uses: Kaven-Universe/github-action-current-date-time@v1 + uses: Kaven-Universe/github-action-current-date-time@7c1d8465d1bfd7d35466d2ee82a8e460780561ae # v1.5.0 with: format: "yyyy-MM-dd" @@ -164,7 +170,7 @@ jobs: fi - name: Create Pull Request - uses: thomaseizinger/create-pull-request@master + uses: thomaseizinger/create-pull-request@84104598ab3d603b60080ddfabd783999765a992 # master with: github_token: ${{ secrets.GITHUB_TOKEN }} title: ${{ steps.pr-title.outputs.title }} From 9b48d51ecf6ca2b2a542827005ad50fe7b7a5f81 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 15:26:57 +0200 Subject: [PATCH 04/15] ci: Leave runtime releases that already have assets unchanged Before the release action runs, the publish job looks up the release for the tag and fails if it already has assets, so a later build of the same tag (with other build options or another image) cannot replace the published wasm, srtool report or notes. The release action also runs with overwrite_files: false, so it never deletes an attached asset, even one that another run added after the check. Publishing to such a release again requires removing its assets by hand. --- .github/workflows/release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9382ce6c4..b7b67caf5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -172,11 +172,29 @@ jobs: with: name: ${{ needs.build.outputs.chain }}-runtime-${{ needs.build.outputs.sha }} + # A published runtime is never rebuilt in place: a later build of the same + # tag (other build options or image) need not match the hash enacted on + # chain. Publishing again needs the old assets removed by hand. + - name: Refuse to change a release that already has assets + shell: bash + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ needs.build.outputs.tag }} + run: | + ASSETS="$(gh api --paginate "repos/$GITHUB_REPOSITORY/releases" \ + | jq -r -s --arg tag "$TAG" '[.[][] | select(.tag_name == $tag) | .assets[].name] | join(" ")')" + if [ -n "$ASSETS" ]; then + echo "::error::release $TAG already has assets ($ASSETS); refusing to change it" + exit 1 + fi + - uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2 with: tag_name: ${{ needs.build.outputs.tag }} name: ${{ needs.build.outputs.tag }} body_path: release-notes.md + # Never delete an attached asset, even one another run added after the check. + overwrite_files: false files: | ${{ needs.build.outputs.chain }}_runtime.compact.compressed.wasm srtool-${{ needs.build.outputs.chain }}.json From b7f33751eeda9083e794bb0ff19c708672149e47 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 15:27:06 +0200 Subject: [PATCH 05/15] ci: Accept only letters, digits, '.', '_' and '-' in a release tag A dispatched tag is free text that ends up in step outputs and log lines. The release workflow now fails before writing any output when the tag contains another character. Every existing release tag uses only these. --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7b67caf5..8e30db73e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,6 +68,10 @@ jobs: TAG="$INPUT_TAG" CHAIN="$INPUT_CHAIN" fi + # A dispatched tag is free text; it goes into step outputs and log lines. + case "$TAG" in + *[!A-Za-z0-9._-]*) echo "::error::a release tag may contain only letters, digits, '.', '_' and '-'"; exit 1 ;; + esac case "$CHAIN" in pendulum|amplitude) ;; *) echo "cannot derive the chain from '$TAG'; expected -release-"; exit 1 ;; From 9d7e56a412c79c807cb65fcb1c77fbeb9ea6ee36 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 15:27:06 +0200 Subject: [PATCH 06/15] ci: Let Dependabot update the actions pinned in the shared composite action With directory "/", the github-actions updater reads only the workflows and a root action.yml, so also list .github/actions/shared. --- .github/dependabot.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ece6934ed..1ee0050ff 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,6 +5,9 @@ updates: schedule: interval: "daily" - package-ecosystem: github-actions - directory: "/" + # "/" covers the workflows only; the composite action pins its own actions. + directories: + - "/" + - "/.github/actions/shared" schedule: interval: daily From c915ec78863d4acb4a47ee50590fc2837a322e10 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 15:27:06 +0200 Subject: [PATCH 07/15] ci: Pass workflow inputs and secrets to scripts through env The run scripts of version-up.yml and release-node.yml now read workflow inputs, step outputs and secrets from step env instead of having them expanded into the script text, and quote them where they are used. The version-up conditions compare the inputs with test expressions, so a bump without a specific version gets the "Bump crate version/s to " pull request title. --- .github/workflows/release-node.yml | 8 +++- .github/workflows/version-up.yml | 72 +++++++++++++++++++----------- 2 files changed, 52 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release-node.yml b/.github/workflows/release-node.yml index a069d5998..d2fa7632b 100644 --- a/.github/workflows/release-node.yml +++ b/.github/workflows/release-node.yml @@ -33,6 +33,10 @@ jobs: echo "version=${vers}" >> "$GITHUB_OUTPUT" - name: trigger gitlab + env: + GITLAB_TRIGGER: ${{ secrets.GITLAB_TRIGGER }} + PROJECT_ID: ${{ secrets.PROJECT_ID }} + VERSION: ${{ steps.get-version.outputs.version }} run: | - ls ${{ github.workspace }} - curl -X POST -F "token=${{ secrets.GITLAB_TRIGGER }}" -F "ref=development" -F "variables[PREPCOMPILE]=Y" -F "variables[COMPILE]=Y" -F "variables[COMPILEMOONBEAM]=N" -F "variables[DOCKER]=Y" -F "variables[DOCKERAMP]=Y" -F "variables[DEBIAN]=Y" -F "variables[TEMPUPLOAD]=Y" -F "variables[DOWNUPLOAD]=Y" -F "variables[PRODUPLOAD]=Y" -F "variables[VERSION]=${{ steps.get-version.outputs.version }}" https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline \ No newline at end of file + ls "$GITHUB_WORKSPACE" + curl -X POST -F "token=$GITLAB_TRIGGER" -F "ref=development" -F "variables[PREPCOMPILE]=Y" -F "variables[COMPILE]=Y" -F "variables[COMPILEMOONBEAM]=N" -F "variables[DOCKER]=Y" -F "variables[DOCKERAMP]=Y" -F "variables[DEBIAN]=Y" -F "variables[TEMPUPLOAD]=Y" -F "variables[DOWNUPLOAD]=Y" -F "variables[PRODUPLOAD]=Y" -F "variables[VERSION]=$VERSION" "https://gitlab.com/api/v4/projects/$PROJECT_ID/trigger/pipeline" \ No newline at end of file diff --git a/.github/workflows/version-up.yml b/.github/workflows/version-up.yml index 9e6d1023b..45277e896 100644 --- a/.github/workflows/version-up.yml +++ b/.github/workflows/version-up.yml @@ -52,26 +52,33 @@ jobs: - name: Check For Specific Version if: github.event.inputs.specific_version != '' + env: + SPECIFIC_VERSION: ${{ github.event.inputs.specific_version }} + PACKAGES_ALL: ${{ github.event.inputs.packages-all }} run: | - bash .github/scripts/package_version_up.sh ${{ github.event.inputs.specific_version }} - if ${{ github.event.inputs.packages-all }} == 'true'; then - echo "Upgrading crates to ${{ github.event.inputs.specific_version }}" &> changes.txt + bash .github/scripts/package_version_up.sh "$SPECIFIC_VERSION" + if [ "$PACKAGES_ALL" == 'true' ]; then + echo "Upgrading crates to $SPECIFIC_VERSION" &> changes.txt else - echo "Upgrading node to ${{ github.event.inputs.specific_version }}" &> changes.txt + echo "Upgrading node to $SPECIFIC_VERSION" &> changes.txt fi - name: ${{ github.event.inputs.versioning }} Version Up for all if: github.event.inputs.specific_version == '' && github.event.inputs.packages-all == 'true' continue-on-error: false + env: + VERSIONING: ${{ github.event.inputs.versioning }} run: | - cargo set-version --bump ${{ github.event.inputs.versioning }} &> changes.txt + cargo set-version --bump "$VERSIONING" &> changes.txt cat changes.txt - name: ${{ github.event.inputs.versioning }} Version Up for node if: github.event.inputs.specific_version == '' && github.event.inputs.packages-all == 'false' continue-on-error: false + env: + VERSIONING: ${{ github.event.inputs.versioning }} run: | - cargo set-version --bump ${{ github.event.inputs.versioning }} --package pendulum-node &> changes.txt + cargo set-version --bump "$VERSIONING" --package pendulum-node &> changes.txt cat changes.txt - name: "Read file contents" @@ -82,8 +89,10 @@ jobs: - name: Set Chosen Package id: set-pkg + env: + PACKAGES_ALL: ${{ github.event.inputs.packages-all }} run: | - if [ ${{ github.event.inputs.packages-all }} == 'true' ]; then + if [ "$PACKAGES_ALL" == 'true' ]; then echo "name=all" >> "$GITHUB_OUTPUT" else echo "name=node" >> "$GITHUB_OUTPUT" @@ -97,23 +106,30 @@ jobs: - name: Create Release Branch id: new-branch + env: + PKG: ${{ steps.set-pkg.outputs.name }} + DAY: ${{ steps.date-now.outputs.day }} + MONTH: ${{ steps.date-now.outputs.month }} + YEAR: ${{ steps.date-now.outputs.year }} + SPECIFIC_VERSION: ${{ github.event.inputs.specific_version }} + VERSIONING: ${{ github.event.inputs.versioning }} run: | - name=${{ steps.set-pkg.outputs.name }} - now="${{ steps.date-now.outputs.day }}-${{ steps.date-now.outputs.month }}-${{ steps.date-now.outputs.year }}" - - if [ '${{ github.event.inputs.specific_version }}' != '' ]; then - echo "specific version: ${{ github.event.inputs.specific_version }}" - branch_name="release/version-up-to-${{ github.event.inputs.specific_version }}-$name-$now" + name="$PKG" + now="$DAY-$MONTH-$YEAR" + + if [ "$SPECIFIC_VERSION" != '' ]; then + echo "specific version: $SPECIFIC_VERSION" + branch_name="release/version-up-to-$SPECIFIC_VERSION-$name-$now" else - vers=${{ github.event.inputs.versioning }} - echo "versioning: ${{ github.event.inputs.versioning }}" + vers="$VERSIONING" + echo "versioning: $VERSIONING" branch_name="release/$vers-version-up-$name-$now" fi - + echo "name=${branch_name}" >> "$GITHUB_OUTPUT" - - git checkout -b ${branch_name} - git push --set-upstream origin ${branch_name} + + git checkout -b "${branch_name}" + git push --set-upstream origin "${branch_name}" # todo: make this simpler. - name: Commit New Changes to New Branch (all) @@ -123,8 +139,8 @@ jobs: BRANCH: ${{ steps.new-branch.outputs.name }} run: | gh api graphql \ - -F githubRepository=${{ github.repository }} \ - -F branchName=${{ env.BRANCH }} \ + -F githubRepository="$GITHUB_REPOSITORY" \ + -F branchName="$BRANCH" \ -F expectedHeadOid=$(git rev-parse HEAD) \ -F commitMessage="$(cat changes.txt)" \ -F files[][path]="chain-extensions/common/Cargo.toml" -F files[][contents]=$(base64 -w0 chain-extensions/common/Cargo.toml) \ @@ -152,8 +168,8 @@ jobs: BRANCH: ${{ steps.new-branch.outputs.name }} run: | gh api graphql \ - -F githubRepository=${{ github.repository }} \ - -F branchName=${{ env.BRANCH }} \ + -F githubRepository="$GITHUB_REPOSITORY" \ + -F branchName="$BRANCH" \ -F expectedHeadOid=$(git rev-parse HEAD) \ -F commitMessage="$(cat changes.txt)" \ -F files[][path]="node/Cargo.toml" -F files[][contents]=$(base64 -w0 node/Cargo.toml) \ @@ -161,12 +177,16 @@ jobs: - name: Prepare Pull Request title id: pr-title + env: + SPECIFIC_VERSION: ${{ github.event.inputs.specific_version }} + PKG: ${{ steps.set-pkg.outputs.name }} + VERSIONING: ${{ github.event.inputs.versioning }} run: | - if ${{ github.event.inputs.specific_version }} == ''; then - echo "title=release: Bump ${{ steps.set-pkg.outputs.name }} crate version/s to ${{ github.event.inputs.versioning }}" >> "$GITHUB_OUTPUT" + if [ "$SPECIFIC_VERSION" == '' ]; then + echo "title=release: Bump $PKG crate version/s to $VERSIONING" >> "$GITHUB_OUTPUT" else vers=$( cargo metadata --format-version=1 --no-deps | jq '.packages[] | select(.name == "pendulum-node") | .version' | tr -d '"' ) - echo "title=release: Force bump ${{ steps.set-pkg.outputs.name }} version/s to $vers" >> "$GITHUB_OUTPUT" + echo "title=release: Force bump $PKG version/s to $vers" >> "$GITHUB_OUTPUT" fi - name: Create Pull Request From a496377906b2803f7bb90d01f16cfc6bd2c8f8a9 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 15:27:06 +0200 Subject: [PATCH 08/15] ci: Clarify the migration-tests description --- .github/workflows/migration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/migration-tests.yml b/.github/workflows/migration-tests.yml index 19e066634..51b0f75cf 100644 --- a/.github/workflows/migration-tests.yml +++ b/.github/workflows/migration-tests.yml @@ -3,7 +3,7 @@ name: Migration Tests # The PEN -> Base migration stack lives outside the Rust workspace: the # Foundry contracts and the three TypeScript daemons. `test-code.yml` covers # the pallet through `cargo test`; this job covers everything else, so a -# green check on the PR means the suites the review log cites actually ran. +# green check on the PR means the contract and daemon suites actually ran. on: pull_request: From 926a92cf7c29e0701711ed38521f42298fd61438 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 18:19:02 +0200 Subject: [PATCH 09/15] ci: Run cargo directly instead of the archived cargo action --- .github/workflows/clippy-checks.yml | 16 +++++----------- .github/workflows/test-code.yml | 10 ++-------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/clippy-checks.yml b/.github/workflows/clippy-checks.yml index 1964f5405..c25595cbb 100644 --- a/.github/workflows/clippy-checks.yml +++ b/.github/workflows/clippy-checks.yml @@ -20,19 +20,13 @@ jobs: uses: ./.github/actions/shared - name: Clippy -- Main - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 - with: - command: clippy - # `manual_inspect` (clippy 1.81) fires inside the `#[pallet::pallet]` expansion of our - # polkadot-sdk fork; the `deny(warnings)` pallets cannot allow it from the outside. - args: --release --all-features -- -W clippy::all -A clippy::style -A clippy::manual_inspect -A forgetting_copy_types -A forgetting_references + # `manual_inspect` (clippy 1.81) fires inside the `#[pallet::pallet]` expansion of our + # polkadot-sdk fork; the `deny(warnings)` pallets cannot allow it from the outside. + run: cargo clippy --release --all-features -- -W clippy::all -A clippy::style -A clippy::manual_inspect -A forgetting_copy_types -A forgetting_references - name: Clippy -- All Targets (except integration) - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 - with: - command: clippy - # We are a bit more forgiving when it comes to the code in tests and only check for correctness - args: --release --workspace --all-features --all-targets --exclude runtime-integration-tests -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references + # We are a bit more forgiving when it comes to the code in tests and only check for correctness + run: cargo clippy --release --workspace --all-features --all-targets --exclude runtime-integration-tests -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references # Disabled until we move to crates.io and fix runtime-integration-tests. # - name: Clippy -- Integration diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 22903b59c..8ec95ff21 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -29,13 +29,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Test - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 - with: - command: test - args: --release + run: cargo test --release - name: Test for Runtime Benchmarks - uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 - with: - command: test - args: --release --features=runtime-benchmarks,try-runtime \ No newline at end of file + run: cargo test --release --features=runtime-benchmarks,try-runtime From 98f90900692ac065d22230a88215e3d4490cfafe Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 18:19:02 +0200 Subject: [PATCH 10/15] ci: Describe the shared setup action --- .github/actions/shared/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/shared/action.yml b/.github/actions/shared/action.yml index 41e82d826..d60db78bf 100644 --- a/.github/actions/shared/action.yml +++ b/.github/actions/shared/action.yml @@ -1,4 +1,5 @@ name: 'Shared action' +description: 'Frees runner disk space, installs protobuf and caches the cargo registry' runs: using: "composite" steps: From 13b69b2c94e8549444512536810ceba2ebd2c695 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 18:19:02 +0200 Subject: [PATCH 11/15] ci: Quote command substitutions in the version bump workflow --- .github/workflows/version-up.yml | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/version-up.yml b/.github/workflows/version-up.yml index 45277e896..1dbf76256 100644 --- a/.github/workflows/version-up.yml +++ b/.github/workflows/version-up.yml @@ -141,24 +141,24 @@ jobs: gh api graphql \ -F githubRepository="$GITHUB_REPOSITORY" \ -F branchName="$BRANCH" \ - -F expectedHeadOid=$(git rev-parse HEAD) \ + -F expectedHeadOid="$(git rev-parse HEAD)" \ -F commitMessage="$(cat changes.txt)" \ - -F files[][path]="chain-extensions/common/Cargo.toml" -F files[][contents]=$(base64 -w0 chain-extensions/common/Cargo.toml) \ - -F files[][path]="chain-extensions/price/Cargo.toml" -F files[][contents]=$(base64 -w0 chain-extensions/price/Cargo.toml) \ - -F files[][path]="chain-extensions/token/Cargo.toml" -F files[][contents]=$(base64 -w0 chain-extensions/token/Cargo.toml) \ - -F files[][path]="node/Cargo.toml" -F files[][contents]=$(base64 -w0 node/Cargo.toml) \ - -F files[][path]="pallets/orml-currencies-allowance-extension/Cargo.toml" -F files[][contents]=$(base64 -w0 pallets/orml-currencies-allowance-extension/Cargo.toml) \ - -F files[][path]="pallets/orml-tokens-management-extension/Cargo.toml" -F files[][contents]=$(base64 -w0 pallets/orml-tokens-management-extension/Cargo.toml) \ - -F files[][path]="pallets/parachain-staking/Cargo.toml" -F files[][contents]=$(base64 -w0 pallets/parachain-staking/Cargo.toml) \ - -F files[][path]="pallets/parachain-staking/rpc/Cargo.toml" -F files[][contents]=$(base64 -w0 pallets/parachain-staking/rpc/Cargo.toml) \ - -F files[][path]="pallets/parachain-staking/rpc/runtime-api/Cargo.toml" -F files[][contents]=$(base64 -w0 pallets/parachain-staking/rpc/runtime-api/Cargo.toml) \ - -F files[][path]="pallets/treasury-buyout-extension/Cargo.toml" -F files[][contents]=$(base64 -w0 pallets/treasury-buyout-extension/Cargo.toml) \ - -F files[][path]="pallets/vesting-manager/Cargo.toml" -F files[][contents]=$(base64 -w0 pallets/vesting-manager/Cargo.toml) \ - -F files[][path]="runtime/amplitude/Cargo.toml" -F files[][contents]=$(base64 -w0 runtime/amplitude/Cargo.toml) \ - -F files[][path]="runtime/common/Cargo.toml" -F files[][contents]=$(base64 -w0 runtime/common/Cargo.toml) \ - -F files[][path]="runtime/foucoco/Cargo.toml" -F files[][contents]=$(base64 -w0 runtime/foucoco/Cargo.toml) \ - -F files[][path]="runtime/integration-tests/Cargo.toml" -F files[][contents]=$(base64 -w0 runtime/integration-tests/Cargo.toml) \ - -F files[][path]="runtime/pendulum/Cargo.toml" -F files[][contents]=$(base64 -w0 runtime/pendulum/Cargo.toml) \ + -F "files[][path]=chain-extensions/common/Cargo.toml" -F "files[][contents]=$(base64 -w0 chain-extensions/common/Cargo.toml)" \ + -F "files[][path]=chain-extensions/price/Cargo.toml" -F "files[][contents]=$(base64 -w0 chain-extensions/price/Cargo.toml)" \ + -F "files[][path]=chain-extensions/token/Cargo.toml" -F "files[][contents]=$(base64 -w0 chain-extensions/token/Cargo.toml)" \ + -F "files[][path]=node/Cargo.toml" -F "files[][contents]=$(base64 -w0 node/Cargo.toml)" \ + -F "files[][path]=pallets/orml-currencies-allowance-extension/Cargo.toml" -F "files[][contents]=$(base64 -w0 pallets/orml-currencies-allowance-extension/Cargo.toml)" \ + -F "files[][path]=pallets/orml-tokens-management-extension/Cargo.toml" -F "files[][contents]=$(base64 -w0 pallets/orml-tokens-management-extension/Cargo.toml)" \ + -F "files[][path]=pallets/parachain-staking/Cargo.toml" -F "files[][contents]=$(base64 -w0 pallets/parachain-staking/Cargo.toml)" \ + -F "files[][path]=pallets/parachain-staking/rpc/Cargo.toml" -F "files[][contents]=$(base64 -w0 pallets/parachain-staking/rpc/Cargo.toml)" \ + -F "files[][path]=pallets/parachain-staking/rpc/runtime-api/Cargo.toml" -F "files[][contents]=$(base64 -w0 pallets/parachain-staking/rpc/runtime-api/Cargo.toml)" \ + -F "files[][path]=pallets/treasury-buyout-extension/Cargo.toml" -F "files[][contents]=$(base64 -w0 pallets/treasury-buyout-extension/Cargo.toml)" \ + -F "files[][path]=pallets/vesting-manager/Cargo.toml" -F "files[][contents]=$(base64 -w0 pallets/vesting-manager/Cargo.toml)" \ + -F "files[][path]=runtime/amplitude/Cargo.toml" -F "files[][contents]=$(base64 -w0 runtime/amplitude/Cargo.toml)" \ + -F "files[][path]=runtime/common/Cargo.toml" -F "files[][contents]=$(base64 -w0 runtime/common/Cargo.toml)" \ + -F "files[][path]=runtime/foucoco/Cargo.toml" -F "files[][contents]=$(base64 -w0 runtime/foucoco/Cargo.toml)" \ + -F "files[][path]=runtime/integration-tests/Cargo.toml" -F "files[][contents]=$(base64 -w0 runtime/integration-tests/Cargo.toml)" \ + -F "files[][path]=runtime/pendulum/Cargo.toml" -F "files[][contents]=$(base64 -w0 runtime/pendulum/Cargo.toml)" \ -F 'query=@.github/api/createCommitOnBranch.gql' - name: Commit New Changes to New Branch (node) @@ -170,9 +170,9 @@ jobs: gh api graphql \ -F githubRepository="$GITHUB_REPOSITORY" \ -F branchName="$BRANCH" \ - -F expectedHeadOid=$(git rev-parse HEAD) \ + -F expectedHeadOid="$(git rev-parse HEAD)" \ -F commitMessage="$(cat changes.txt)" \ - -F files[][path]="node/Cargo.toml" -F files[][contents]=$(base64 -w0 node/Cargo.toml) \ + -F "files[][path]=node/Cargo.toml" -F "files[][contents]=$(base64 -w0 node/Cargo.toml)" \ -F 'query=@.github/api/createCommitOnBranch.gql' - name: Prepare Pull Request title From ad696c7b4a192c7455780c27ab87682eb936ac0f Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 18:33:46 +0200 Subject: [PATCH 12/15] ci: Look up the release to publish to by its tag The publish job's check now reads the release through the same by-tag lookup the release action uses, and fails the step on any error other than a missing release. --- .github/workflows/release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8e30db73e..5448f2375 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -185,8 +185,15 @@ jobs: GH_TOKEN: ${{ github.token }} TAG: ${{ needs.build.outputs.tag }} run: | - ASSETS="$(gh api --paginate "repos/$GITHUB_REPOSITORY/releases" \ - | jq -r -s --arg tag "$TAG" '[.[][] | select(.tag_name == $tag) | .assets[].name] | join(" ")')" + # The lookup the release action makes; any error but a missing release fails the step. + if REL="$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$TAG")"; then + ASSETS="$(jq -r '[.assets[].name] | join(" ")' <<<"$REL")" + elif [ "$(jq -r '.status? // empty' <<<"$REL" 2>/dev/null)" = 404 ]; then + ASSETS="" + else + echo "::error::could not look up the release for $TAG" + exit 1 + fi if [ -n "$ASSETS" ]; then echo "::error::release $TAG already has assets ($ASSETS); refusing to change it" exit 1 From c6ccbc646c9285854da1a1c24d336e467c6067e1 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Thu, 22 Oct 2026 18:34:11 +0200 Subject: [PATCH 13/15] ci: Run one publish job per release tag at a time A second publish run for the same tag waits until the first has finished, so its check sees the assets the first run attached. --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5448f2375..041284b80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -169,6 +169,10 @@ jobs: needs: build if: needs.build.outputs.tag != '' runs-on: ubuntu-latest + # A second run for the same tag waits for the first, then finds its assets. + concurrency: + group: publish-${{ needs.build.outputs.tag }} + cancel-in-progress: false permissions: contents: write steps: From 016793da5f576c5ed311611c18ce88e1a11aab87 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Sun, 25 Oct 2026 10:59:51 +0100 Subject: [PATCH 14/15] ci: Remove only the preinstalled packages the runner image has --- .github/actions/shared/action.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/actions/shared/action.yml b/.github/actions/shared/action.yml index d60db78bf..2230231d8 100644 --- a/.github/actions/shared/action.yml +++ b/.github/actions/shared/action.yml @@ -14,12 +14,13 @@ runs: sudo rm -rf /usr/local/share/boost sudo rm -rf /opt/hostedtoolcache sudo rm -rf "$AGENT_TOOLSDIRECTORY" - sudo apt-get remove -y 'php.*' --fix-missing - sudo apt-get remove -y '^mongodb-.*' --fix-missing - sudo apt-get remove -y '^mysql-.*' --fix-missing - sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing - sudo apt-get remove -y google-cloud-sdk --fix-missing - sudo apt-get remove -y google-cloud-cli --fix-missing + # Runner images differ in what they ship; remove only what is installed. + for pattern in 'php.*' '^mongodb-.*' '^mysql-.*'; do + sudo apt-get remove -y "$pattern" --fix-missing || echo "nothing matches $pattern" + done + for pkg in azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri google-cloud-sdk google-cloud-cli; do + if dpkg -s "$pkg" >/dev/null 2>&1; then sudo apt-get remove -y "$pkg" --fix-missing; fi + done sudo apt-get autoremove -y sudo apt-get clean df -h From aa0978db36ef0121e8d1b22c9a675ef58539a919 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Sun, 25 Oct 2026 11:48:13 +0100 Subject: [PATCH 15/15] ci: Run the Rust test and clippy jobs on Ubuntu 24.04 --- .github/workflows/clippy-checks.yml | 3 ++- .github/workflows/test-code.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clippy-checks.yml b/.github/workflows/clippy-checks.yml index c25595cbb..86cdb14b5 100644 --- a/.github/workflows/clippy-checks.yml +++ b/.github/workflows/clippy-checks.yml @@ -11,7 +11,8 @@ permissions: jobs: clippy-checks: - runs-on: ubuntu-latest + # The bundled RocksDB (librocksdb-sys 0.11) does not build with the GCC of newer images. + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 8ec95ff21..bafc6bdb8 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -11,7 +11,8 @@ permissions: jobs: test-code: - runs-on: ubuntu-latest + # The bundled RocksDB (librocksdb-sys 0.11) does not build with the GCC of newer images. + runs-on: ubuntu-24.04 env: # Make sure CI fails on all warnings, including Clippy lints RUSTFLAGS: "-Dwarnings"