Skip to content

Commit ebe7efa

Browse files
Parallelize testing with/without SSL on Windows & set concurrency group (#2079)
* Parallelize testing with/without SSL on Windows * Set concurrency group in workflows
1 parent 22d90c2 commit ebe7efa

File tree

3 files changed

+39
-16
lines changed

3 files changed

+39
-16
lines changed

.github/workflows/abidiff.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ name: abidiff
55

66
on: [push, pull_request]
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
10+
cancel-in-progress: true
11+
812
defaults:
913
run:
1014
shell: sh

.github/workflows/cifuzz.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: CIFuzz
2+
23
on: [pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
7+
cancel-in-progress: true
8+
39
jobs:
410
Fuzzing:
511
runs-on: ubuntu-latest

.github/workflows/test.yaml

+29-16
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
type: boolean
2121
default: true
2222

23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
25+
cancel-in-progress: true
26+
2327
env:
2428
GTEST_FILTER: ${{ github.event.inputs.gtest_filter || '*' }}
2529

@@ -75,6 +79,14 @@ jobs:
7579
(github.event_name == 'pull_request' &&
7680
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
7781
(github.event_name == 'workflow_dispatch' && github.event.inputs.test_windows == 'true')
82+
strategy:
83+
matrix:
84+
config:
85+
- with_ssl: false
86+
name: without SSL
87+
- with_ssl: true
88+
name: with SSL
89+
name: windows ${{ matrix.config.name }}
7890
steps:
7991
- name: Prepare Git for Checkout on Windows
8092
run: |
@@ -90,24 +102,25 @@ jobs:
90102
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
91103
- name: Setup msbuild on windows
92104
uses: microsoft/setup-msbuild@v2
93-
- name: Install libraries
94-
run: |
95-
vcpkg install gtest curl zlib brotli
96-
choco install openssl
97-
98-
- name: Configure CMake with SSL
99-
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DHTTPLIB_TEST=ON -DHTTPLIB_REQUIRE_OPENSSL=ON -DHTTPLIB_REQUIRE_ZLIB=ON -DHTTPLIB_REQUIRE_BROTLI=ON
100-
- name: Build with with SSL
101-
run: cmake --build build --config Release
102-
- name: Run tests with SSL
105+
- name: Install vcpkg dependencies
106+
run: vcpkg install gtest curl zlib brotli
107+
- name: Install OpenSSL
108+
if: ${{ matrix.config.with_ssl }}
109+
run: choco install openssl
110+
- name: Configure CMake ${{ matrix.config.name }}
111+
run: >
112+
cmake -B build -S .
113+
-DCMAKE_BUILD_TYPE=Release
114+
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
115+
-DHTTPLIB_TEST=ON
116+
-DHTTPLIB_REQUIRE_ZLIB=ON
117+
-DHTTPLIB_REQUIRE_BROTLI=ON
118+
-DHTTPLIB_REQUIRE_OPENSSL=${{ matrix.config.with_ssl && 'ON' || 'OFF' }}
119+
- name: Build ${{ matrix.config.name }}
120+
run: cmake --build build --config Release -- /v:m /clp:ShowCommandLine
121+
- name: Run tests ${{ matrix.config.name }}
103122
run: ctest --output-on-failure --test-dir build -C Release
104123

105-
- name: Configure CMake without SSL
106-
run: cmake -B build-no-ssl -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DHTTPLIB_TEST=ON -DHTTPLIB_REQUIRE_OPENSSL=OFF -DHTTPLIB_REQUIRE_ZLIB=ON -DHTTPLIB_REQUIRE_BROTLI=ON
107-
- name: Build without SSL
108-
run: cmake --build build-no-ssl --config Release
109-
- name: Run tests without SSL
110-
run: ctest --output-on-failure --test-dir build-no-ssl -C Release
111124
env:
112125
VCPKG_ROOT: "C:/vcpkg"
113126
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

0 commit comments

Comments
 (0)