From 3d905207b2e0e79e1e975cfb285a19bef0ea07bb Mon Sep 17 00:00:00 2001 From: Oliver Ni Date: Sun, 22 Sep 2024 19:47:07 -0700 Subject: [PATCH] use matrix, lol --- .github/workflows/build.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2493c38..edbafb0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,8 +9,20 @@ permissions: contents: write jobs: + define-matrix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + echo "hosts=" >> "$GITHUB_OUTPUT" + ls hosts | sed -n 's/\.nix$//p' | jq -R | jq -s >> "$GITHUB_OUTPUT" + build: runs-on: ubuntu-latest + needs: define-matrix + strategy: + matrix: + host: ${{ fromJSON(needs.define-matrix.outputs.hosts) }} steps: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@v14 @@ -18,4 +30,4 @@ jobs: - uses: DeterminateSystems/flake-checker-action@v9 - name: Build NixOS hosts - run: nix develop -c colmena build --evaluator streaming + run: nix develop -c colmena build --on ${{ matrix.host }}