Skip to content

Commit a1a6072

Browse files
committed
ci(security): stabilize umbrella CI by isolating integration builds
1 parent 22a5bc9 commit a1a6072

1 file changed

Lines changed: 25 additions & 38 deletions

File tree

.github/workflows/SECURITY_CI.yml

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ env:
6868
BUILD_JOBS: 2
6969

7070
jobs:
71-
build-test:
72-
name: Build and Tests (${{ matrix.compiler }}, examples=${{ matrix.examples }})
71+
build-matrix:
72+
name: Build (${{ matrix.compiler }}, examples=${{ matrix.examples }})
7373
runs-on: ubuntu-latest
7474
strategy:
7575
fail-fast: false
@@ -88,7 +88,6 @@ jobs:
8888
run: |
8989
sudo apt-get update -y
9090
sudo apt-get install -y $DEPS
91-
test -f /usr/include/asio.hpp || echo "System Asio not installed globally; umbrella vendored/fetch path will be used."
9291
9392
- name: Verify critical module directories
9493
run: |
@@ -107,12 +106,12 @@ jobs:
107106
echo "CXX=g++" >> "$GITHUB_ENV"
108107
fi
109108
110-
- name: Configure umbrella build
109+
- name: Configure
111110
run: |
112111
cmake -G Ninja -S . -B build \
113112
-DCMAKE_BUILD_TYPE=Debug \
114113
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
115-
-DVIX_BUILD_TESTS=ON \
114+
-DVIX_BUILD_TESTS=OFF \
116115
-DVIX_BUILD_EXAMPLES=${{ matrix.examples }} \
117116
-DVIX_ENABLE_SANITIZERS=OFF \
118117
-DVIX_ENABLE_WARNINGS=ON \
@@ -136,22 +135,16 @@ jobs:
136135
-DVIX_ENABLE_CLI=ON \
137136
-DVIX_ENABLE_WEBSOCKET=ON
138137
139-
- name: Build umbrella
138+
- name: Build
140139
run: |
141140
cmake --build build -j"${BUILD_JOBS}"
142141
143142
- name: Show generated executables
144143
run: |
145-
echo "---- executables ----"
146144
find build -type f -executable | sort || true
147145
148-
- name: Run ctest
149-
run: |
150-
cd build
151-
ctest --output-on-failure --timeout 120
152-
153146
sanitizers:
154-
name: Sanitizers (clang, examples=ON)
147+
name: Sanitizers (clang)
155148
runs-on: ubuntu-latest
156149

157150
steps:
@@ -176,7 +169,7 @@ jobs:
176169
cmake -G Ninja -S . -B build-san \
177170
-DCMAKE_BUILD_TYPE=Debug \
178171
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
179-
-DVIX_BUILD_TESTS=ON \
172+
-DVIX_BUILD_TESTS=OFF \
180173
-DVIX_BUILD_EXAMPLES=ON \
181174
-DVIX_ENABLE_SANITIZERS=ON \
182175
-DVIX_ENABLE_WARNINGS=ON \
@@ -204,11 +197,6 @@ jobs:
204197
run: |
205198
cmake --build build-san -j"${BUILD_JOBS}"
206199
207-
- name: Run sanitizer tests
208-
run: |
209-
cd build-san
210-
ctest --output-on-failure --timeout 120
211-
212200
runtime-smoke:
213201
name: Runtime Smoke and CLI Checks
214202
runs-on: ubuntu-latest
@@ -273,6 +261,7 @@ jobs:
273261
shell: bash
274262
run: |
275263
set -e
264+
276265
timeout 10s "$VIX_BIN" --help >/tmp/vix_help.log 2>&1 || STATUS=$?
277266
cat /tmp/vix_help.log || true
278267
if [ "${STATUS:-0}" -ne 0 ] && [ "${STATUS:-0}" -ne 124 ]; then
@@ -331,13 +320,13 @@ jobs:
331320
-DVIX_ENABLE_CLI=ON \
332321
-DVIX_ENABLE_WEBSOCKET=ON
333322
334-
- name: Run clang-tidy on umbrella sources
323+
- name: Run clang-tidy
335324
run: |
336325
set +e
337-
find modules tests examples -name '*.cpp' -print0 2>/dev/null | xargs -0 -r -n1 -P2 clang-tidy -p build-analyze
326+
find modules examples -name '*.cpp' -print0 2>/dev/null | xargs -0 -r -n1 -P2 clang-tidy -p build-analyze
338327
exit 0
339328
340-
- name: Run cppcheck on umbrella tree
329+
- name: Run cppcheck
341330
run: |
342331
set +e
343332
cppcheck \
@@ -346,7 +335,7 @@ jobs:
346335
--inconclusive \
347336
--quiet \
348337
--suppress=missingIncludeSystem \
349-
modules/ tests/ examples/
338+
modules/ examples/
350339
exit 0
351340
352341
valgrind:
@@ -423,7 +412,7 @@ jobs:
423412
exit 1
424413
fi
425414
426-
standalone-package-check:
415+
package-export:
427416
name: Umbrella Package Export Check
428417
runs-on: ubuntu-latest
429418

