Repository navigation
474 lines (430 loc) · 16.2 KB
/
Copy pathci-cell.yml
File metadata and controls
474 lines (430 loc) · 16.2 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
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
#
# Created: 7th September 2025
# Updated: 12th October 2026
#
name: CI cell
on:
workflow_call:
inputs:
build-type:
required: false
type: string
default: Release
c-compiler:
required: true
type: string
cell-id:
required: true
type: string
cpp-compiler:
required: true
type: string
no-b64:
required: false
type: boolean
default: false
no-shwild:
required: false
type: boolean
default: false
os:
required: true
type: string
toolchain:
required: false
type: string
default: ''
with-ace:
required: false
type: boolean
default: false
permissions:
contents: read
jobs:
build:
name: Build (${{ inputs.cell-id }})
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- name: Install Clang (Ubuntu)
if: runner.os == 'Linux' && inputs.c-compiler == 'clang'
run: sudo apt-get update && sudo apt-get install -y clang
- name: Install ACE (Ubuntu)
if: inputs.with-ace && runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libace-dev
- name: Setup MSYS2 MinGW
id: msys2
if: runner.os == 'Windows' && inputs.toolchain == 'mingw'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-make
# Dependency order (not lexicographic): each package is configured
# against those already installed under the shared prefix. Optional
# packages are omitted when the corresponding no-* input is true.
- name: Install Synesis dependencies
uses: ./.github/actions/install-sis-deps
with:
build-type: ${{ inputs.build-type }}
c-compiler: ${{ inputs.c-compiler }}
cpp-compiler: ${{ inputs.cpp-compiler }}
dependencies: >-
STLSoft
woad
${{ !inputs.no-shwild && 'shwild' || '' }}
xTests
${{ !inputs.no-b64 && 'b64' || '' }}
toolchain: ${{ inputs.toolchain }}
- name: Configure
shell: bash
run: |
set -euo pipefail
NO_B64_OPT=""
if [ "${{ inputs.no-b64 }}" = "true" ]; then
NO_B64_OPT="-DNO_B64=ON"
fi
NO_SHWILD_OPT=""
if [ "${{ inputs.no-shwild }}" = "true" ]; then
NO_SHWILD_OPT="-DNO_SHWILD=ON -DCMAKE_DISABLE_FIND_PACKAGE_shwild=TRUE"
fi
if [ "${{ inputs.with-ace }}" = "true" ]; then
ACE_FLAG="-DNO_ACE=OFF"
else
ACE_FLAG="-DNO_ACE=ON"
fi
if [ "${{ inputs.c-compiler }}" = "cl" ]; then
cmake -B build -S . \
-DCMAKE_DISABLE_FIND_PACKAGE_MFC=TRUE \
-DCMAKE_PREFIX_PATH="${{ env.SIS_DEPS }}" \
-DBUILD_EXAMPLES=ON \
-DBUILD_TESTING=ON \
$NO_B64_OPT \
$NO_SHWILD_OPT \
$ACE_FLAG
elif [ "${{ inputs.toolchain }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
cmake -B build -S . -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE="${{ inputs.build-type }}" \
-DCMAKE_C_COMPILER="${{ inputs.c-compiler }}" \
-DCMAKE_CXX_COMPILER="${{ inputs.cpp-compiler }}" \
-DCMAKE_PREFIX_PATH="${{ env.SIS_DEPS }}" \
-DBUILD_EXAMPLES=ON \
-DBUILD_TESTING=ON \
$NO_B64_OPT \
$NO_SHWILD_OPT \
$ACE_FLAG
else
cmake -B build -S . \
-DCMAKE_BUILD_TYPE="${{ inputs.build-type }}" \
-DCMAKE_C_COMPILER="${{ inputs.c-compiler }}" \
-DCMAKE_CXX_COMPILER="${{ inputs.cpp-compiler }}" \
-DCMAKE_PREFIX_PATH="${{ env.SIS_DEPS }}" \
-DBUILD_EXAMPLES=ON \
-DBUILD_TESTING=ON \
$NO_B64_OPT \
$NO_SHWILD_OPT \
$ACE_FLAG
fi
- name: Build
shell: bash
run: |
set -euo pipefail
if [ "${{ inputs.c-compiler }}" = "cl" ]; then
cmake --build build --config "${{ inputs.build-type }}" --parallel
elif [ "${{ inputs.toolchain }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
cmake --build build --parallel 2
else
cmake --build build --parallel
fi
- name: Upload build tree
uses: actions/upload-artifact@v4
with:
name: sis-build-${{ inputs.cell-id }}
path: build
retention-days: 1
# Windows cells dogfood the native .cmd runners (never the .sh); every
# other cell uses the Bash runners. Scratch must gate the Phase 4c
# reporter (no continue-on-error greenwash).
run-examples:
name: Examples (${{ inputs.cell-id }})
needs: build
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
# Dynamically linked ACE backends need libACE on the run runner
# (artifact download does not carry the system shared library).
- name: Install ACE (Ubuntu)
if: inputs.with-ace && runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libace-dev
- name: Setup MSYS2 MinGW
id: msys2
if: runner.os == 'Windows' && inputs.toolchain == 'mingw'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-toolchain
- name: Download build tree
uses: actions/download-artifact@v4
with:
name: sis-build-${{ inputs.cell-id }}
path: build
# download-artifact does not restore Unix execute bits;
# run_all_*.sh discovery requires -perm -100 (or *.exe on Windows).
# Skip CMakeFiles and compiler deps — name globs also match
# e.g. test.component.*.cpp.o.d / example*.c.o.d; chmod +x on those
# makes tip runners treat them as programs (exit 127).
- name: Restore execute bits on test and example binaries
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
find build -type f \
! -path '*/CMakeFiles/*' \
! -name '*.d' \
! -name '*.o' \
! -name '*.obj' \
\( \
-name 'test_unit*' -o -name 'test.unit.*' -o \
-name 'test_component*' -o -name 'test.component.*' -o \
-name 'test_performance*' -o -name 'test.performance.*' -o \
-name 'test_scratch*' -o -name 'test.scratch.*' -o \
\( -name 'example*' ! -name '*.md' \) \
\) -exec chmod +x {} +
- name: Run examples (Bash)
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
if [ "${{ inputs.toolchain }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
fi
if [ "${{ inputs.with-ace }}" = "true" ]; then
set -x
fi
SIS_CMAKE_BUILD_DIR="${{ github.workspace }}/build" ./run_all_examples.sh -M
- name: Run examples (native cmd)
if: runner.os == 'Windows'
shell: cmd
env:
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
SIS_CMAKE_BUILD_DIR: ${{ github.workspace }}\build
run: |
if "${{ inputs.toolchain }}"=="mingw" set "PATH=%MSYS2_LOCATION%\mingw64\bin;%PATH%"
call run_all_examples.cmd
if errorlevel 1 exit /b 1
test-unit:
name: Unit tests (${{ inputs.cell-id }})
needs: build
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
# Dynamically linked ACE backends need libACE on the run runner
# (artifact download does not carry the system shared library).
- name: Install ACE (Ubuntu)
if: inputs.with-ace && runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libace-dev
- name: Setup MSYS2 MinGW
id: msys2
if: runner.os == 'Windows' && inputs.toolchain == 'mingw'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-toolchain
- name: Download build tree
uses: actions/download-artifact@v4
with:
name: sis-build-${{ inputs.cell-id }}
path: build
# download-artifact does not restore Unix execute bits;
# run_all_*.sh discovery requires -perm -100 (or *.exe on Windows).
# Skip CMakeFiles and compiler deps — name globs also match
# e.g. test.component.*.cpp.o.d / example*.c.o.d; chmod +x on those
# makes tip runners treat them as programs (exit 127).
- name: Restore execute bits on test and example binaries
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
find build -type f \
! -path '*/CMakeFiles/*' \
! -name '*.d' \
! -name '*.o' \
! -name '*.obj' \
\( \
-name 'test_unit*' -o -name 'test.unit.*' -o \
-name 'test_component*' -o -name 'test.component.*' -o \
-name 'test_performance*' -o -name 'test.performance.*' -o \
-name 'test_scratch*' -o -name 'test.scratch.*' -o \
\( -name 'example*' ! -name '*.md' \) \
\) -exec chmod +x {} +
- name: Run unit tests (Bash)
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
if [ "${{ inputs.toolchain }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
fi
if [ "${{ inputs.with-ace }}" = "true" ]; then
set -x
SIS_CMAKE_BUILD_DIR="${{ github.workspace }}/build" ./run_all_unit_tests.sh -M --unit-only --verbosity 9
else
SIS_CMAKE_BUILD_DIR="${{ github.workspace }}/build" ./run_all_unit_tests.sh -M --unit-only
fi
- name: Run unit tests (native cmd)
if: runner.os == 'Windows'
shell: cmd
env:
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
SIS_CMAKE_BUILD_DIR: ${{ github.workspace }}\build
run: |
if "${{ inputs.toolchain }}"=="mingw" set "PATH=%MSYS2_LOCATION%\mingw64\bin;%PATH%"
call run_all_unit_tests.cmd --unit-only
if errorlevel 1 exit /b 1
test-component:
name: Component tests (${{ inputs.cell-id }})
needs: build
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
# Dynamically linked ACE backends need libACE on the run runner
# (artifact download does not carry the system shared library).
- name: Install ACE (Ubuntu)
if: inputs.with-ace && runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libace-dev
- name: Setup MSYS2 MinGW
id: msys2
if: runner.os == 'Windows' && inputs.toolchain == 'mingw'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-toolchain
- name: Download build tree
uses: actions/download-artifact@v4
with:
name: sis-build-${{ inputs.cell-id }}
path: build
# download-artifact does not restore Unix execute bits;
# run_all_*.sh discovery requires -perm -100 (or *.exe on Windows).
# Skip CMakeFiles and compiler deps — name globs also match
# e.g. test.component.*.cpp.o.d / example*.c.o.d; chmod +x on those
# makes tip runners treat them as programs (exit 127).
- name: Restore execute bits on test and example binaries
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
find build -type f \
! -path '*/CMakeFiles/*' \
! -name '*.d' \
! -name '*.o' \
! -name '*.obj' \
\( \
-name 'test_unit*' -o -name 'test.unit.*' -o \
-name 'test_component*' -o -name 'test.component.*' -o \
-name 'test_performance*' -o -name 'test.performance.*' -o \
-name 'test_scratch*' -o -name 'test.scratch.*' -o \
\( -name 'example*' ! -name '*.md' \) \
\) -exec chmod +x {} +
- name: Run component tests (Bash)
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
if [ "${{ inputs.toolchain }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
fi
if [ "${{ inputs.with-ace }}" = "true" ]; then
set -x
SIS_CMAKE_BUILD_DIR="${{ github.workspace }}/build" ./run_all_component_tests.sh -M --verbosity 9
else
SIS_CMAKE_BUILD_DIR="${{ github.workspace }}/build" ./run_all_component_tests.sh -M
fi
- name: Run component tests (native cmd)
if: runner.os == 'Windows'
shell: cmd
env:
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
SIS_CMAKE_BUILD_DIR: ${{ github.workspace }}\build
run: |
if "${{ inputs.toolchain }}"=="mingw" set "PATH=%MSYS2_LOCATION%\mingw64\bin;%PATH%"
call run_all_component_tests.cmd
if errorlevel 1 exit /b 1
test-scratch:
name: Scratch tests (${{ inputs.cell-id }})
needs: build
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
# Dynamically linked ACE backends need libACE on the run runner
# (artifact download does not carry the system shared library).
- name: Install ACE (Ubuntu)
if: inputs.with-ace && runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libace-dev
- name: Setup MSYS2 MinGW
id: msys2
if: runner.os == 'Windows' && inputs.toolchain == 'mingw'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-toolchain
- name: Download build tree
uses: actions/download-artifact@v4
with:
name: sis-build-${{ inputs.cell-id }}
path: build
# download-artifact does not restore Unix execute bits;
# run_all_*.sh discovery requires -perm -100 (or *.exe on Windows).
# Skip CMakeFiles and compiler deps — name globs also match
# e.g. test.component.*.cpp.o.d / example*.c.o.d; chmod +x on those
# makes tip runners treat them as programs (exit 127).
- name: Restore execute bits on test and example binaries
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
find build -type f \
! -path '*/CMakeFiles/*' \
! -name '*.d' \
! -name '*.o' \
! -name '*.obj' \
\( \
-name 'test_unit*' -o -name 'test.unit.*' -o \
-name 'test_component*' -o -name 'test.component.*' -o \
-name 'test_performance*' -o -name 'test.performance.*' -o \
-name 'test_scratch*' -o -name 'test.scratch.*' -o \
\( -name 'example*' ! -name '*.md' \) \
\) -exec chmod +x {} +
- name: Run scratch tests (Bash)
if: runner.os != 'Windows'
shell: bash
run: |
set -euo pipefail
if [ "${{ inputs.toolchain }}" = "mingw" ]; then
export PATH="/mingw64/bin:$PATH"
fi
if [ "${{ inputs.with-ace }}" = "true" ]; then
set -x
fi
SIS_CMAKE_BUILD_DIR="${{ github.workspace }}/build" ./run_all_scratch_tests.sh -M
# Windows: --skip-interactive omits MessageBox / speech (and kin) that
# hang headless GHA; list is .sis/ci_scratch_tests_skip_interactive.txt.
- name: Run scratch tests (native cmd)
if: runner.os == 'Windows'
shell: cmd
env:
MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
SIS_CMAKE_BUILD_DIR: ${{ github.workspace }}\build
run: |
if "${{ inputs.toolchain }}"=="mingw" set "PATH=%MSYS2_LOCATION%\mingw64\bin;%PATH%"
call run_all_scratch_tests.cmd --skip-interactive
if errorlevel 1 exit /b 1