-
Notifications
You must be signed in to change notification settings - Fork 273
48 lines (46 loc) · 1.56 KB
/
nix-dev-cache.yaml
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
name: Nix development cache
on:
# Build on every pull request (and new PR commit)
pull_request:
# Build on new pushes to trunk (E.g. Merge commits)
# Without the branch filter, each commit on a branch with a PR is triggered twice.
# See: https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662
push:
branches:
- trunk
jobs:
nix:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
# Run each build to completion, regardless of if any have failed
fail-fast: false
matrix:
os:
- ubuntu-20.04
- macOS-12
- macOS-14
steps:
- uses: actions/checkout@v4
- name: mount Nix store on larger partition
# on the Linux runner `/` doesn't have enough space, but there's a `/mnt` which does.
if: runner.os == 'Linux'
run: |
sudo mkdir /nix /mnt/nix
sudo mount --bind /mnt/nix /nix
- uses: cachix/install-nix-action@v27
if: runner.os == 'Linux'
with:
extra_nix_config: |
extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
extra-substituters = https://cache.iog.io
- uses: cachix/install-nix-action@v27
if: runner.os != 'Linux'
- uses: cachix/cachix-action@v15
with:
name: unison
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: build all packages and development shells
run: nix -L build --accept-flake-config --no-link --keep-going '.#all'
- name: print disk free status
run: df -h