-
-
Notifications
You must be signed in to change notification settings - Fork 12
46 lines (40 loc) · 1.18 KB
/
nixpkgs-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "nixpkgs CI"
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
get-ghc-versions:
name: Determine GHC versions to test
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.get-ghc-versions-step.outputs.versions }}
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Get GHC Versions from ci.nix
id: get-ghc-versions-step
run: |
echo -n "versions=" >> "$GITHUB_OUTPUT"
nix-instantiate --eval --strict --json -E "builtins.attrNames (import ./ci.nix { })" >> "$GITHUB_OUTPUT"
nix-build:
runs-on: ubuntu-latest
needs:
- get-ghc-versions
strategy:
matrix:
version: ${{ fromJSON(needs.get-ghc-versions.outputs.versions) }}
steps:
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: nix-build ci.nix -A ${{ matrix.version }}
env:
ATTR: ${{ matrix.version }}
run: |
nix-build ci.nix -A "$ATTR"