-
Notifications
You must be signed in to change notification settings - Fork 9
53 lines (49 loc) · 1.32 KB
/
build.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
name: Build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
nkro: [enabled, disabled]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v14
with:
name: smk
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Setup
run: nix develop --command meson setup build -Dnkro=${{ matrix.nkro }}
- name: Build
run: nix develop --command meson compile -C build
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: smk-${{ matrix.nkro == 'enabled' && 'nkro' || '6kro' }}
path: build/*.hex
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v14
with:
name: smk
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Setup
run: nix develop --command meson setup build
- name: Lint
run: nix develop --command ninja -C build clang-format-check