Skip to content

Commit e7cda2b

Browse files
committed
Enhance regression:
- Run with 4 parallel jobs - Run with different combinations of GCC/Clang, Debug/Release, LTO/No-LTO - Build stfpy
1 parent bb5f2b3 commit e7cda2b

File tree

1 file changed

+39
-8
lines changed

1 file changed

+39
-8
lines changed

.github/workflows/ubuntu-build.yml

+39-8
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,63 @@ on:
33
branches:
44
- master
55

6-
env:
7-
BUILD_TYPE: Release
8-
96
jobs:
107
build:
8+
strategy:
9+
matrix:
10+
compiler: [gcc, clang]
11+
build_type: [Debug, Release]
12+
lto_config:
13+
- lto: false
14+
full_lto: false
15+
- lto: true
16+
full_lto: false
17+
- lto: true
18+
full_lto: true
19+
exclude:
20+
# Don't try to build Debug with LTO enabled
21+
- build_type: Debug
22+
lto_config:
23+
lto: true
24+
# GCC doesn't have a thin LTO mode
25+
- compiler: gcc
26+
build_type: Release
27+
lto_config:
28+
lto: true
29+
full_lto: false
30+
31+
env:
32+
CC: ${{ matrix.compiler }}
33+
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
34+
LTO_CONFIG: ${{ matrix.build_type == 'Release' && format('-DNO_STF_LTO={0}', !matrix.lto_config.lto) || '' }}
35+
CLANG_FULL_LTO_CONFIG: ${{ (matrix.compiler == 'clang' && matrix.build_type == 'Release') && format('-DFULL_LTO={0}', matrix.lto_config.full_lto) || '' }}
36+
1137
runs-on: ubuntu-latest
1238

1339
steps:
14-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v4
1541

1642
- name: Install Dependencies
1743
run: |
1844
sudo apt-get update
19-
sudo apt-get -y install libboost-dev
45+
sudo apt-get -y install libboost-dev cython3
46+
47+
- name: Install Clang
48+
run: |
49+
sudo apt-get -y install clang lld llvm
50+
if: ${{ matrix.compiler == 'clang' }}
2051

2152
- name: Create Build Directory
2253
run: cmake -E make_directory ${{runner.workspace}}/build
2354

2455
- name: Configure CMAKE
2556
working-directory: ${{runner.workspace}}/build
26-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
57+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_STF_PYTHON_LIB=ON $LTO_CONFIG $CLANG_FULL_LTO_CONFIG
2758

2859
- name: Build
2960
working-directory: ${{runner.workspace}}/build
30-
run: cmake --build . --config $BUILD_TYPE
61+
run: cmake --build . --config ${{ matrix.build_type }} -j 4
3162

3263
- name: Regress
3364
working-directory: ${{runner.workspace}}/build
34-
run: cmake --build . --config $BUILD_TYPE --target regress
65+
run: cmake --build . --config ${{ matrix.build_type }} -j 4 --target regress

0 commit comments

Comments
 (0)