Skip to content

Commit 58da725

Browse files
committed
Build Nix package on macOS
1 parent a4c4bad commit 58da725

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/build_nix.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Build Nix package on Ubuntu"
1+
name: "Build Nix package"
22

33
on:
44
push:
@@ -8,11 +8,22 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest]
1216
steps:
1317
- uses: actions/checkout@v6.0.2
1418
- uses: nixbuild/nix-quick-install-action@v34
1519
with:
1620
github_access_token: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Setup Nix cache
22+
uses: nix-community/cache-nix-action@v7
23+
with:
24+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
25+
restore-prefixes-first-match: |
26+
nix-${{ runner.os }}-${{ runner.arch }}-default-
27+
nix-${{ runner.os }}-${{ runner.arch }}-
1728
- name: Building package
1829
run: nix build

0 commit comments

Comments
 (0)