Skip to content

Commit

Permalink
ci: Allow flexible Rusk binary building in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
HDauven committed Dec 19, 2024
1 parent 71a27dd commit 1339ed3
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/rusk_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ on:
description: "Git branch, ref, or SHA to checkout"
required: true
default: "master"
runner:
description: "Choose runner target to build against (JSON array)"
required: true
default: "[\"ubuntu-24.04\", \"macos-15\", \"arm-linux\"]"
features:
description: "Choose features to build (JSON array)"
required: true
default: "[\"default\", \"archive\"]"

jobs:
build_and_publish:
name: Build Rusk binaries for ${{ matrix.os }} (${{ matrix.features }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-15, arm-linux]
features: ${{ fromJson(github.event.inputs.features) }}
compiler: [cargo]
features: [default, archive]
include:
- os: ubuntu-24.04
target: linux-x64
Expand All @@ -26,8 +33,17 @@ jobs:
- os: arm-linux
target: linux-arm64
flags: --target=aarch64-unknown-linux-gnu
fail-fast: false

steps:
- name: Skip Non-matching Configurations
if: |
!contains(fromJson(github.event.inputs.runner), matrix.runner) ||
!contains(fromJson(github.event.inputs.features), matrix.features)
run: |
echo "Skipping build for ${{ matrix.runner }} - ${{ matrix.features }}"
exit 0
- name: Checkout Repository
uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 1339ed3

Please sign in to comment.