name: Build on: push: branches: - "**" pull_request: branches: - "**" types: [opened, synchronize, reopened] workflow_dispatch: #concurrency: # group: ${{ github.ref }} # cancel-in-progress: true jobs: verify-formatting: name: Verify Formatting runs-on: ubuntu-24.04 steps: - name: Checkout Source uses: actions/checkout@v4 - name: Verify Formatting uses: jidicula/clang-format-action@v4.14.0 with: clang-format-version: '19' check-path: 'src' dump-registry: name: Dump Registry runs-on: windows-latest steps: - name: Checkout Source uses: actions/checkout@v4 - name: Dump Registry run: src/grab-registry.bat - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: Temp Registry Dump path: | registry/* build: name: Build runs-on: ${{ matrix.runner }} strategy: fail-fast: false matrix: platform: - Windows - Linux GCC - Linux Clang - macOS configuration: - Debug - Release include: - configuration: Debug preset: debug - configuration: Release preset: release - platform: Windows runner: windows-latest - platform: Linux GCC runner: ubuntu-24.04 - platform: Linux Clang runner: ubuntu-24.04 clang-version: 18 - platform: macOS runner: macos-latest steps: - name: Checkout Source uses: actions/checkout@v4 with: submodules: recursive - name: Install Ninja uses: seanmiddleditch/gha-setup-ninja@v5 - name: Install Clang if: "${{ matrix.platform == 'Linux Clang' }}" run: | sudo apt update sudo apt install -y wget gnupg software-properties-common wget https://apt.llvm.org/llvm-snapshot.gpg.key -O- | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-${{ matrix.clang-version }} main" | sudo tee /etc/apt/sources.list.d/llvm.list sudo apt update sudo apt install -y clang-${{ matrix.clang-version }} lld-${{ matrix.clang-version }} sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ matrix.clang-version }} 100 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ matrix.clang-version }} 100 sudo update-alternatives --set cc /usr/bin/clang-${{ matrix.clang-version }} sudo update-alternatives --set c++ /usr/bin/clang++-${{ matrix.clang-version }} - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 if: "${{ matrix.platform == 'Windows' }}" - name: CMake Build run: cmake --workflow --preset=${{matrix.preset}} - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: ${{ matrix.platform }} ${{matrix.configuration}} Artifacts path: | build/${{matrix.preset}}/artifacts/* - name: Upload Test Configuration uses: actions/upload-artifact@v4 with: name: Temp ${{ matrix.platform }} ${{matrix.configuration}} Test Config path: | build/${{matrix.preset}}/**/CTestTestfile.cmake test: name: Test runs-on: ${{ matrix.runner }} needs: [dump-registry, build] strategy: fail-fast: false matrix: platform: - Windows - Linux GCC - Linux Clang - macOS configuration: - Debug - Release include: - configuration: Debug preset: debug - configuration: Release preset: release - platform: Windows runner: windows-latest - platform: Linux GCC runner: ubuntu-24.04 - platform: Linux Clang runner: ubuntu-24.04 - platform: macOS runner: macos-latest steps: - name: Download Test Config uses: actions/download-artifact@v4 with: name: Temp ${{ matrix.platform }} ${{matrix.configuration}} Test Config path: build/${{matrix.preset}} - name: Download Artifacts uses: actions/download-artifact@v4 with: name: ${{ matrix.platform }} ${{matrix.configuration}} Artifacts path: build/${{matrix.preset}}/artifacts - name: Download Windows Artifacts uses: actions/download-artifact@v4 if: "${{ matrix.platform != 'Windows' }}" with: name: Windows ${{matrix.configuration}} Artifacts path: build/${{matrix.preset}}/artifacts - name: Download Registry Dump uses: actions/download-artifact@v4 with: name: Temp Registry Dump path: build/${{matrix.preset}}/artifacts/registry - name: CMake Test run: cd build/${{matrix.preset}} && ctest --verbose if: "${{ matrix.platform == 'Windows' }}" cleanup: name: Cleanup Artifacts runs-on: ubuntu-24.04 needs: [dump-registry, build, test] if: always() steps: - uses: geekyeggo/delete-artifact@v5 with: name: 'Temp *'