# VoidBuildSystem CI (Gitea Actions). # # Runner: `echoion-release-serial` - the GCC 16.1.0 builder container (Debian-based, # with CMake, Ninja, Node and pkg-config). GCC 16 is required for C++26; the generic # `ubuntu-*` images ship an older GCC and are not used. # Clang (for libFuzzer) and OpenSSL headers are installed at job time with apt. name: VoidBuildSystem CI on: push: branches: [main] pull_request: workflow_dispatch: jobs: build-and-test-gcc16: runs-on: echoion-release-serial steps: - uses: actions/checkout@v4 - name: Check the toolchain run: | g++ --version | head -1 major="$(g++ -dumpversion | cut -d. -f1)" if [ "${major:-0}" -lt 16 ]; then echo "GCC 16 or newer is required for C++26 (found ${major:-unknown})" >&2 exit 1 fi cmake --version | head -1 ninja --version - name: Configure (Debug, Ninja, GCC 16 C++26) run: | cmake -S . -B build/ci-gcc -G Ninja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - name: Build run: cmake --build build/ci-gcc --parallel 4 - name: Run CTest suites run: | set -o pipefail ctest --test-dir build/ci-gcc --output-on-failure 2>&1 | tee ctest.log - name: Benchmark smoke run run: build/ci-gcc/bin/vbs_benchmarks 15 - name: Upload build artifacts if: always() uses: actions/upload-artifact@v3 with: name: vbs-debug-linux-x86_64 path: | build/ci-gcc/bin/vbs build/ci-gcc/bin/vbs-registry build/ci-gcc/bin/vbs_v1_tests build/ci-gcc/compile_commands.json ctest.log retention-days: 14 signing-openssl-gcc16: runs-on: echoion-release-serial steps: - 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) run: | cmake -S . -B build/ci-openssl -G Ninja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - name: Build vbs_v1_tests run: cmake --build build/ci-openssl --target vbs_v1_tests --parallel 4 - name: Run Signing suite with the OpenSSL backend run: | output=$(build/ci-openssl/bin/vbs_v1_tests --suite Signing --no-color) printf '%s\n' "$output" if printf '%s\n' "$output" | grep -q 'SKIP'; then echo "Signing checks were skipped: the OpenSSL backend was not enabled" >&2 exit 1 fi sanitizers-gcc16: runs-on: echoion-release-serial steps: - uses: actions/checkout@v4 - name: Configure with ASan + UBSan run: | cmake -S . -B build/ci-asan -G Ninja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_CXX_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" - name: Build run: cmake --build build/ci-asan --parallel 4 - name: Run sanitizer-safe suites env: ASAN_OPTIONS: detect_leaks=1 UBSAN_OPTIONS: print_stacktrace=1 run: | ctest --test-dir build/ci-asan -R "vbs_sdk_tests|vbs_core_tests" --output-on-failure - name: Upload sanitizer logs if: always() uses: actions/upload-artifact@v3 with: name: vbs-asan-ubsan-logs path: build/ci-asan/Testing/**/LastTest.log retention-days: 14 fuzz-clang: runs-on: echoion-release-serial steps: - 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) run: | cmake -S . -B build/ci-fuzz -G Ninja \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_COMPILER=g++ - name: Build vbs (for the VoidLibrary headers) run: cmake --build build/ci-fuzz --target vbs --parallel 4 - name: Fuzz the header-only parsers for 60 seconds env: VOID_INCLUDE_DIR: ${{ github.workspace }}/build/ci-fuzz/_deps/voidlibrary-src/include FUZZ_OUT: ${{ github.workspace }}/build/fuzz run: bash fuzz/run.sh 60 - name: Upload the fuzz corpus if: always() uses: actions/upload-artifact@v3 with: name: vbs-fuzz-corpus path: build/fuzz/corpus retention-days: 14