-
-
Notifications
You must be signed in to change notification settings - Fork 11
61 lines (49 loc) · 1.53 KB
/
ci.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: ci
on:
pull_request:
push:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
platform: linux
- os: macos-latest
platform: darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@V27
- uses: cachix/cachix-action@v14
with:
name: albafetch
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: build (linux/x64)
if: runner.os == 'Linux'
run: nix build -L --accept-flake-config .#albafetch-static
- name: build (darwin/x64)
if: runner.os == 'macOS'
run: nix build -L --accept-flake-config
- name: test
run: ./result/bin/albafetch
- uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: albafetch-linux-x64-static
path: ${{ github.workspace }}/result/bin/albafetch
- uses: actions/upload-artifact@v4
if: runner.os == 'macOS'
with:
name: albafetch-darwin-x64
path: ${{ github.workspace }}/result/bin/albafetch
- name: build (linux/aarch64-multiplatform)
if: runner.os == 'Linux'
run: nix build -L --accept-flake-config .#albafetch-arm
- uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: albafetch-linux-aarch64-static
path: ${{ github.workspace }}/result/bin/albafetch