-
Notifications
You must be signed in to change notification settings - Fork 63
68 lines (63 loc) · 2.09 KB
/
nix.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: "nix-build"
on:
pull_request:
push:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Nix Environment
uses: ./.github/actions/nix-common-setup
with:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Lint
run: nix --print-build-logs build .#pre-commit
build:
needs: lint
strategy:
matrix:
include:
- os: ubuntu-latest
system: x86_64-linux
- os: macos-latest
system: x86_64-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Nix Environment
uses: ./.github/actions/nix-common-setup
with:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build
run: nix --print-build-logs build .#packages.${{ matrix.system }}.monad-bayes
- name: Development environment (package only)
run: nix --print-build-logs develop .#packages.${{ matrix.system }}.monad-bayes --command echo Ready
- name: All GHCs
run: nix --print-build-logs build .#packages.${{ matrix.system }}.monad-bayes-all-ghcs
notebooks:
needs: build
strategy:
matrix:
include:
- os: ubuntu-latest
system: x86_64-linux
# Jupyenv doesn't support Darwin yet, https://github.com/tweag/jupyenv/issues/388
# - os: macos-latest
# system: x86_64-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Nix Environment
uses: ./.github/actions/nix-common-setup
with:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Development environment (complete)
run: nix --print-build-logs develop --command echo Ready
- name: Check whether notebook *.html files are up to date
run: |
./regenerate_notebooks.sh
git diff --exit-code || (echo "Please update notebooks by running regenerate_notebooks.sh, and inspecting and committing the result." && exit 1)