-
Notifications
You must be signed in to change notification settings - Fork 80
46 lines (46 loc) · 1.54 KB
/
build-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
name: "Nix"
on:
pull_request:
push:
branches:
- main
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x86_64-linux
- os: ubuntu-latest
arch: aarch64-linux
- os: macos-14
arch: x86_64-darwin
- os: macos-14
arch: aarch64-darwin
name: Build Nix - ${{ matrix.arch }}.${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup git lfs
uses: ./.github/actions/setup-git-lfs
- uses: cachix/install-nix-action@v30
with:
install_url: https://releases.nixos.org/nix/nix-2.18.8/install
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Setup emulation
if: ${{ matrix.arch == 'aarch64-linux' }}
run: |
sudo apt update
sudo apt install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
mkdir -p ~/.config/nix
echo "system-features = aarch64-linux arm-linux" | sudo tee -a /etc/nix/nix.conf
- uses: cachix/cachix-action@v15
with:
name: unblob
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: pyperscan
- run: |
nix build -L --option system ${{ matrix.arch }} --extra-platforms ${{ matrix.arch }} .#packages.${{ matrix.arch }}.devenv
- run: |
nix flake check -L --impure --option system ${{ matrix.arch }} --extra-platforms ${{ matrix.arch }}