Parallelize testing with/without SSL on Windows & set concurrency group (#2079)
* Parallelize testing with/without SSL on Windows * Set concurrency group in workflows
This commit is contained in:
parent
22d90c29b4
commit
ebe7efa1cc
4
.github/workflows/abidiff.yaml
vendored
4
.github/workflows/abidiff.yaml
vendored
@ -5,6 +5,10 @@ name: abidiff
|
|||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: sh
|
shell: sh
|
||||||
|
6
.github/workflows/cifuzz.yaml
vendored
6
.github/workflows/cifuzz.yaml
vendored
@ -1,5 +1,11 @@
|
|||||||
name: CIFuzz
|
name: CIFuzz
|
||||||
|
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Fuzzing:
|
Fuzzing:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
45
.github/workflows/test.yaml
vendored
45
.github/workflows/test.yaml
vendored
@ -20,6 +20,10 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GTEST_FILTER: ${{ github.event.inputs.gtest_filter || '*' }}
|
GTEST_FILTER: ${{ github.event.inputs.gtest_filter || '*' }}
|
||||||
|
|
||||||
@ -75,6 +79,14 @@ jobs:
|
|||||||
(github.event_name == 'pull_request' &&
|
(github.event_name == 'pull_request' &&
|
||||||
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
|
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
|
||||||
(github.event_name == 'workflow_dispatch' && github.event.inputs.test_windows == 'true')
|
(github.event_name == 'workflow_dispatch' && github.event.inputs.test_windows == 'true')
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- with_ssl: false
|
||||||
|
name: without SSL
|
||||||
|
- with_ssl: true
|
||||||
|
name: with SSL
|
||||||
|
name: windows ${{ matrix.config.name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare Git for Checkout on Windows
|
- name: Prepare Git for Checkout on Windows
|
||||||
run: |
|
run: |
|
||||||
@ -90,24 +102,25 @@ jobs:
|
|||||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||||
- name: Setup msbuild on windows
|
- name: Setup msbuild on windows
|
||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v2
|
||||||
- name: Install libraries
|
- name: Install vcpkg dependencies
|
||||||
run: |
|
run: vcpkg install gtest curl zlib brotli
|
||||||
vcpkg install gtest curl zlib brotli
|
- name: Install OpenSSL
|
||||||
choco install openssl
|
if: ${{ matrix.config.with_ssl }}
|
||||||
|
run: choco install openssl
|
||||||
- name: Configure CMake with SSL
|
- name: Configure CMake ${{ matrix.config.name }}
|
||||||
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
|
run: >
|
||||||
- name: Build with with SSL
|
cmake -B build -S .
|
||||||
run: cmake --build build --config Release
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
- name: Run tests with SSL
|
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
|
||||||
|
-DHTTPLIB_TEST=ON
|
||||||
|
-DHTTPLIB_REQUIRE_ZLIB=ON
|
||||||
|
-DHTTPLIB_REQUIRE_BROTLI=ON
|
||||||
|
-DHTTPLIB_REQUIRE_OPENSSL=${{ matrix.config.with_ssl && 'ON' || 'OFF' }}
|
||||||
|
- name: Build ${{ matrix.config.name }}
|
||||||
|
run: cmake --build build --config Release -- /v:m /clp:ShowCommandLine
|
||||||
|
- name: Run tests ${{ matrix.config.name }}
|
||||||
run: ctest --output-on-failure --test-dir build -C Release
|
run: ctest --output-on-failure --test-dir build -C Release
|
||||||
|
|
||||||
- name: Configure CMake without SSL
|
|
||||||
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
|
|
||||||
- name: Build without SSL
|
|
||||||
run: cmake --build build-no-ssl --config Release
|
|
||||||
- name: Run tests without SSL
|
|
||||||
run: ctest --output-on-failure --test-dir build-no-ssl -C Release
|
|
||||||
env:
|
env:
|
||||||
VCPKG_ROOT: "C:/vcpkg"
|
VCPKG_ROOT: "C:/vcpkg"
|
||||||
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user