@@ -439,7 +428,7 @@ jobs:
439428
sudo apt-get update -y
440429
sudo apt-get install -y $DEPS
441430
442-
- name: Configure installable umbrella build
431+
- name: Configure installable build
443432
run: |
444433
cmake -G Ninja -S . -B build-install \
445434
-DCMAKE_BUILD_TYPE=Release \
@@ -468,19 +457,17 @@ jobs:
468457
-DVIX_ENABLE_WEBSOCKET=ON \
469458
-DCMAKE_INSTALL_PREFIX="${PWD}/.ci-install"
470459
471-
- name: Build umbrella package
460+
- name: Build package
472461
run: |
473462
cmake --build build-install -j"${BUILD_JOBS}"
474463
475-
- name: Install umbrella package
464+
- name: Install package
476465
run: |
477466
cmake --install build-install
478467
479468
- name: Verify install tree
480469
run: |
481-
echo "---- install tree ----"
482470
find .ci-install -maxdepth 10 -type f | sort || true
483-
484471
test -f .ci-install/lib/cmake/Vix/VixConfig.cmake || (echo "::error::VixConfig.cmake missing"; exit 1)
485472
test -f .ci-install/lib/cmake/Vix/VixConfigVersion.cmake || (echo "::error::VixConfigVersion.cmake missing"; exit 1)
486473
test -f .ci-install/include/vix/json/Simple.hpp || (echo "::error::json headers missing"; exit 1)
@@ -545,7 +532,7 @@ jobs:
545532
-DVIX_ENABLE_WEBRPC=ON \
546533
-DVIX_ENABLE_VALIDATION=ON \
547534
-DVIX_ENABLE_MIDDLEWARE=ON \
548-
-DVIX_ENABLE_CLI=ON \
535+
-DVIX_ENABLE_CLI=OFF \
549536
-DVIX_FORCE_FETCH_JSON=OFF \
550537
-DVIX_FETCH_DEPS=OFF
551538
@@ -557,7 +544,7 @@ jobs:
557544
run: |
558545
cmake -G Ninja -S . -B build-full \
559546
-DCMAKE_BUILD_TYPE=Debug \
560-
-DVIX_BUILD_TESTS=ON \
547+
-DVIX_BUILD_TESTS=OFF \
561548
-DVIX_BUILD_EXAMPLES=ON \
562549
-DVIX_ENABLE_INSTALL=OFF \
563550
-DVIX_ENABLE_SANITIZERS=OFF \
@@ -585,24 +572,24 @@ jobs:
585572
summary:
586573
name: SECURITY_CI Summary
587574
needs:
588-
- build-test
575+
- build-matrix
589576
- sanitizers
590577
- runtime-smoke
591578
- static-analysis
592579
- valgrind
593-
- standalone-package-check
580+
- package-export
594581
- config-coverage
595582
runs-on: ubuntu-latest
596583

597584
steps:
598585
- name: Print summary
599586
run: |
600587
echo "SECURITY_CI completed."
601-
echo "- standard build and tests"
588+
echo "- umbrella build matrix"
602589
echo "- dedicated sanitizer build without install/export"
603-
echo "- CLI runtime smoke"
590+
echo "- runtime smoke"
604591
echo "- static analysis"
605592
echo "- valgrind"
606-
echo "- install/export package"
607-
echo "- consumer find_package(Vix)"
608-
echo "- minimal and full configuration coverage"
593+
echo "- package export"
594+
echo "- consumer package check"
595+
echo "- minimal/full config coverage"

0 commit comments

Comments
 (0)