-
Notifications
You must be signed in to change notification settings - Fork 45
61 lines (53 loc) · 1.87 KB
/
test.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
name: "Test"
on:
pull_request:
push:
jobs:
tests:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- [self-hosted, linux, ARM64]
- macos-13 # x86_64
- macos-latest # macos-14 == aarch64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- name: Setup read-only Cachix cache
uses: cachix/cachix-action@master
with:
name: cachix
skipPush: true
- name: Build dev Cachix
id: cachix
run: |
cachix_out=$(nix build .#cachix -L --show-trace --print-out-paths)
echo "cachix_out=$cachix_out" >> "$GITHUB_OUTPUT"
echo "cachix_bin=$cachix_out/bin/cachix" >> "$GITHUB_OUTPUT"
- name: Cache dev build
uses: cachix/cachix-action@master
with:
name: cachix
cachixBin: '${{ steps.cachix.outputs.cachix_bin }}'
pathsToPush: '${{ steps.cachix.outputs.cachix_out }}'
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Setup Cachix cache with dev build
uses: cachix/cachix-action@master
with:
name: cachix
cachixBin: '${{ steps.cachix.outputs.cachix_bin }}'
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix build -L '.#ci' '.#cachix' --show-trace --impure
- name: "watch-exec test"
env:
signingKey: ${{ secrets.CACHIX_SIGNING_KEY }}
if: ${{ env.signingKey != '' }}
run: ${{ steps.cachix.outputs.cachix_bin }} watch-exec cachix -- nix-build genpaths.nix --substituters 'https://cache.nixos.org'
- name: "daemon watch-exec test"
env:
signingKey: ${{ secrets.CACHIX_SIGNING_KEY }}
if: ${{ env.signingKey != '' }}
run: ${{ steps.cachix.outputs.cachix_bin }} daemon watch-exec cachix -- nix-build genpaths.nix --substituters 'https://cache.nixos.org'