From 459e935752c3916bda863b39df892d35befd4c44 Mon Sep 17 00:00:00 2001 From: Harrand Date: Sat, 18 May 2024 17:09:16 +0100 Subject: [PATCH] [ci] try to set cmake_cxx_compiler to a valid cxx compiler based upon the provided c compiler --- .github/workflows/build_linux.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index b4782f9..25ed778 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -20,8 +20,17 @@ jobs: - name: 'Install newer GCC' run: sudo apt install gcc-13 + - name: 'Set CXX Compiler' + id: set_compiler + run: | + if [ "${{ matrix.compiler }}" == "gcc-13" ]; then + echo "{cxx_compiler}={g++-13}" >> $GITHUB_OUTPUT + elif [ "${{ matrix.compiler }}" == "clang-18" ]; then + echo "{cxx_compiler}={clang++-18}" >> $GITHUB_OUTPUT + fi + - name: 'Configure psyc ${{ matrix.compiler }}_${{ matrix.build_config }}' - run: cmake --preset ci_${{ matrix.build_config }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_C_COMPILER=${{ matrix.compiler }} + run: cmake --preset ci_${{ matrix.build_config }} -DCMAKE_CXX_COMPILER=${{ steps.set_compiler.outputs.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.compiler }} working-directory: cpp - name: 'Build psyc ${{ matrix.compiler }}_${{ matrix.build_config }}'