From d9676cceb6e19b6e50685234d9bee67fe7354eb7 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 6 Jan 2025 12:36:46 +0100 Subject: [PATCH 1/5] Disable concurrency restrictions --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06c13a61..f0fc5db9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,9 +10,9 @@ on: types: [opened, synchronize, reopened] workflow_dispatch: -concurrency: - group: ${{ github.ref }} - cancel-in-progress: true +#concurrency: +# group: ${{ github.ref }} +# cancel-in-progress: true jobs: dump-registry: From 9d3b154335b90dfce7c8e87771fd8c0bb449b0f1 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 6 Jan 2025 12:36:57 +0100 Subject: [PATCH 2/5] Upload test configuration --- .github/workflows/build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0fc5db9..42e29562 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,11 +67,12 @@ jobs: path: | build/${{matrix.preset}}/artifacts/* - - name: Dump Registry - run: cd build/${{matrix.preset}}/artifacts && ../../../src/grab-registry.bat - - - name: CMake Test - run: cd build/${{matrix.preset}} && ctest --verbose + - name: Upload Test Configuration + uses: actions/upload-artifact@v4 + with: + name: Windows ${{matrix.configuration}} Test Config + path: | + build/${{matrix.preset}}/**/CTestTestfile.cmake build-linux-gcc: name: Build Linux GCC From 2d9b35d346c068ae2a16e5bb2c8af2f90b437a5b Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 6 Jan 2025 13:09:55 +0100 Subject: [PATCH 3/5] Test unifying build jobs --- .github/workflows/build.yml | 160 ++++++++++-------------------------- 1 file changed, 43 insertions(+), 117 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42e29562..eb00908c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,6 @@ jobs: dump-registry: name: Dump Registry runs-on: windows-latest - strategy: - fail-fast: false steps: - name: Checkout Source uses: actions/checkout@v4 @@ -30,89 +28,21 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: Registry Dump + name: Registry Dump [Temp] path: | registry/* - build-windows: - name: Build Windows - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - configuration: - - Debug - - Release - include: - - configuration: Debug - preset: debug - - configuration: Release - preset: release - steps: - - name: Checkout Source - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Enable Developer Command Prompt - uses: ilammy/msvc-dev-cmd@v1.13.0 - - - name: CMake Build - run: cmake --workflow --preset=${{matrix.preset}} - - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: Windows ${{matrix.configuration}} Artifacts - path: | - build/${{matrix.preset}}/artifacts/* - - - name: Upload Test Configuration - uses: actions/upload-artifact@v4 - with: - name: Windows ${{matrix.configuration}} Test Config - path: | - build/${{matrix.preset}}/**/CTestTestfile.cmake - - build-linux-gcc: - name: Build Linux GCC - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - configuration: - - Debug - - Release - include: - - configuration: Debug - preset: debug - - configuration: Release - preset: release - steps: - - name: Checkout Source - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install Ninja - uses: seanmiddleditch/gha-setup-ninja@v5 - - - name: CMake Build - run: cmake --workflow --preset=${{matrix.preset}} - - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: Linux GCC ${{matrix.configuration}} Artifacts - path: | - build/${{matrix.preset}}/artifacts/* - - build-linux-clang: - name: Build Linux Clang - runs-on: ubuntu-24.04 + build: + name: Build + runs-on: ${{ matrix.runner }} strategy: fail-fast: false matrix: + platform: + - Windows + - Linux GCC + - Linux Clang + - macOS configuration: - Debug - Release @@ -121,6 +51,15 @@ jobs: 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 @@ -131,17 +70,22 @@ jobs: 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)-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list + 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-18 lld-18 - sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-18 100 - sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-18 100 - sudo update-alternatives --set cc /usr/bin/clang-18 - sudo update-alternatives --set c++ /usr/bin/clang++-18 + 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}} @@ -149,40 +93,22 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: Linux Clang ${{matrix.configuration}} Artifacts + name: ${{ matrix.platform }} ${{matrix.configuration}} Artifacts path: | build/${{matrix.preset}}/artifacts/* - build-mac: - name: Build macOS - runs-on: macos-latest - strategy: - fail-fast: false - matrix: - configuration: - - Debug - - Release - include: - - configuration: Debug - preset: debug - - configuration: Release - preset: release + - name: Upload Test Configuration + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.platform }} ${{matrix.configuration}} Test Config [Temp] + path: | + build/${{matrix.preset}}/**/CTestTestfile.cmake + cleanup: + name: Cleanup Artifacts + runs-on: ubuntu-latest + needs: [dump-registry, build] + if: always() steps: - - name: Checkout Source - uses: actions/checkout@v4 + - uses: geekyeggo/delete-artifact@v5 with: - submodules: recursive - - - name: Install Dependencies - run: | - brew install ninja - - - name: CMake Build - run: cmake --workflow --preset=${{matrix.preset}} - - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: macOS ${{matrix.configuration}} Artifacts - path: | - build/${{matrix.preset}}/artifacts/* + name: '*[Temp]' From cc72e3918d7c2bdad4b07f38ef94e8cbae66e32c Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 6 Jan 2025 13:27:10 +0100 Subject: [PATCH 4/5] Run tests --- .github/workflows/build.yml | 69 ++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb00908c..34f80454 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: Registry Dump [Temp] + name: Temp Registry Dump path: | registry/* @@ -100,15 +100,74 @@ jobs: - name: Upload Test Configuration uses: actions/upload-artifact@v4 with: - name: ${{ matrix.platform }} ${{matrix.configuration}} Test Config [Temp] + 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 + cleanup: name: Cleanup Artifacts - runs-on: ubuntu-latest - needs: [dump-registry, build] + runs-on: ubuntu-24.04 + needs: [dump-registry, build, test] if: always() steps: - uses: geekyeggo/delete-artifact@v5 with: - name: '*[Temp]' + name: 'Temp *' From ea4534e6c8feeb7e7b1b1a528725f945a776911b Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Mon, 6 Jan 2025 14:25:23 +0100 Subject: [PATCH 5/5] Update build.yml --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34f80454..1c438095 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -161,6 +161,7 @@ jobs: - name: CMake Test run: cd build/${{matrix.preset}} && ctest --verbose + if: "${{ matrix.platform == 'Windows' }}" cleanup: name: Cleanup Artifacts