forked from monome/norns
-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (62 loc) · 1.92 KB
/
compile.yml
File metadata and controls
66 lines (62 loc) · 1.92 KB
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
62
63
64
65
66
name: compile
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
compile-norns:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: compile norns
uses: addnab/docker-run-action@v3
with:
image: robbielyman/norns-ci:latest
options: -v ${{ github.workspace }}:/norns-build
run: |
./waf configure --release && ./waf build --release
lint-lua:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install luacheck
run: |
sudo apt-get update -qq
sudo apt-get install -y lua5.3 liblua5.3-dev luarocks
sudo luarocks --lua-version=5.3 install luacheck
- name: lint lua code
run: luacheck lua/ --codes
clang-format-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: install clang-format
run: |
sudo apt-get update -qq
sudo apt-get install -y clang-format
- name: run clang-format script
run: |
chmod +x clang-format.sh
./clang-format.sh
- name: check for formatting changes
run: |
if ! git diff --exit-code --quiet; then
echo -e "❌ clang-format check - C/C++ code formatting needs attention"
echo ""
echo -e "\033[3mthese files requiring formatting\033[0m"
git diff --name-only | grep -E '\.(c|cpp|h)$' | while read file; do
echo "- $file"
done
echo ""
echo -e "\033[3mto update formatting, run locally\033[0m"
echo "./clang-format.sh"
echo "git add ."
echo "git commit -m 'fix: apply clang-format'"
exit 1
else
echo "✅ clang-format check - all C/C++ code is properly formatted"
fi