Skip to content

Commit

Permalink
ci: provide chunk-size input for release workflow
Browse files Browse the repository at this point in the history
This allows the chunk size to be overridden at compile time with a value supplied when the workflow
runs.
  • Loading branch information
jacderida committed Oct 3, 2024
1 parent 8ee7ced commit 9a9c520
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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: |
Expand Down
10 changes: 7 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9a9c520

Please sign in to comment.