From 47070fd52b14613bc35d0eb069ceb85b263ebfc6 Mon Sep 17 00:00:00 2001 From: Hein Dauven Date: Thu, 19 Dec 2024 10:49:23 +0100 Subject: [PATCH] ci: Allow flexible Rusk binary building in workflow --- .github/workflows/rusk_build.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/rusk_build.yml b/.github/workflows/rusk_build.yml index 3a2a6b16e..8a26e4136 100644 --- a/.github/workflows/rusk_build.yml +++ b/.github/workflows/rusk_build.yml @@ -7,6 +7,14 @@ on: description: "Git branch, ref, or SHA to checkout" required: true default: "master" + targets_to_build: + description: "Choose targets to build (comma-separated)" + required: true + default: "ubuntu-24.04,macos-15,arm-linux" + features_to_build: + description: "Choose features to build (comma-separated)" + required: true + default: "default,archive" jobs: build_and_publish: @@ -26,8 +34,19 @@ jobs: - os: arm-linux target: linux-arm64 flags: --target=aarch64-unknown-linux-gnu + fail-fast: false steps: + - name: Skip unspecified targets and features + if: | + !contains(${{ github.event.inputs.targets_to_build }}, ${{ matrix.os }}) || + !contains(${{ github.event.inputs.features_to_build }}, ${{ matrix.features }}) + run: | + echo "build targets: ${{ github.event.inputs.targets_to_build }}" + echo "build features: ${{ github.event.inputs.features_to_build }}" + echo "Skipping build for ${{ matrix.os }} - ${{ matrix.features }}" + exit 1 + - name: Checkout Repository uses: actions/checkout@v4 with: