diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 421cf037..52fd0ce1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,8 +54,8 @@ jobs: - name: CMake Test run: cd build/${{matrix.preset}} && ctest --verbose - build-linux: - name: Build Linux + build-linux-gcc: + name: Build Linux GCC runs-on: ubuntu-24.04 strategy: fail-fast: false @@ -83,6 +83,52 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: Linux ${{matrix.configuration}} Artifacts + name: Linux GCC ${{matrix.configuration}} Artifacts + path: | + build/${{matrix.preset}}/artifacts/* + + build-linux-clang: + name: Build Linux Clang + 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: Install 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 + 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 + + - name: CMake Build + run: cmake --workflow --preset=${{matrix.preset}} + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: Linux Clang ${{matrix.configuration}} Artifacts path: | build/${{matrix.preset}}/artifacts/*