@@ -2,6 +2,10 @@ name: Build
22
33on :
44 push :
5+ branches :
6+ - master
7+ tags :
8+ - v*
59 paths-ignore :
610 - ' docs/**'
711 - ' **.md'
1014 - ' **.md'
1115 - ' docs/**'
1216
17+ concurrency :
18+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19+ cancel-in-progress : true
20+
1321jobs :
1422 build :
15- name : ${{ matrix.config.name }}
23+ name : ${{ matrix.config.name }}-${{ matrix.library_mode }}-${{ matrix.boost }}Boost
1624 runs-on : ${{ matrix.config.os }}
1725 strategy :
1826 fail-fast : false
1927 matrix :
2028 boost : [0, 1]
21- header_only : [0, 1 ]
29+ library_mode : [LIBRARY, HEADER_ONLY, MODULE ]
2230 config :
2331 - {
24- name : " Windows ( MSVC) " ,
32+ name : " MSVC x86_64 " ,
2533 os : windows-latest,
2634 generator : " " ,
27- cmakeflags : " -DLIBREMIDI_NO_WINUWP=0 -DBOOST_ROOT=$PWD/boost_1_86_0 " ,
35+ cmakeflags : " -DLIBREMIDI_NO_WINUWP=0 -DBOOST_ROOT=$PWD/boost_1_90_0 " ,
2836 test_target : " RUN_TESTS" ,
2937 tests : 1,
3038 examples : 1
3139 }
3240 - {
33- name : " Windows ( MSVC, arm64) " ,
41+ name : " MSVC arm64" ,
3442 os : windows-11-arm,
3543 generator : " " ,
36- cmakeflags : " -DLIBREMIDI_NO_WINUWP=0 -DBOOST_ROOT=$PWD/boost_1_86_0 " ,
44+ cmakeflags : " -DLIBREMIDI_NO_WINUWP=0 -DBOOST_ROOT=$PWD/boost_1_90_0 " ,
3745 test_target : " RUN_TESTS" ,
3846 tests : 1,
3947 examples : 1
4048 }
4149 - {
42- name : " Ubuntu ( gcc) " ,
50+ name : " Ubuntu gcc" ,
4351 os : ubuntu-latest,
4452 generator : " " ,
4553 cmakeflags : " -DCMAKE_CXX_FLAGS='-Werror=return-type -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1 -D_GLIBCXX_ASSERTIONS=1 -D_GLIBCXX_SANITIZE_VECTOR=1'" ,
@@ -48,16 +56,16 @@ jobs:
4856 examples : 1
4957 }
5058 - {
51- name : " Ubuntu ( clang-18, libstdc++) " ,
59+ name : " Ubuntu clang-19 libstdc++" ,
5260 os : ubuntu-latest,
5361 generator : " " ,
54- cmakeflags : " -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_CXX_FLAGS='-Werror=return-type -fsanitize=address -fsanitize=undefined'" ,
62+ cmakeflags : " -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CXX_FLAGS='-Werror=return-type -fsanitize=address -fsanitize=undefined'" ,
5563 test_target : " test" ,
5664 tests : 1,
5765 examples : 1
5866 }
5967 - {
60- name : " Ubuntu ( clang, libc++) " ,
68+ name : " Ubuntu clang libc++" ,
6169 os : ubuntu-latest,
6270 generator : " " ,
6371 cmakeflags : " -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS='-stdlib=libc++ -Werror=return-type'" ,
@@ -76,18 +84,18 @@ jobs:
7684 }
7785 - {
7886 name : " macOS" ,
79- os : macos-14 ,
87+ os : macos-latest ,
8088 generator : " " ,
81- cmakeflags : " -DCMAKE_CXX_FLAGS=-Werror=return-type -DBOOST_ROOT=$PWD/boost_1_86_0 " ,
89+ cmakeflags : " -DCMAKE_CXX_FLAGS=-Werror=return-type -DBOOST_ROOT=$PWD/boost_1_90_0 " ,
8290 test_target : " test" ,
8391 tests : 1,
8492 examples : 1
8593 }
8694 - {
8795 name : " iOS" ,
88- os : macos-14 ,
96+ os : macos-latest ,
8997 generator : " -GXcode" ,
90- cmakeflags : " -DCMAKE_CXX_FLAGS=-Werror=return-type -DBOOST_ROOT=$PWD/boost_1_86_0 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_XCODE_EFFECTIVE_PLATFORMS=-iphoneos" ,
98+ cmakeflags : " -DCMAKE_CXX_FLAGS=-Werror=return-type -DBOOST_ROOT=$PWD/boost_1_90_0 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_XCODE_EFFECTIVE_PLATFORMS=-iphoneos" ,
9199 test_target : " test" ,
92100 tests : 0,
93101 examples : 0
@@ -117,7 +125,7 @@ jobs:
117125 sudo apt update
118126 sudo apt install cmake libboost-dev libasound-dev libjack-jackd2-dev clang libc++-dev
119127 else
120- curl -L https://github.com/ossia/sdk/releases/download/sdk31/boost_1_86_0 .tar.gz > boost.tar.gz
128+ curl -L https://github.com/ossia/sdk/releases/download/sdk31/boost_1_90_0 .tar.gz > boost.tar.gz
121129 tar -xzf boost.tar.gz
122130 rm boost.tar.gz
123131 fi
@@ -127,11 +135,18 @@ jobs:
127135 if : matrix.config.name != 'Tarball'
128136 shell : bash
129137 run : |
138+ CMAKE_GENERATOR=${{ matrix.config.generator }}
139+ if [[ "$RUNNER_OS" == "Linux" ]]; then
140+ if [[ "${{ matrix.library_mode }}" == "MODULE" ]]; then
141+ CMAKE_GENERATOR=-GNinja
142+ fi
143+ fi
144+
130145 cmake -S . -B build \
131- ${{ matrix.config.generator }} \
146+ $CMAKE_GENERATOR \
132147 ${{ matrix.config.cmakeflags }} \
133148 -DLIBREMIDI_FIND_BOOST=${{ matrix.boost }} \
134- -DLIBREMIDI_HEADER_ONLY =${{ matrix.header_only }} \
149+ -DLIBREMIDI_LIBRARY_MODE =${{ matrix.library_mode }} \
135150 -DLIBREMIDI_EXAMPLES=${{ matrix.config.examples }} \
136151 -DLIBREMIDI_TESTS=${{ matrix.config.tests }} \
137152 -DLIBREMIDI_CI=1 \
@@ -163,7 +178,7 @@ jobs:
163178 fail-fast : false
164179 matrix :
165180 boost : [0, 1]
166- header_only : [0, 1 ]
181+ library_mode : [LIBRARY, HEADER_ONLY, MODULE ]
167182 steps :
168183 - uses : actions/checkout@v4
169184
@@ -179,10 +194,15 @@ jobs:
179194 whoami
180195 env
181196 freebsd-version
197+ CMAKE_GENERATOR=
198+ if [[ "${{ matrix.library_mode }}" == "MODULE" ]]; then
199+ CMAKE_GENERATOR=-GNinja
200+ fi
182201
183202 cmake -S . -B build \
203+ $CMAKE_GENERATOR \
184204 -DLIBREMIDI_FIND_BOOST=${{ matrix.boost }} \
185- -DLIBREMIDI_HEADER_ONLY =${{ matrix.header_only }} \
205+ -DLIBREMIDI_LIBRARY_MODE =${{ matrix.library_mode }} \
186206 -DLIBREMIDI_EXAMPLES=1 \
187207 -DLIBREMIDI_TESTS=1 \
188208 -DLIBREMIDI_CI=1 \
@@ -202,8 +222,12 @@ jobs:
202222 fail-fast : false
203223 matrix :
204224 boost : [0, 1]
205- header_only : [0, 1]
206- distro : [bookworm, trixie]
225+ library_mode : [LIBRARY, HEADER_ONLY, MODULE]
226+ distro : [bookworm, trixie, testing]
227+
228+ exclude :
229+ - distro : bookworm
230+ library_mode : MODULE
207231
208232 steps :
209233 - name : Add backports repo if necessary
@@ -230,19 +254,19 @@ jobs:
230254 libasound-dev \
231255 libjack-jackd2-dev \
232256 libudev-dev \
233- libpipewire-0.3-dev
234-
235- if [[ "${{matrix.distro}}" == 'bullseye' ]]; then
236- apt-get install -qq --force-yes cmake/bullseye-backports
237- else
238- apt-get install -qq --force-yes cmake
239- fi
257+ libpipewire-0.3-dev \
258+ cmake
240259
241260 - name : Configure
242261 run : |
262+ CMAKE_GENERATOR=${{ matrix.config.generator }}
263+ if [[ "${{ matrix.library_mode }}" == "MODULE" ]]; then
264+ CMAKE_GENERATOR=-GNinja
265+ fi
243266 cmake -S . -B build \
267+ $CMAKE_GENERATOR \
244268 -DLIBREMIDI_FIND_BOOST=${{ matrix.boost }} \
245- -DLIBREMIDI_HEADER_ONLY =${{ matrix.header_only }} \
269+ -DLIBREMIDI_LIBRARY_MODE =${{ matrix.library_mode }} \
246270 -DLIBREMIDI_EXAMPLES=1 \
247271 -DLIBREMIDI_TESTS=1 \
248272 -DLIBREMIDI_CI=1 \
0 commit comments