Skip to content

Commit

Permalink
Just specify gcc or clang and infer CXX from that parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
bdutro-mips committed Oct 16, 2024
1 parent 82bc00d commit db2aff0
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ jobs:
build:
strategy:
matrix:
compilers:
- c: gcc
cxx: g++
- c: clang
cxx: clang++
compiler: [gcc, clang]
build_type: [Debug, Release]
lto_config:
- lto: false
Expand All @@ -26,15 +22,15 @@ jobs:
lto_config:
lto: true
# GCC doesn't have a thin LTO mode
- compilers:
c: gcc
cxx: g++
- compiler: gcc
build_type: Release
lto_config:
lto: true
full_lto: false

env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
LTO_CONFIG: ${{ matrix.build_type == 'Release' && format('-DNO_STF_LTO={0} -DFULL_LTO={1}', !matrix.lto_config.lto, matrix.lto_config.full_lto) || '' }}

runs-on: ubuntu-latest
Expand All @@ -57,7 +53,7 @@ jobs:

- name: Configure CMAKE
working-directory: ${{runner.workspace}}/build
run: CC=${{ matrix.compilers.c }} CXX=${{ matrix.compilers.cxx }} cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_STF_PYTHON_LIB=ON $LTO_CONFIG
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_STF_PYTHON_LIB=ON $LTO_CONFIG

- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down

0 comments on commit db2aff0

Please sign in to comment.