-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (41 loc) · 1.13 KB
/
build.yaml
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
# SPDX-License-Identifier: Apache-2.0
name: Build
on:
push:
branches: [ '*' ]
pull_request:
branches: [ "main" ]
jobs:
build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: Astyle
shell: nix develop .#ci -c bash -e {0}
run: |
err=$(astyle $(git ls-files "*.c" "*.h") --options=.astylerc --dry-run --formatted)
if [[ ${#err} != 0 ]]; then
echo "$err" | awk '{split($0,a);print a[2]}' | while IFS= read -r file; do
echo "::error file={"$file"},title={checking}::Formatted $file"
done
exit 1
fi
- name: Build targets
shell: nix develop .#ci -c bash -e {0}
run: |
make
emulate_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: Emulate on QEMU
shell: nix develop .#ci -c bash -e {0}
run: |
make emulate
for file in elf/*.elf; do
make emulate ELF_FILE="$file"
done