-
Notifications
You must be signed in to change notification settings - Fork 90
85 lines (73 loc) · 2.29 KB
/
continuous-integration.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Continuous integration
on:
push:
branches:
- master
pull_request:
merge_group:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
rust_channel:
- stable
include:
- os: ubuntu-latest
system: x86_64-linux
- os: macos-latest
system: x86_64-darwin
continue-on-error: true
runs-on: ${{ matrix.os }}
# The `== true` makes it work wether continue-on-error has been defined or not.
continue-on-error: ${{ matrix.continue-on-error == true }}
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
if: runner.os == 'Linux'
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB. Currently we don't seem to need
# this extra disk space
tool-cache: false
# we might turn some of those off to trade CI time for less space saving
# if this step turns out to be too slow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checking out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Installing Nix
uses: cachix/install-nix-action@V27
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
accept-flake-config = true
- name: Setup Cachix
uses: cachix/cachix-action@v15
with:
name: tweag-nickel
authToken: '${{ secrets.CACHIX_TWEAG_NICKEL_AUTH_TOKEN }}'
- name: Run all checks
run: |
# see https://github.com/NixOS/nix/issues/8949 for why we redirect to
# an output file. Everything else is just capturing the error code
# while still printing the logs
set +e
nix flake check --print-build-logs > logs 2>&1
errcode=$?
cat logs
exit $errcode
- name: Typecheck benchmarks
run: find core/benches -type f -name "*.ncl" -print0 | xargs -0 -I file nix run . -- typecheck file