-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.27 KB
/
compile-check-blink.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
name: "compile-check-blink"
on:
pull_request:
paths-ignore:
- 'README.md'
push:
paths-ignore:
- 'README.md'
jobs:
nix-flake-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v29
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@v8
- name: AppArmor fixes
# Work around https://github.com/containers/bubblewrap/issues/632
run: |
arduino_cli_path="$(nix develop --command which arduino-cli)"
bwrap_path="$(grep '/bwrap' /nix/store/z2afvf8vnczxd09xpcc6nkn0zd83nacl-arduino-cli-1.0.4/bin/arduino-cli)"
cat << EOF | sudo tee /etc/apparmor.d/local-bwrap
abi <abi/4.0>,
include <tunables/global>
profile local-bwrap ${bwrap_path} flags=(unconfined) {
userns,
# Site-specific additions and overrides. See local/README for details.
include if exists <local/bwrap>
}
EOF
sudo cat /etc/apparmor.d/local-bwrap
sudo systemctl reload apparmor
- name: Compile test
run: |
nix develop --command make -C blink compile
- name: Formatter check
run: |
nix fmt
git diff --exit-code