Skip to content

Commit ff0b38d

Browse files
committed
ci: test shared library build
1 parent caafebc commit ff0b38d

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Build and run tests
22

33
on: [push, pull_request]
44

5+
env:
6+
CMAKE_COLOR_DIAGNOSTICS: ON
7+
OMP_NUM_THREADS: 1
8+
59
jobs:
610
build:
711
name: ${{ matrix.config.name }}
@@ -12,21 +16,45 @@ jobs:
1216
matrix:
1317
config:
1418
- {
15-
name: "Windows",
19+
name: "Windows static",
20+
os: windows-latest,
21+
build_type: "Release",
22+
shared_libs: false,
23+
generators: "Visual Studio 17 2022"
24+
}
25+
- {
26+
name: "Ubuntu Linux static",
27+
os: ubuntu-latest,
28+
build_type: "Release",
29+
shared_libs: false,
30+
generators: "Ninja"
31+
}
32+
- {
33+
name: "macOS static",
34+
os: macos-latest,
35+
build_type: "Release",
36+
shared_libs: false,
37+
generators: "Ninja"
38+
}
39+
- {
40+
name: "Windows shared",
1641
os: windows-latest,
1742
build_type: "Release",
43+
shared_libs: true,
1844
generators: "Visual Studio 17 2022"
1945
}
2046
- {
21-
name: "Ubuntu Linux",
47+
name: "Ubuntu Linux shared",
2248
os: ubuntu-latest,
2349
build_type: "Release",
50+
shared_libs: true,
2451
generators: "Ninja"
2552
}
2653
- {
27-
name: "macOS",
54+
name: "macOS shared",
2855
os: macos-latest,
2956
build_type: "Release",
57+
shared_libs: true,
3058
generators: "Ninja"
3159
}
3260

@@ -56,6 +84,7 @@ jobs:
5684
cmake \
5785
-S . \
5886
-B build \
87+
-DBUILD_SHARED_LIBS=${{ matrix.config.shared_libs }} \
5988
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
6089
-G "${{ matrix.config.generators }}" \
6190
-DCMAKE_INSTALL_PREFIX:PATH=instdir
@@ -76,7 +105,7 @@ jobs:
76105
uses: actions/upload-artifact@v4
77106
if: always()
78107
with:
79-
name: unit-test-results-${{ matrix.config.os }}
108+
name: unit-test-results-${{ matrix.config.os }}-${{ matrix.config.shared_libs }}
80109
path: build/report.xml
81110

82111
- name: Install and strip

0 commit comments

Comments
 (0)