Skip to content

Commit

Permalink
[ci] try to set cmake_cxx_compiler to a valid cxx compiler based upon…
Browse files Browse the repository at this point in the history
… the provided c compiler
  • Loading branch information
harrand committed May 18, 2024
1 parent 4d800aa commit 459e935
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down

0 comments on commit 459e935

Please sign in to comment.