From 7b19503e7f8c7cc0884fc2fbd669c0cc2e05aef5 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar <3998+srid@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:26:38 -0400 Subject: [PATCH] ci: Use github actions matrix (#50) --- .github/workflows/ci.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b68b179..06a7905 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,11 +7,20 @@ on: pull_request: jobs: + configure: + runs-on: self-hosted + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - uses: actions/checkout@v4 + - id: set-matrix + run: echo "matrix=$(nixci gh-matrix --systems=aarch64-linux,aarch64-darwin | jq -c .)" >> $GITHUB_OUTPUT nix: runs-on: self-hosted + needs: configure strategy: - matrix: - system: [aarch64-linux, aarch64-darwin] + matrix: ${{ fromJson(needs.configure.outputs.matrix) }} + fail-fast: false steps: - uses: actions/checkout@v4 - run: | @@ -20,5 +29,5 @@ jobs: 'nixpkgs.hostPlatform = "x86_64-linux"' \ 'nixpkgs.hostPlatform = "aarch64-linux"' \ ./examples/*/flake.nix - - nixci --build-systems "github:nix-systems/${{ matrix.system }}" + + nixci build --systems "github:nix-systems/${{ matrix.system }}" .#default.${{ matrix.subflake}}