-
-
Notifications
You must be signed in to change notification settings - Fork 231
236 lines (189 loc) · 5.78 KB
/
ci.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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build_autotools:
name: Autotools / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-12, macos-14, ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- name: Install Autotools
if: runner.os == 'macOS'
run: brew upgrade && brew install autoconf automake libtool
- name: Generate Autotools
run: ./autogen.sh
- name: Configure Autotools
run: ./configure
- name: Build
run: make
- name: Test
run: make check
build_cmake_ios:
name: CMake / iOS
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: |
cmake \
-B build \
-GXcode \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO \
-DCGLM_STATIC=ON \
-DCGLM_USE_TEST=ON
- name: Build
run: cmake --build build
build_cmake_macos:
name: CMake / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-12, macos-14]
steps:
- uses: actions/checkout@v4
- name: Install Ninja
if: runner.os == 'macOS'
run: brew upgrade && brew install ninja
- name: Configure CMake
run: |
cmake \
-B build \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCGLM_STATIC=ON \
-DCGLM_USE_TEST=ON
- name: Build
run: cmake --build build
- name: Test
working-directory: build
run: ./tests
build_cmake_ubuntu:
name: CMake / ${{ matrix.target.os }} / ${{ matrix.target.cc }}
runs-on: ${{ matrix.target.os }}
strategy:
fail-fast: false
matrix:
target:
- { os: ubuntu-20.04, cc: gcc-11 }
- { os: ubuntu-22.04, cc: gcc-12 }
- { os: ubuntu-22.04, cc: gcc-13 }
- { os: ubuntu-20.04, cc: clang-12 }
- { os: ubuntu-22.04, cc: clang-15 }
steps:
- uses: actions/checkout@v4
- name: Install Compiler and Ninja
run: |
sudo apt-get update -y
sudo apt-get install -y ${{ matrix.target.cc }} ninja-build
- name: Configure CMake
run: |
cmake \
-B build \
-GNinja \
-DCMAKE_C_COMPILER=${{ matrix.target.cc }} \
-DCMAKE_BUILD_TYPE=Release \
-DCGLM_STATIC=ON \
-DCGLM_USE_TEST=ON
- name: Build
run: cmake --build build
- name: Test
working-directory: build
run: ./tests
build_cmake_windows:
name: CMake / ${{ matrix.platform.name }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
platform:
- { name: Windows (x64), flags: -A x64 }
- { name: Windows (x86), flags: -A Win32 }
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64 }
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32 }
- { name: Windows (ARM), flags: -A ARM, skip_tests: true, skip_build: true } # This fails to build.
- { name: Windows (ARM64), flags: -A ARM64, skip_tests: true }
- { name: UWP (ARM64), flags: -A ARM64, -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0", skip_tests: true }
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0", skip_tests: true }
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B build `
-DCGLM_STATIC=ON `
-DCGLM_USE_TEST=ON `
${{ matrix.platform.flags }}
- name: Build
if: ${{ !matrix.platform.skip_build }}
run: cmake --build build --config Release --parallel
- name: Test
if: ${{ !matrix.platform.skip_tests }}
working-directory: build
run: .\Release\tests.exe
build_documentation:
name: Documentation
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Dependencies
working-directory: docs
run: python3 -m pip install -r requirements.txt
- name: Build
working-directory: docs
run: sphinx-build -W --keep-going source build
build_meson:
name: Meson / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install meson
run: python3 -m pip install meson ninja
- name: Build
run: meson setup build -Dbuildtype=release --default-library=static -Dbuild_tests=true
- name: Test
run: meson test -C build
build_msbuild:
name: MSBuild / Windows
runs-on: windows-2022
# This has no test yet.
# It could also try building for ARM, ARM64, ARM64EC, but those fail currently.
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- name: Build (x86)
working-directory: win
run: msbuild cglm.vcxproj /p:Configuration=Release /p:Platform=x86 /p:BuildInParallel=true
- name: Build (x64)
working-directory: win
run: msbuild cglm.vcxproj /p:Configuration=Release /p:Platform=x64 /p:BuildInParallel=true
build_swift:
name: Swift ${{ matrix.swift }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-12, macos-14, ubuntu-22.04]
# This has no test yet.
steps:
- uses: actions/checkout@v4
- name: Build
run: swift build