From e8e209e86292834028dc9794ded3ddee04742941 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Feb 2026 12:31:11 +0000 Subject: [PATCH] ci: add main-branch test workflow and update status badge Adds main-tests.yml which triggers on push to main, running the full compiler matrix (gcc/clang on Linux, msvc/clang on Windows). This replaces the pr-test.yml badge reference in README, which was stale after release-branch merges since pr-test.yml only triggers on PRs. https://claude.ai/code/session_01GGUqtnAHdmrCDegnjHRFpY --- .github/workflows/main-tests.yml | 66 ++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/main-tests.yml diff --git a/.github/workflows/main-tests.yml b/.github/workflows/main-tests.yml new file mode 100644 index 0000000..6eb1e2d --- /dev/null +++ b/.github/workflows/main-tests.yml @@ -0,0 +1,66 @@ +name: Main Branch Tests + +on: + push: + branches: + - main + workflow_dispatch: + +env: + BUILD_TYPE: test + +jobs: + test: + strategy: + fail-fast: false + matrix: + include: + # Linux jobs + - os: ubuntu-latest + compiler: gcc + preset: gcc-test + cc: gcc + cxx: g++ + - os: ubuntu-latest + compiler: clang + preset: clang-test + cc: clang + cxx: clang++ + # Windows jobs + - os: windows-latest + compiler: msvc + preset: msvc-test + - os: windows-latest + compiler: clang + preset: clang-test + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install dependencies (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y ${{ matrix.compiler }} cmake ninja-build + + - name: Configure CMake (Linux) + if: runner.os == 'Linux' + run: cmake --preset ${{ matrix.preset }} + env: + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} + + - name: Configure CMake (Windows) + if: runner.os == 'Windows' + run: cmake --preset ${{ matrix.preset }} + + - name: Build + run: cmake --build --preset ${{ matrix.preset }} + + - name: Run tests + run: ctest --preset ${{ matrix.preset }} --output-on-failure diff --git a/README.md b/README.md index a7d04cf..7d5cc82 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Modern Vulkan-based renderer for W3D format files from Command & Conquer: Generals. [![Documentation](https://img.shields.io/badge/docs-online-blue)](https://vitexftw.github.io/VulkanW3DViewer/) -[![Tests](https://github.com/ViTeXFTW/VulkanW3DViewer/actions/workflows/pr-test.yml/badge.svg?branch=main)](https://github.com/ViTeXFTW/VulkanW3DViewer/actions/workflows/pr-test.yml) +[![Tests](https://github.com/ViTeXFTW/VulkanW3DViewer/actions/workflows/main-tests.yml/badge.svg)](https://github.com/ViTeXFTW/VulkanW3DViewer/actions/workflows/main-tests.yml) > **EA has not endorsed and does not support this product.**