Skip to content

Commit 5fc9a9d

Browse files
committed
Add a nix-based CI workflow
1 parent e4ccb0a commit 5fc9a9d

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/nix-build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Nix Build
2+
3+
on:
4+
push:
5+
branches: [develop, main, master]
6+
pull_request:
7+
branches: [develop, main, master]
8+
workflow_dispatch: # For manual triggering
9+
schedule:
10+
- cron: "3 14 15 * *" # 14:03 on the 15th of every month (UTC)
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
compiler: ['ghc94', 'ghc96', 'ghc98', 'ghc910', 'ghc912']
18+
fail-fast: false
19+
20+
steps:
21+
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install nix
26+
uses: cachix/install-nix-action@v31
27+
with:
28+
nix_path: nixpkgs=channel:nixos-unstable
29+
30+
- name: Enable cachix
31+
uses: cachix/cachix-action@v16
32+
with:
33+
name: neil-mayhew
34+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
35+
36+
- name: Build with ${{ matrix.compiler }}
37+
id: build
38+
run: nix build -f shell.nix
39+
--argstr compiler ${{ matrix.compiler }}
40+
--print-out-paths | cachix push neil-mayhew

0 commit comments

Comments
 (0)