Skip to content

Commit 44ee247

Browse files
committed
Add build matrix
1 parent 9e39045 commit 44ee247

File tree

2 files changed

+43
-22
lines changed

2 files changed

+43
-22
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,72 @@
11
name: CI
2-
32
on:
43
push:
54
branches: ["main"]
65
pull_request:
76
branches: ["main"]
8-
97
env:
108
BUILD_TYPE: Release
11-
129
permissions:
1310
contents: read
1411
pages: write
1512
id-token: write
16-
1713
jobs:
18-
build:
19-
runs-on: ubuntu-latest
20-
14+
build_matrix:
15+
strategy:
16+
matrix:
17+
os: [ubuntu-22.04, ubuntu-20.04]
18+
cxx: [clang++-12, clang++-13, clang++-14, g++-9, g++-10, g++-11, g++-12]
19+
exclude:
20+
- os: ubuntu-20.04
21+
cxx: clang++-13
22+
- os: ubuntu-20.04
23+
cxx: clang++-14
24+
- os: ubuntu-20.04
25+
cxx: g++-11
26+
- os: ubuntu-20.04
27+
cxx: g++-12
28+
runs-on: ${{ matrix.os }}
29+
env:
30+
CXX: /usr/bin/${{ matrix.cxx }}
2131
steps:
22-
- name: Install packages
23-
run: sudo apt-get install -y doxygen graphviz ninja-build
24-
32+
- name: Install Ninja
33+
run: sudo apt-get install -y ninja-build
2534
- uses: actions/checkout@v3
26-
2735
- name: Configure CMake
28-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -GNinja -DDOXYGEN_FULL_PATH_NAMES=NO
29-
36+
run: |
37+
cmake -B ${{github.workspace}}/build \
38+
-GNinja \
39+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
40+
-DDynamicLoader_BUILD_DOCS=OFF
3041
- name: Build
31-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
32-
42+
run: |
43+
cmake --build ${{github.workspace}}/build \
44+
--config ${{env.BUILD_TYPE}}
3345
- name: Test
3446
working-directory: ${{github.workspace}}/build
3547
run: ctest -C ${{env.BUILD_TYPE}}
36-
37-
- name: Docs
48+
build_docs:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Install Doxygen
52+
run: sudo apt-get install -y doxygen graphviz
53+
- uses: actions/checkout@v3
54+
- name: Configure CMake
55+
run: |
56+
cmake -B ${{github.workspace}}/build \
57+
-DDOXYGEN_FULL_PATH_NAMES=NO
58+
- name: Build docs
3859
env:
3960
url: ${{ steps.deployment.outputs.page_url }}
40-
run: cmake --build ${{github.workspace}}/build --target DynamicLoaderDocs
41-
61+
run: |
62+
cmake --build ${{github.workspace}}/build \
63+
--target DynamicLoaderDocs
4264
- name: Setup Pages
4365
uses: actions/configure-pages@v2
44-
4566
- name: Upload artifact
4667
uses: actions/upload-pages-artifact@v1
4768
with:
4869
path: ${{github.workspace}}/build/docs/html
49-
5070
- name: Deploy to GitHub Pages
5171
id: deployment
5272
uses: actions/deploy-pages@v1

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ if(DynamicLoader_ENABLE_WARNINGS)
5656
-Wshadow
5757
-Wsign-conversion
5858
-Wunused
59-
-Wuseless-cast)
59+
-Wuseless-cast
60+
$<$<CXX_COMPILER_ID:Clang>:-Wno-unknown-warning-option>)
6061
endif()
6162
endif()
6263

0 commit comments

Comments
 (0)