-
Notifications
You must be signed in to change notification settings - Fork 7
68 lines (65 loc) · 2.33 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: llvm-pretty-bc-parser nix CI
on:
push:
branches:
- 'master'
- 'release-**'
pull_request:
workflow_dispatch:
jobs:
build:
# This job builds the main package, via a number of GHC versions. This is
# the build that would be used by downstream packages using this as a
# dependency; this does not build documentation or tests.
runs-on: ubuntu-latest
strategy:
matrix:
ghc-version: [ "ghc96", "ghc94", "ghc92", "ghc810", "ghc88" ]
steps:
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-23.05
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: galois
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: build ${{ matrix.ghc-version }}
shell: bash
run: nix build -L github:${{ github.repository }}/${{ github.sha }}#llvm-pretty-bc-parser.${{ matrix.ghc-version }}
tests:
# This job builds the tests, and then runs the tests (in two different
# steps). Note that for llvm-pretty-bc-parser, multiple LLVM versions will
# be tested; the actual list of versions is specified in the `flake.nix` file
# used (see the NOTE comment in that file).
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-23.05
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: galois
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: test build
shell: bash
run: nix build github:${{ github.repository }}/${{ github.sha }}#TESTS_PREP
- name: test
shell: bash
run: nix build -L github:${{ github.repository }}/${{ github.sha }}#TESTS
doc:
# This job builds the documentation (e.g. Hackage, etc.)
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-23.05
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: galois
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: doc
shell: bash
run: nix build github:${{ github.repository }}/${{ github.sha }}#DOC