-
Notifications
You must be signed in to change notification settings - Fork 45
47 lines (44 loc) · 1.34 KB
/
cache_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
47
name: Cache Nixpkg
on:
push:
branches:
- main
workflow_dispatch:
jobs:
x86_64-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
name: watgbridge
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
nix build --accept-flake-config -L .#packages.x86_64-linux.watgbridge
aarch64-linux:
needs: [x86_64-linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: |
DEBIAN_FRONTEND=noninteractive
sudo apt-get update -q -y && sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
mkdir -p ~/.config/nix
sudo bash -c "echo system-features = aarch64-linux arm-linux >> /etc/nix/nix.conf"
- uses: cachix/cachix-action@v14
with:
name: watgbridge
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: |
nix build -L \
--option system aarch64-linux \
--option sandbox false \
--extra-platforms aarch64-linux \
--accept-flake-config \
.#packages.aarch64-linux.watgbridge