-
Notifications
You must be signed in to change notification settings - Fork 41
47 lines (44 loc) · 1.31 KB
/
nix-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
47
name: Nix CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
paths:
- 'lib/**'
- 'src/**'
- 'test/**'
- 'agda2hs.agda-lib'
- 'agda2hs.cabal'
- 'cabal.project'
- 'Makefile'
- 'flake.*'
- 'nix/*'
- '.github/workflows/**.yml'
branches: [master]
jobs:
nix-build:
name: ${{ matrix.pretty }} with nix (${{ matrix.derivation }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
derivation: [agda2hs, agda2hs-lib]
include:
- pretty: "Compile agda2hs"
derivation: agda2hs
- pretty: "Typecheck with Agda"
derivation: agda2hs-lib
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix build .#${{ matrix.derivation }} --print-build-logs
nix-shell:
name: "Test building inside a nix shell"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: DeterminateSystems/magic-nix-cache-action@v2
# for some reason this doesn't work without update, even though it doesn't download anything
- run: nix develop -Lv -c bash -c "cabal update; cabal v1-build"