From 9a9c52071ed7ff74910f50cf915fe2e0eba1e490 Mon Sep 17 00:00:00 2001 From: Chris O'Neil Date: Thu, 3 Oct 2024 20:41:31 +0100 Subject: [PATCH] ci: provide `chunk-size` input for release workflow This allows the chunk size to be overridden at compile time with a value supplied when the workflow runs. --- .github/workflows/release.yml | 11 +++++++++++ Justfile | 10 +++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd095472c0..a401a1483c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,11 @@ name: release on: workflow_dispatch: + inputs: + chunk-size: + description: Specify the chunk size in bytes. If not used, the current default is 1048576. + type: number + required: false # The key variables also need to be passed to `cross`, which runs in a container and does not # inherit variables from the parent environment. The `cross` tool is used in the `build` @@ -49,6 +54,12 @@ jobs: - shell: bash run: cargo binstall --no-confirm just + - name: Set chunk size if applicable + if: ${{ inputs.chunk-size != '' }} + shell: bash + run: | + echo "MAX_CHUNK_SIZE=${{ inputs.chunk-size }}" >> $GITHUB_ENV + - name: build release artifacts shell: bash run: | diff --git a/Justfile b/Justfile index 8e260b9804..9452125df5 100644 --- a/Justfile +++ b/Justfile @@ -107,9 +107,13 @@ build-release-artifacts arch: mkdir artifacts cargo clean - echo "===============" - echo "= Public Keys =" - echo "===============" + if [ -n "$MAX_CHUNK_SIZE" ]; then + echo "Overriding chunk size to $MAX_CHUNK_SIZE bytes" + fi + + echo "================" + echo " Network Keys " + echo "================" echo "FOUNDATION_PK: $FOUNDATION_PK" echo "GENESIS_PK: $GENESIS_PK" echo "NETWORK_ROYALTIES_PK: $NETWORK_ROYALTIES_PK"