ci: target the GCC 16 builder runner
VoidBuildSystem CI / signing-openssl-gcc16 (push) Successful in 1m43s
VoidBuildSystem CI / fuzz-clang (push) Failing after 1m48s
VoidBuildSystem CI / sanitizers-gcc16 (push) Successful in 3m14s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 7m21s

This commit is contained in:
faumaray committed 2026-12-05 14:29:35 +03:00
1 parent a6dfa95ca2
commit 97709d37a5
2 files changed
+72 -84

No files matched your search

+43 -58
View File
@@ -1,10 +1,9 @@
# VoidBuildSystem CI (Gitea Actions). # VoidBuildSystem CI (Gitea Actions).
# #
# Runner: `linux` (host mode) - the machine with the documented dev toolchain: # Runner: `echoion-release-serial` - the GCC 16.1.0 builder container (Debian-based,
# dev cpp-gcc -c <cmd> (GCC 16.2, CMake, Ninja) # with CMake, Ninja, Node and pkg-config). GCC 16 is required for C++26; the generic
# dev cpp -c <cmd> (Clang 23 + libFuzzer) # `ubuntu-*` images ship an older GCC and are not used.
# Optional steps add Nix packages with `dev ... -p <pkg>` (openssl, wine64, MinGW). # Clang (for libFuzzer) and OpenSSL headers are installed at job time with apt.
# The generic `ubuntu-*` Docker runners have no GCC 16, so they are not used here.
name: VoidBuildSystem CI name: VoidBuildSystem CI
on: on:
@@ -15,42 +14,33 @@ on:
jobs: jobs:
build-and-test-gcc16: build-and-test-gcc16:
runs-on: linux runs-on: echoion-release-serial
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up the dev toolchain - name: Check the toolchain
run: | run: |
for dir in /etc/profiles/per-user/*/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin; do g++ --version | head -1
if [ -d "$dir" ] && [ -x "$dir/dev" ]; then major="$(g++ -dumpversion | cut -d. -f1)"
export PATH="$dir:$PATH" if [ "${major:-0}" -lt 16 ]; then
break echo "GCC 16 or newer is required for C++26 (found ${major:-unknown})" >&2
fi exit 1
done fi
command -v dev || { echo "the 'dev' toolchain wrapper was not found on this runner" >&2; exit 1; } cmake --version | head -1
echo "PATH=$PATH" >> "$GITHUB_ENV" ninja --version
dev cpp-gcc -c g++ --version | head -1
- name: Configure (Debug, Ninja, GCC 16 C++26) - name: Configure (Debug, Ninja, GCC 16 C++26)
run: | run: |
dev cpp-gcc -c cmake -S . -B build/ci-gcc -G Ninja \ cmake -S . -B build/ci-gcc -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Build - name: Build
run: dev cpp-gcc -c cmake --build build/ci-gcc --parallel 4 run: cmake --build build/ci-gcc --parallel 4
- name: Run CTest suites - name: Run CTest suites
run: | run: |
set -o pipefail set -o pipefail
dev cpp-gcc -c ctest --test-dir build/ci-gcc --output-on-failure 2>&1 | tee ctest.log ctest --test-dir build/ci-gcc --output-on-failure 2>&1 | tee ctest.log
- name: Check formatting on owned C++ files
run: |
dev cpp-gcc -c clang-format --dry-run --Werror \
build.cpp build.profiles.cpp build-support/*.hpp build-support/*.cpp \
sdk/*.cpp include/Void/Build.hpp include/Void/Build/*/*.hpp \
src/*.cpp src/*/*.cpp src/*/*/*.cpp \
recipes/*/*.hpp recipes/*/*.cpp \
registry/include/Void/Build/Registry/*.hpp registry/service/*.cpp registry/cli/*.cpp \
benchmarks/*.cpp tests/*.cpp
- name: Benchmark smoke run - name: Benchmark smoke run
run: dev cpp-gcc -c build/ci-gcc/bin/vbs_benchmarks 15 run: build/ci-gcc/bin/vbs_benchmarks 15
- name: Upload build artifacts - name: Upload build artifacts
if: always() if: always()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -65,19 +55,24 @@ jobs:
retention-days: 14 retention-days: 14
signing-openssl-gcc16: signing-openssl-gcc16:
runs-on: linux runs-on: echoion-release-serial
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install OpenSSL headers
run: |
apt-get update
apt-get install -y libssl-dev || sudo apt-get install -y libssl-dev
- name: Configure (Debug, Ninja, GCC 16 C++26, OpenSSL) - name: Configure (Debug, Ninja, GCC 16 C++26, OpenSSL)
run: | run: |
dev cpp-gcc -p openssl -c cmake -S . -B build/ci-openssl -G Ninja \ cmake -S . -B build/ci-openssl -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Build vbs_v1_tests - name: Build vbs_v1_tests
run: dev cpp-gcc -p openssl -c cmake --build build/ci-openssl --target vbs_v1_tests --parallel 4 run: cmake --build build/ci-openssl --target vbs_v1_tests --parallel 4
- name: Run Signing suite with the OpenSSL backend - name: Run Signing suite with the OpenSSL backend
run: | run: |
output=$(dev cpp-gcc -p openssl -c build/ci-openssl/bin/vbs_v1_tests --suite Signing --no-color) output=$(build/ci-openssl/bin/vbs_v1_tests --suite Signing --no-color)
printf '%s\n' "$output" printf '%s\n' "$output"
if printf '%s\n' "$output" | grep -q 'SKIP'; then if printf '%s\n' "$output" | grep -q 'SKIP'; then
echo "Signing checks were skipped: the OpenSSL backend was not enabled" >&2 echo "Signing checks were skipped: the OpenSSL backend was not enabled" >&2
@@ -85,24 +80,25 @@ jobs:
fi fi
sanitizers-gcc16: sanitizers-gcc16:
runs-on: linux runs-on: echoion-release-serial
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Configure with ASan + UBSan - name: Configure with ASan + UBSan
run: | run: |
dev cpp-gcc -c cmake -S . -B build/ci-asan -G Ninja \ cmake -S . -B build/ci-asan -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \ -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \ -DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
- name: Build - name: Build
run: dev cpp-gcc -c cmake --build build/ci-asan --parallel 4 run: cmake --build build/ci-asan --parallel 4
- name: Run sanitizer-safe suites - name: Run sanitizer-safe suites
env: env:
ASAN_OPTIONS: detect_leaks=1 ASAN_OPTIONS: detect_leaks=1
UBSAN_OPTIONS: print_stacktrace=1 UBSAN_OPTIONS: print_stacktrace=1
run: | run: |
dev cpp-gcc -c ctest --test-dir build/ci-asan -R "vbs_sdk_tests|vbs_core_tests" --output-on-failure ctest --test-dir build/ci-asan -R "vbs_sdk_tests|vbs_core_tests" --output-on-failure
- name: Upload sanitizer logs - name: Upload sanitizer logs
if: always() if: always()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -111,37 +107,26 @@ jobs:
path: build/ci-asan/Testing/**/LastTest.log path: build/ci-asan/Testing/**/LastTest.log
retention-days: 14 retention-days: 14
wine-windows-gcc16:
runs-on: linux
steps:
- uses: actions/checkout@v4
- name: Configure (Debug, Ninja, GCC 16 C++26)
run: |
dev cpp-gcc -c cmake -S . -B build/ci-wine -G Ninja \
-DCMAKE_BUILD_TYPE=Debug
- name: Build vbs and vbs_v1_tests
run: dev cpp-gcc -c cmake --build build/ci-wine --target vbs vbs_v1_tests --parallel 4
- name: Run the Windows target cross-build test under Wine
run: |
dev cpp-gcc -p wine64 -p pkgsCross.mingwW64.stdenv.cc -c \
build/ci-wine/bin/vbs_v1_tests \
--filter track_c_windows_target_cross_build_and_wine_test --no-color
fuzz-clang: fuzz-clang:
runs-on: linux runs-on: echoion-release-serial
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Clang
run: |
apt-get update
apt-get install -y clang || sudo apt-get install -y clang
- name: Configure (Debug, Ninja) - name: Configure (Debug, Ninja)
run: | run: |
dev cpp-gcc -c cmake -S . -B build/ci-fuzz -G Ninja \ cmake -S . -B build/ci-fuzz -G Ninja \
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER=g++
- name: Build vbs (for the VoidLibrary headers) - name: Build vbs (for the VoidLibrary headers)
run: dev cpp-gcc -c cmake --build build/ci-fuzz --target vbs --parallel 4 run: cmake --build build/ci-fuzz --target vbs --parallel 4
- name: Fuzz the header-only parsers for 60 seconds - name: Fuzz the header-only parsers for 60 seconds
env: env:
VOID_INCLUDE_DIR: ${{ github.workspace }}/build/ci-fuzz/_deps/voidlibrary-src/include VOID_INCLUDE_DIR: ${{ github.workspace }}/build/ci-fuzz/_deps/voidlibrary-src/include
FUZZ_OUT: ${{ github.workspace }}/build/fuzz FUZZ_OUT: ${{ github.workspace }}/build/fuzz
run: dev cpp -c bash fuzz/run.sh 60 run: bash fuzz/run.sh 60
- name: Upload the fuzz corpus - name: Upload the fuzz corpus
if: always() if: always()
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
+29 -26
View File
@@ -1,11 +1,11 @@
# VoidBuildSystem release (Gitea Actions). # VoidBuildSystem release (Gitea Actions).
# #
# Triggered by a `v*` tag. Builds a Release configuration, runs the full suite, packages # Triggered by a `v*` tag (or manually). Builds a Release configuration, runs the full suite,
# binaries, the SDK and the deterministic source archive, uploads them as CI artifacts, and # packages binaries, the SDK and the deterministic source archive, uploads them as CI
# creates (or updates) the Gitea release with the same files attached. # artifacts, and creates (or updates) the Gitea release with the same files attached.
# #
# Runner: `linux` (host) for the dev toolchain (`dev cpp-gcc -c ...`); the release upload uses # Runner: `echoion-release-serial` - the GCC 16.1.0 builder container. The release upload
# the automatically provided GITHUB_TOKEN with repository write access. # uses the automatically provided GITHUB_TOKEN with repository write access.
name: Release name: Release
on: on:
@@ -18,48 +18,50 @@ permissions:
jobs: jobs:
release: release:
runs-on: linux runs-on: echoion-release-serial
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up the dev toolchain - name: Check the toolchain
run: | run: |
for dir in /etc/profiles/per-user/*/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin; do g++ --version | head -1
if [ -d "$dir" ] && [ -x "$dir/dev" ]; then major="$(g++ -dumpversion | cut -d. -f1)"
export PATH="$dir:$PATH" if [ "${major:-0}" -lt 16 ]; then
break echo "GCC 16 or newer is required for C++26 (found ${major:-unknown})" >&2
fi exit 1
done fi
command -v dev || { echo "the 'dev' toolchain wrapper was not found on this runner" >&2; exit 1; }
echo "PATH=$PATH" >> "$GITHUB_ENV"
dev cpp-gcc -c g++ --version | head -1
- name: Verify the tag matches the project version - name: Verify the tag matches the project version
run: | run: |
tag="${GITHUB_REF_NAME}" tag="${GITHUB_REF_NAME}"
version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)" version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)"
echo "tag=${tag} project version=${version}" echo "tag=${tag} project version=${version}"
case "${tag}" in
v*) ;;
*) echo "not a release tag (${tag}); skipping the version check" ; exit 0 ;;
esac
if [ "${tag#v}" != "${version}" ]; then if [ "${tag#v}" != "${version}" ]; then
echo "tag ${tag} does not match the project version ${version}" >&2 echo "tag ${tag} does not match the project version ${version}" >&2
exit 1 exit 1
fi fi
- name: Configure (Release, Ninja) - name: Configure (Release, Ninja)
run: | run: |
dev cpp-gcc -c cmake -S . -B build/release -G Ninja \ cmake -S . -B build/release -G Ninja \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Build - name: Build
run: dev cpp-gcc -c cmake --build build/release --parallel 4 run: cmake --build build/release --parallel 4
- name: Run the full suite - name: Run the full suite
run: | run: |
set -o pipefail set -o pipefail
dev cpp-gcc -c ctest --test-dir build/release --output-on-failure 2>&1 | tee ctest-release.log ctest --test-dir build/release --output-on-failure 2>&1 | tee ctest-release.log
- name: Package binaries, SDK and source - name: Package binaries, SDK and source
run: | run: |
set -eu set -eu
tag="${GITHUB_REF_NAME}" tag="${GITHUB_REF_NAME}"
stage="$(mktemp -d)" stage="$(mktemp -d)"
mkdir -p "${stage}/bin" "${stage}/include" "${stage}/lib" "dist" mkdir -p "${stage}/bin" "${stage}/include" "${stage}/lib" dist
cp build/release/bin/vbs build/release/bin/vbs-registry "${stage}/bin/" cp build/release/bin/vbs build/release/bin/vbs-registry "${stage}/bin/"
cp -r include/Void "${stage}/include/" cp -r include/Void "${stage}/include/"
cp build/release/libVoidBuild_Sdk.a "${stage}/lib/" 2>/dev/null || \ cp build/release/libVoidBuild_Sdk.a "${stage}/lib/" 2>/dev/null || \
@@ -67,10 +69,7 @@ jobs:
cp README.md "${stage}/" cp README.md "${stage}/"
tar --sort=name --mtime='@0' --owner=0 --group=0 --numeric-owner \ tar --sort=name --mtime='@0' --owner=0 --group=0 --numeric-owner \
-czf "dist/vbs-${tag}-linux-x86_64.tar.gz" -C "${stage}" . -czf "dist/vbs-${tag}-linux-x86_64.tar.gz" -C "${stage}" .
build/release/bin/vbs pack --project . --output "dist/vbs-${tag}-source.tar" \ build/release/bin/vbs pack --project . --output "dist/vbs-${tag}-source.tar"
|| tar --sort=name --mtime='@0' --owner=0 --group=0 --numeric-owner \
--exclude=.git --exclude=build --exclude=.vbs \
-czf "dist/vbs-${tag}-source.tar.gz" .
cp ctest-release.log dist/ cp ctest-release.log dist/
sha256sum dist/* > dist/SHA256SUMS sha256sum dist/* > dist/SHA256SUMS
ls -l dist/ ls -l dist/
@@ -88,16 +87,20 @@ jobs:
run: | run: |
set -eu set -eu
tag="${GITHUB_REF_NAME}" tag="${GITHUB_REF_NAME}"
case "${tag}" in
v*) ;;
*) echo "not a release tag (${tag}); skipping the release upload" ; exit 0 ;;
esac
api="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" api="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
body="$(printf 'Release %s\n\nBuilt from %s with the full CTest suite green.\nSee SHA256SUMS for artifact digests.' "${tag}" "${GITHUB_SHA}")" body="$(printf 'Release %s\n\nBuilt from %s with the full CTest suite green.\nSee SHA256SUMS for artifact digests.' "${tag}" "${GITHUB_SHA}")"
payload="$(printf '{"tag_name":"%s","name":"%s","body":"%s","draft":false,"prerelease":false}' \ payload="$(printf '{"tag_name":"%s","name":"%s","body":"%s","draft":false,"prerelease":false}' \
"${tag}" "${tag}" "${body}")" "${tag}" "${tag}" "${body}")"
release_id="$(curl -fsS -X POST -H "Authorization: token ${TOKEN}" \ release_id="$(curl -fsS -X POST -H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" -d "${payload}" \ -H "Content-Type: application/json" -d "${payload}" \
"${api}/releases" | sed -nE 's/.*"id":([0-9]+).*/\1/p' | head -1)" "${api}/releases" | python3 -c 'import json,sys; print(json.load(sys.stdin).get("id",""))')"
if [ -z "${release_id}" ]; then if [ -z "${release_id}" ]; then
release_id="$(curl -fsS -H "Authorization: token ${TOKEN}" \ release_id="$(curl -fsS -H "Authorization: token ${TOKEN}" \
"${api}/releases/tags/${tag}" | sed -nE 's/.*"id":([0-9]+).*/\1/p' | head -1)" "${api}/releases/tags/${tag}" | python3 -c 'import json,sys; print(json.load(sys.stdin).get("id",""))')"
fi fi
test -n "${release_id}" test -n "${release_id}"
for file in dist/*; do for file in dist/*; do