From aafee5e6146c5c21c93e8626286c8952a95e2e53 Mon Sep 17 00:00:00 2001 From: iWas-Coder Date: Thu, 5 Sep 2024 14:12:07 +0200 Subject: [PATCH] Added multiple compilers to CI to check discrepancies between them --- .github/workflows/ci.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4ef3b04..0661640 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,6 +29,13 @@ jobs: strategy: matrix: build-type: [Debug, Release] + c-compiler: [gcc, clang] + cxx-compiler: [g++, clang++] + exclude: + - c-compiler: gcc + cxx-compiler: clang++ + - c-compiler: clang + cxx-compiler: g++ fail-fast: false runs-on: ubuntu-latest if: ${{ !github.event.pull_request.draft }} @@ -38,7 +45,12 @@ jobs: with: submodules: recursive - name: install-dependencies - run: sudo apt-get install -y libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev + run: >- + sudo apt-get install -y + libxcursor-dev + libxrandr-dev + libxinerama-dev + libxi-dev - name: setup-codeql uses: github/codeql-action/init@v3 with: @@ -46,7 +58,12 @@ jobs: config: | paths-ignore: [vendor] - name: configure - run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} + run: >- + cmake + -B build + -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} + -DCMAKE_C_COMPILER=${{ matrix.c-compiler }} + -DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }} - name: build run: cmake --build build - name: analyze