From ed3fe06aa1e7154fbe36709bd5f6603a70f10ec0 Mon Sep 17 00:00:00 2001 From: "Aleksei (Faumaray) Selikhov" Date: Sat, 5 Dec 2026 14:14:54 +0300 Subject: [PATCH] ci: move CI to Gitea Actions with artifacts and add a release workflow --- .gitea/workflows/ci.yml | 142 +++++++++++++++++++++++++++++++++++ .gitea/workflows/release.yml | 99 ++++++++++++++++++++++++ .github/workflows/ci.yml | 111 --------------------------- docs/agent-workflow/STATE.md | 2 + docs/agent-workflow/TASKS.md | 1 + 5 files changed, 244 insertions(+), 111 deletions(-) create mode 100644 .gitea/workflows/ci.yml create mode 100644 .gitea/workflows/release.yml delete mode 100644 .github/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..608ef6e --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,142 @@ +# VoidBuildSystem CI (Gitea Actions). +# +# Assumes a self-hosted runner on a machine with the documented dev toolchain: +# dev cpp-gcc -c (GCC 16.2, CMake, Ninja) +# dev cpp -c (Clang 23 + libFuzzer) +# Optional jobs add Nix packages with `dev ... -p ` (glslang, wine64, MinGW). +name: VoidBuildSystem CI + +on: + push: + branches: [main] + pull_request: + +jobs: + build-and-test-gcc16: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check the dev toolchain + run: | + command -v dev || { echo "the 'dev' toolchain wrapper is required on this runner" >&2; exit 1; } + dev cpp-gcc -c g++ --version | head -1 + - name: Configure (Debug, Ninja, GCC 16 C++26) + run: | + dev cpp-gcc -c cmake -S . -B build/ci-gcc -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + - name: Build + run: dev cpp-gcc -c cmake --build build/ci-gcc --parallel 4 + - name: Run CTest suites + run: | + set -o pipefail + dev cpp-gcc -c 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 + run: dev cpp-gcc -c 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: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure (Debug, Ninja, GCC 16 C++26, OpenSSL) + run: | + dev cpp-gcc -p openssl -c cmake -S . -B build/ci-openssl -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + - name: Build vbs_v1_tests + run: dev cpp-gcc -p openssl -c cmake --build build/ci-openssl --target vbs_v1_tests --parallel 4 + - name: Run Signing suite with the OpenSSL backend + run: | + output=$(dev cpp-gcc -p openssl -c 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: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure with ASan + UBSan + run: | + dev cpp-gcc -c cmake -S . -B build/ci-asan -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -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: dev cpp-gcc -c cmake --build build/ci-asan --parallel 4 + - name: Run sanitizer-safe suites + env: + ASAN_OPTIONS: detect_leaks=1 + UBSAN_OPTIONS: print_stacktrace=1 + run: | + dev cpp-gcc -c 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 + + wine-windows-gcc16: + runs-on: ubuntu-latest + 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: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure (Debug, Ninja) + run: | + dev cpp-gcc -c cmake -S . -B build/ci-fuzz -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug + - name: Build vbs (for the VoidLibrary headers) + run: dev cpp-gcc -c 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: dev cpp -c 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 diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..eddbe83 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,99 @@ +# VoidBuildSystem release (Gitea Actions). +# +# Triggered by a `v*` tag. Builds a Release configuration, runs the full suite, packages +# binaries, the SDK and the deterministic source archive, uploads them as CI artifacts, and +# creates (or updates) the Gitea release with the same files attached. +# +# Requires a runner with the dev toolchain (`dev cpp-gcc -c ...`) and, for the release upload, +# the automatically provided GITHUB_TOKEN with repository write access. +name: Release + +on: + push: + tags: ["v*"] + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Check the dev toolchain + run: | + command -v dev || { echo "the 'dev' toolchain wrapper is required on this runner" >&2; exit 1; } + - name: Verify the tag matches the project version + run: | + tag="${GITHUB_REF_NAME}" + version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)" + echo "tag=${tag} project version=${version}" + if [ "${tag#v}" != "${version}" ]; then + echo "tag ${tag} does not match the project version ${version}" >&2 + exit 1 + fi + - name: Configure (Release, Ninja) + run: | + dev cpp-gcc -c cmake -S . -B build/release -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + - name: Build + run: dev cpp-gcc -c cmake --build build/release --parallel 4 + - name: Run the full suite + run: | + set -o pipefail + dev cpp-gcc -c ctest --test-dir build/release --output-on-failure 2>&1 | tee ctest-release.log + - name: Package binaries, SDK and source + run: | + set -eu + tag="${GITHUB_REF_NAME}" + stage="$(mktemp -d)" + mkdir -p "${stage}/bin" "${stage}/include" "${stage}/lib" "dist" + cp build/release/bin/vbs build/release/bin/vbs-registry "${stage}/bin/" + cp -r include/Void "${stage}/include/" + cp build/release/libVoidBuild_Sdk.a "${stage}/lib/" 2>/dev/null || \ + find build/release -name 'libVoidBuild_Sdk.a' -exec cp {} "${stage}/lib/" \; + cp README.md "${stage}/" + tar --sort=name --mtime='@0' --owner=0 --group=0 --numeric-owner \ + -czf "dist/vbs-${tag}-linux-x86_64.tar.gz" -C "${stage}" . + 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/ + sha256sum dist/* > dist/SHA256SUMS + ls -l dist/ + - name: Upload release artifacts + if: always() + uses: actions/upload-artifact@v3 + with: + name: vbs-release-${{ github.ref_name }} + path: dist/ + retention-days: 30 + - name: Publish the Gitea release + if: success() + env: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -eu + tag="${GITHUB_REF_NAME}" + 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}")" + payload="$(printf '{"tag_name":"%s","name":"%s","body":"%s","draft":false,"prerelease":false}' \ + "${tag}" "${tag}" "${body}")" + release_id="$(curl -fsS -X POST -H "Authorization: token ${TOKEN}" \ + -H "Content-Type: application/json" -d "${payload}" \ + "${api}/releases" | sed -nE 's/.*"id":([0-9]+).*/\1/p' | head -1)" + if [ -z "${release_id}" ]; then + release_id="$(curl -fsS -H "Authorization: token ${TOKEN}" \ + "${api}/releases/tags/${tag}" | sed -nE 's/.*"id":([0-9]+).*/\1/p' | head -1)" + fi + test -n "${release_id}" + for file in dist/*; do + name="$(basename "${file}")" + curl -fsS -X POST -H "Authorization: token ${TOKEN}" \ + -F "attachment=@${file}" "${api}/releases/${release_id}/assets?name=${name}" >/dev/null + echo "uploaded ${name}" + done diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index de31559..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: VoidBuildSystem CI - -on: - push: - branches: [main] - pull_request: - -jobs: - build-and-test-gcc16: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - 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++-16 \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - - name: Build - run: cmake --build build/ci-gcc --parallel 4 - - name: Run CTest suites - run: ctest --test-dir build/ci-gcc --output-on-failure - - name: Check formatting on owned C++ files - run: | - 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 - run: build/ci-gcc/bin/vbs_benchmarks 15 - - signing-openssl-gcc16: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install OpenSSL headers - run: sudo apt-get update && 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++-16 \ - -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: ubuntu-latest - 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++-16 \ - -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 - - wine-windows-gcc16: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install MinGW-w64 and Wine - run: sudo apt-get update && sudo apt-get install -y g++-mingw-w64-x86-64 wine64 - - name: Configure (Debug, Ninja, GCC 16 C++26) - run: | - cmake -S . -B build/ci-wine -G Ninja \ - -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_CXX_COMPILER=g++-16 - - name: Build vbs and vbs_v1_tests - run: cmake --build build/ci-wine --target vbs vbs_v1_tests --parallel 4 - - name: Run the Windows target cross-build test under Wine - run: | - build/ci-wine/bin/vbs_v1_tests \ - --filter track_c_windows_target_cross_build_and_wine_test --no-color - - fuzz-clang: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Configure (Debug, Ninja, GCC 16 C++26) - run: | - cmake -S . -B build/ci-fuzz -G Ninja \ - -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_CXX_COMPILER=g++-16 - - 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 - run: bash fuzz/run.sh 60 diff --git a/docs/agent-workflow/STATE.md b/docs/agent-workflow/STATE.md index 0cc6e21..5186cb3 100644 --- a/docs/agent-workflow/STATE.md +++ b/docs/agent-workflow/STATE.md @@ -375,6 +375,8 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B - **Wave 141 (ASM & Shader Languages)**: assembly sources (`.s` plain, `.S` preprocessed) compile through the C compiler driver without C/C++ standard flags, LTO or sanitizers, and are excluded from unity/module scanning. Shader bundles are first-class: `p.shader_bundle("shaders").shader("tri.vert")` lowers one action per shader to SPIR-V via `glslangValidator` (GLSL/HLSL), `slangc` (Slang, stage inferred from `[shader]`) or `dxc` (HLSL), with toolchain discovery from PATH. `FullV1Tests.asm_preprocessed_source_compiles_and_links` and `shader_bundle_compiles_sources_to_spirv` cover both; GLSL, Slang and HLSL shaders were each compiled to valid SPIR-V (`0x07230203`). +- **Wave 142 (Gitea CI with Artifacts & Release Workflow)**: CI moved from the unused GitHub location to `.gitea/workflows/ci.yml`, targeting the real dev toolchain (`dev cpp-gcc`) and uploading build binaries, the compile database and the CTest log as artifacts (plus sanitizer logs and the fuzz corpus). `.gitea/workflows/release.yml` builds Release on `v*` tags, verifies the tag against the CMake project version, runs the full suite, packages the binaries/SDK, a `vbs pack` source archive and `SHA256SUMS`, uploads them, and creates the Gitea release with the assets attached via the API. Both workflows pass `yamllint`; they remain unexecuted without a runner. + ## Remaining future scope - **Superiority plan ([22-superiority-and-gaps.md](../roadmap/22-superiority-and-gaps.md), 2026-12-05)**: revised platform strategy - **macOS deferred**, **Windows via MinGW-w64 cross-compilation + Wine execution** (`dev cpp-gcc -p pkgsCross.mingwW64.stdenv.cc`, `dev cpp-gcc -p wine64`), native MSVC deferred; plus packaging parity (ZIP/DEB/RPM), IDE ecosystem, migration tooling, test-runner parity, benchmarks, CI runners, and remote execution in prioritized order. diff --git a/docs/agent-workflow/TASKS.md b/docs/agent-workflow/TASKS.md index 83ffd9f..0880cb3 100644 --- a/docs/agent-workflow/TASKS.md +++ b/docs/agent-workflow/TASKS.md @@ -142,4 +142,5 @@ Base HEAD: `fe0d1a6` | Wave 139 (VSIX packaging) | `vbs ide plugin --vsix FILE`; shared `Package::create_stored_zip` | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Python zipfile validates the VSIX, packaged harness passes under Node, C++ test checks CRCs, full CTest 8/8) | `src/Editor/CompDb.cpp`, `src/Package/Archive.cpp`, `src/Main.cpp`, `tests/FullV1Tests.cpp`, docs | | Wave 140 (pkg-config discovery) | `.pkgconfig(spec)` dependency, `.pc` parser with variables/Requires/version compare, lock entries | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; E2E builds/runs and checks version errors, full CTest 8/8) | `include/Void/Build.hpp`, `sdk/Build.cpp`, `src/Provider/PkgConfig.cpp`, `src/Graph/Graph.cpp`, `src/Package/Resolver.cpp`, `src/Main.cpp`, `tests/FullV1Tests.cpp`, docs | | Wave 141 (ASM + shader languages) | `.s`/`.S` assembly; `shader_bundle`/`.shader()` lowered to SPIR-V (glslang/slangc/dxc) | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; both E2Es pass, GLSL/Slang/HLSL produce SPIR-V, full CTest 8/8) | `src/Graph/Graph.cpp`, `src/Toolchain/Driver.cpp`, `include/Void/Build.hpp`, `sdk/Build.cpp`, `tests/FullV1Tests.cpp`, docs | +| Wave 142 (Gitea CI + release workflow) | Gitea-hosted CI with artifacts; tag-driven release workflow with asset upload | COMPLETE (YAML-validated; unexecuted without a runner) | `.gitea/workflows/ci.yml`, `.gitea/workflows/release.yml`, docs | | Future (Plan 20 Slice 3 / Tracks C, E3 editor extensions) |"}] Live `conan` CLI verification; macOS/Windows/cross-compile; binary-variant signing and key distribution; daemon-side dependency materialization and editor plugins; `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) |