Skip to content

Commit

Permalink
Fix matrix in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Jul 5, 2024
1 parent aeef5e8 commit 11df07f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
run: |
set -Eeu
matrix="$(nix eval --accept-flake-config --json '.#githubActions.matrix')"
echo $matrix
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
build:
Expand All @@ -32,7 +31,7 @@ jobs:
fail-fast: false
matrix: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
concurrency:
group: ${{ github.workflow }}.${{ github.event.pull_request.number || github.ref }}.${{ matrix.attr }}
group: ${{ github.workflow }}.${{ github.event.pull_request.number || github.ref }}.${{ matrix.host }}
cancel-in-progress: true

steps:
Expand All @@ -52,5 +51,5 @@ jobs:
name: joinemm
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Build ${{ matrix.attr }}
run: nixos-rebuild build -v --accept-flake-config --flake ".#${{ matrix.attr }}"
- name: Build ${{ matrix.host }}
run: nixos-rebuild build -v --accept-flake-config --flake ".#${{ matrix.host }}"
10 changes: 6 additions & 4 deletions githubMatrix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
lib,
...
}: {
flake.githubActions.matrix =
# can't build aarch64 on github
lib.subtractLists ["archimedes"]
(builtins.attrNames self.nixosConfigurations);
flake.githubActions.matrix = {
host =
# can't build aarch64 on github
lib.subtractLists ["archimedes"]
(builtins.attrNames self.nixosConfigurations);
};
}

0 comments on commit 11df07f

Please sign in to comment.