Skip to content

Commit c146800

Browse files
committed
Revamp matrix strategy
1 parent 7881b81 commit c146800

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

.github/workflows/ubuntu-build.yml

+24-10
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,30 @@ jobs:
1212
cxx: g++
1313
- c: clang
1414
cxx: clang++
15-
build_config:
15+
build_type: [Debug, Release]
16+
lto_config:
17+
- lto: false
18+
full_lto: false
19+
- lto: true
20+
full_lto: false
21+
- lto: true
22+
full_lto: true
23+
exclude:
24+
# Don't try to build Debug with LTO enabled
1625
- build_type: Debug
17-
lto: false
18-
- build_type: Release
19-
lto: false
20-
- build_type: Release
21-
lto: true
26+
lto_config:
27+
lto: true
28+
# GCC doesn't have a thin LTO mode
29+
- compilers:
30+
c: gcc
31+
cxx: g++
32+
build_type: Release
33+
lto_config:
34+
lto: true
35+
full_lto: false
2236

2337
env:
24-
LTO_CONFIG: ${{ matrix.build_config.lto && '-DFULL_LTO=1' || '' }}
38+
LTO_CONFIG: ${{ format('-DNO_STF_LTO={0} -DFULL_LTO={1}', !matrix.lto_config.lto, matrix.lto_config.full_lto) }}
2539

2640
runs-on: ubuntu-latest
2741

@@ -38,12 +52,12 @@ jobs:
3852

3953
- name: Configure CMAKE
4054
working-directory: ${{runner.workspace}}/build
41-
run: CC=${{ matrix.compilers.c }} CXX=${{ matrix.compilers.cxx }} cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_config.build_type }} -DBUILD_STF_PYTHON_LIB=ON $LTO_CONFIG
55+
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
4256

4357
- name: Build
4458
working-directory: ${{runner.workspace}}/build
45-
run: cmake --build . --config ${{ matrix.build_config.build_type }} -j 4
59+
run: cmake --build . --config ${{ matrix.build_type }} -j 4
4660

4761
- name: Regress
4862
working-directory: ${{runner.workspace}}/build
49-
run: cmake --build . --config ${{ matrix.build_config.build_type }} -j 4 --target regress
63+
run: cmake --build . --config ${{ matrix.build_type }} -j 4 --target regress

0 commit comments

Comments
 (0)