11name : CI
22on : [push, workflow_dispatch, pull_request] # Trigger for every push as well as for every pull request. Yes, this will run stuff twice in case we create a PR from inside this repo. I'm open for better solutions, where I do not have to specify each brach individually for the 'push' trigger.
33
4+ env :
5+ # Enable verbose output.
6+ # Repeat up to 5 times to deal with flaky tests.
7+ CTEST_OPTIONS : " -V --repeat until-pass:5"
8+ # The OpenSSL path for CI runs. Found via 'brew info openssl'.
9+ MACOS_OPENSSL_ROOT_DIR : " /opt/homebrew/Cellar/openssl@3/3.3.0"
10+
411jobs :
512 ubuntu-clang-openssl :
613 strategy :
714 matrix :
8- container : ["ubuntu:18 .04", "ubuntu:20 .04", "ubuntu:22 .04", "ubuntu:23 .04"]
15+ container : ["ubuntu:20 .04", "ubuntu:22 .04", "ubuntu:23 .04", "ubuntu:24 .04"]
916 systemCurl : [ON, OFF]
1017 buildType : [Debug, Release]
1118 runs-on : ubuntu-latest
1825 env :
1926 DEBIAN_FRONTEND : noninteractive
2027 - name : Setup cmake
21- uses : jwlawson/actions-setup-cmake@v1.13
28+ uses : jwlawson/actions-setup-cmake@v1.14
2229 with :
2330 cmake-version : ' 3.22.x'
2431 - name : Checkout
@@ -37,12 +44,12 @@ jobs:
3744 cxx : clang++
3845 build-type : ${{ matrix.buildType }}
3946 run-test : true
40- ctest-options : -V
47+ ctest-options : ${{ env.CTEST_OPTIONS }}
4148
4249 ubuntu-gcc-openssl :
4350 strategy :
4451 matrix :
45- container : ["ubuntu:18 .04", "ubuntu:20 .04", "ubuntu:22 .04", "ubuntu:23 .04"]
52+ container : ["ubuntu:20 .04", "ubuntu:22 .04", "ubuntu:23 .04", "ubuntu:24 .04"]
4653 systemCurl : [ON, OFF]
4754 buildType : [Debug, Release]
4855 runs-on : ubuntu-latest
5562 env :
5663 DEBIAN_FRONTEND : noninteractive
5764 - name : Setup cmake
58- uses : jwlawson/actions-setup-cmake@v1.13
65+ uses : jwlawson/actions-setup-cmake@v1.14
5966 with :
6067 cmake-version : ' 3.22.x'
6168 - name : Checkout
7481 cxx : g++
7582 build-type : ${{ matrix.buildType }}
7683 run-test : true
77- ctest-options : -V
84+ ctest-options : ${{ env.CTEST_OPTIONS }}
7885
7986 ubuntu-gcc-mbedtls :
8087 runs-on : ubuntu-latest
8693 env :
8794 DEBIAN_FRONTEND : noninteractive
8895 - name : Setup cmake
89- uses : jwlawson/actions-setup-cmake@v1.13
96+ uses : jwlawson/actions-setup-cmake@v1.14
9097 with :
9198 cmake-version : ' 3.22.x'
9299 - name : Checkout
@@ -104,7 +111,7 @@ jobs:
104111 cxx : g++
105112 build-type : Release
106113 run-test : true
107- ctest-options : -V
114+ ctest-options : ${{ env.CTEST_OPTIONS }}
108115
109116 fedora-clang-openssl :
110117 strategy :
@@ -133,7 +140,7 @@ jobs:
133140 cxx : clang++
134141 build-type : Release
135142 run-test : true
136- ctest-options : -V
143+ ctest-options : ${{ env.CTEST_OPTIONS }}
137144
138145 fedora-gcc-openssl :
139146 strategy :
@@ -164,7 +171,7 @@ jobs:
164171 cxx : g++
165172 build-type : ${{ matrix.buildType }}
166173 run-test : true
167- ctest-options : -V
174+ ctest-options : ${{ env.CTEST_OPTIONS }}
168175
169176 fedora-gcc-ssl-sanitizer :
170177 strategy :
@@ -191,7 +198,7 @@ jobs:
191198 cxx : g++
192199 build-type : ${{ matrix.buildType }}
193200 run-test : true
194- ctest-options : -V
201+ ctest-options : ${{ env.CTEST_OPTIONS }}
195202
196203 windows-msvc-ssl :
197204 strategy :
@@ -212,7 +219,7 @@ jobs:
212219 source-dir : ${{ github.workspace }}
213220 build-type : ${{ matrix.buildType }}
214221 run-test : true
215- ctest-options : -V
222+ ctest-options : ${{ env.CTEST_OPTIONS }}
216223
217224 windows-msvc-openssl :
218225 runs-on : windows-latest
@@ -233,28 +240,25 @@ jobs:
233240 source-dir : ${{ github.workspace }}
234241 build-type : Release
235242 run-test : true
236- ctest-options : -V
243+ ctest-options : ${{ env.CTEST_OPTIONS }}
237244
238245 macos-clang-openssl :
239246 runs-on : macos-latest
240247 steps :
241248 - name : Install OpenSSL
242- run : |
243- brew install openssl
244- echo 'export PATH="/usr/local/opt/openssl@3/bin:$PATH"' >> /Users/runner/.bash_profile
245- source ~/.bash_profile
246- export LDFLAGS="-L/usr/local/opt/openssl@3/lib"
247- export CPPFLAGS="-I/usr/local/opt/openssl@3/include"
248- export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"
249+ run : brew install openssl
249250 - name : Checkout
250- uses : actions/checkout@v3.1.0
251+ uses : actions/checkout@v3
251252 - name : " Build & Test"
252253 env :
253254 CPR_BUILD_TESTS : ON
254255 CPR_BUILD_TESTS_SSL : ON
255256 CPR_FORCE_OPENSSL_BACKEND : ON
256- OPENSSL_ROOT_DIR : " /usr/local/opt/openssl@3"
257- OPENSSL_LIBRARIES : " /usr/local/opt/openssl@3/lib"
257+ OPENSSL_ROOT_DIR : " ${{ env.MACOS_OPENSSL_ROOT_DIR }}"
258+ OPENSSL_LIBRARIES : " ${{ env.MACOS_OPENSSL_ROOT_DIR }}/lib"
259+ LDFLAGS : " -L${{ env.MACOS_OPENSSL_ROOT_DIR }}/lib"
260+ CPPFLAGS : " -I${{ env.MACOS_OPENSSL_ROOT_DIR }}/include"
261+ PKG_CONFIG_PATH : " ${{ env.MACOS_OPENSSL_ROOT_DIR }}/lib/pkgconfig"
258262 uses : ashutoshvarma/action-cmake-build@master
259263 with :
260264 build-dir : ${{ github.workspace }}/build
@@ -263,7 +267,7 @@ jobs:
263267 cxx : clang++
264268 build-type : Release
265269 run-test : true
266- ctest-options : -V
270+ ctest-options : ${{ env.CTEST_OPTIONS }}
267271
268272 macos-clang-ssl :
269273 strategy :
@@ -285,7 +289,7 @@ jobs:
285289 cxx : clang++
286290 build-type : ${{ matrix.buildType }}
287291 run-test : true
288- ctest-options : -V
292+ ctest-options : ${{ env.CTEST_OPTIONS }}
289293
290294 macos-clang-darwinssl :
291295 runs-on : macos-latest
@@ -305,31 +309,28 @@ jobs:
305309 cxx : clang++
306310 build-type : Release
307311 run-test : true
308- ctest-options : -V
312+ ctest-options : ${{ env.CTEST_OPTIONS }}
309313
310314 macos-clang-openssl-boost :
311315 runs-on : macos-latest
312316 steps :
313317 - name : Install Boost
314318 run : brew install boost
315319 - name : Install OpenSSL
316- run : |
317- brew install openssl
318- echo 'export PATH="/usr/local/opt/openssl@3/bin:$PATH"' >> /Users/runner/.bash_profile
319- source ~/.bash_profile
320+ run : brew install openssl
320321 - name : Checkout
321- uses : actions/checkout@v3.1.0
322+ uses : actions/checkout@v3
322323 - name : " Build & Test"
323324 env :
324325 CPR_BUILD_TESTS : ON
325- CPR_BUILD_TESTS_SSL : OFF
326- CPR_USE_BOOST_FILESYSTEM : ON
326+ CPR_BUILD_TESTS_SSL : ON
327327 CPR_FORCE_OPENSSL_BACKEND : ON
328- OPENSSL_ROOT_DIR : " /usr/local/opt/openssl@3"
329- OPENSSL_LIBRARIES : " /usr/local/opt/openssl@3/lib"
330- LDFLAGS : " -L/usr/local/opt/openssl@3/lib"
331- CPPFLAGS : " -I/usr/local/opt/openssl@3/include"
332- PKG_CONFIG_PATH : " /usr/local/opt/openssl@3/lib/pkgconfig"
328+ CPR_USE_BOOST_FILESYSTEM : ON
329+ OPENSSL_ROOT_DIR : " ${{ env.MACOS_OPENSSL_ROOT_DIR }}"
330+ OPENSSL_LIBRARIES : " ${{ env.MACOS_OPENSSL_ROOT_DIR }}/lib"
331+ LDFLAGS : " -L${{ env.MACOS_OPENSSL_ROOT_DIR }}/lib"
332+ CPPFLAGS : " -I${{ env.MACOS_OPENSSL_ROOT_DIR }}/include"
333+ PKG_CONFIG_PATH : " ${{ env.MACOS_OPENSSL_ROOT_DIR }}/lib/pkgconfig"
333334 uses : ashutoshvarma/action-cmake-build@master
334335 with :
335336 build-dir : ${{ github.workspace }}/build
@@ -338,4 +339,4 @@ jobs:
338339 cxx : clang++
339340 build-type : Release
340341 run-test : true
341- ctest-options : -V
342+ ctest-options : ${{ env.CTEST_OPTIONS }}
0 commit comments