-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (81 loc) · 2.54 KB
/
build.yml
File metadata and controls
99 lines (81 loc) · 2.54 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build & Test
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
schedule:
- cron: "0 0 * * 0" # Weekly on Sunday
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build-type: [debug, release, relwithdebinfo]
fail-fast: false # Don't cancel other jobs if one fails, to get full test coverage
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Set up build environment
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
choco install mingw -y
elif [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
sudo apt-get install -y build-essential --no-install-recommends
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install gcc
fi
shell: bash
- name: Build ImGui example (${{ matrix.build-type }})
run: |
cd examples/ImGui
make BUILD_TYPE=${{ matrix.build-type }}
shell: bash
- name: Build ImGui example with analyze
if: matrix.build-type == 'debug' && runner.os == 'Linux'
run: |
cd examples/ImGui
make analyze
shell: bash
- name: Check compilation warnings
if: matrix.os == 'ubuntu-latest'
run: |
cd examples/ImGui
make BUILD_TYPE=debug 2>&1 | tee build.log
if grep -i "error:" build.log; then
exit 1
fi
shell: bash
test-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y build-essential --no-install-recommends
- name: Build all examples
run: |
make
- name: Verify executable exists
run: |
[ -f "examples/ImGui/build/app/ImGuiExample" ] || exit 1
echo "✓ ImGui executable built successfully"
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential cppcheck clang-tidy
- name: Run cppcheck
run: |
cppcheck --enable=all --suppress=missingIncludeSystem \
examples/donut-basic/src/ \
examples/*/
- name: Run clang-tidy
run: |
clang-tidy examples/*/src/*.cpp -- -Iexamples/*/include