Skip to content

Commit

Permalink
use matrix, lol
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-ni committed Sep 23, 2024
1 parent 397d59e commit 3d90520
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,25 @@ 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
- uses: DeterminateSystems/magic-nix-cache-action@v8
- 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 }}

0 comments on commit 3d90520

Please sign in to comment.