ci: move more flags to global flags

This commit is contained in:
Edward Thomson
2026-05-09 13:25:24 +01:00
parent de73c97d74
commit b9ff26de1a
6 changed files with 25 additions and 18 deletions

View File

@@ -18,11 +18,16 @@ inputs:
type: string type: string
required: true required: true
default: 'bash' default: 'bash'
cmake-global-options:
description: CMAKE_GLOBAL_OPTIONS to pass
type: string
runs: runs:
using: 'composite' using: 'composite'
steps: steps:
- run: | - run: |
export CMAKE_GLOBAL_OPTIONS="${{ inputs.cmake-global-options }}"
if [ -n "${{ inputs.container }}" ]; then if [ -n "${{ inputs.container }}" ]; then
docker run \ docker run \
--rm \ --rm \
@@ -35,6 +40,7 @@ runs:
-e CFLAGS \ -e CFLAGS \
-e CMAKE_GENERATOR \ -e CMAKE_GENERATOR \
-e CMAKE_OPTIONS \ -e CMAKE_OPTIONS \
-e CMAKE_GLOBAL_OPTIONS \
-e GITTEST_NEGOTIATE_PASSWORD \ -e GITTEST_NEGOTIATE_PASSWORD \
-e GITTEST_FLAKY_STAT \ -e GITTEST_FLAKY_STAT \
-e PKG_CONFIG_PATH \ -e PKG_CONFIG_PATH \

View File

@@ -27,7 +27,7 @@ jobs:
env: env:
CC: gcc CC: gcc
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DDEBUG_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=libssh2 -DDEBUG_STRICT_ALLOC=ON -DDEBUG_STRICT_OPEN=ON -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DUSE_GSSAPI=ON -DUSE_SSH=libssh2
CMAKE_BUILD_OPTIONS: --config RelWithDebInfo CMAKE_BUILD_OPTIONS: --config RelWithDebInfo
- name: "Linux (Noble, Clang, mbedTLS, OpenSSH)" - name: "Linux (Noble, Clang, mbedTLS, OpenSSH)"
id: noble-clang-mbedtls id: noble-clang-mbedtls
@@ -36,7 +36,7 @@ jobs:
name: noble name: noble
env: env:
CC: clang CC: clang
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DDEBUG_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=exec -DUSE_HTTP_PARSER=http-parser -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DUSE_GSSAPI=ON -DUSE_SSH=exec -DUSE_HTTP_PARSER=http-parser
CMAKE_BUILD_OPTIONS: --config RelWithDebInfo CMAKE_BUILD_OPTIONS: --config RelWithDebInfo
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
- name: "Linux (Xenial, GCC, OpenSSL, OpenSSH)" - name: "Linux (Xenial, GCC, OpenSSL, OpenSSH)"
@@ -47,7 +47,7 @@ jobs:
env: env:
CC: gcc CC: gcc
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DDEBUG_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=exec -DDEBUG_STRICT_ALLOC=ON -DDEBUG_STRICT_OPEN=ON -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DUSE_GSSAPI=ON -DUSE_SSH=exec
CMAKE_BUILD_OPTIONS: --config RelWithDebInfo CMAKE_BUILD_OPTIONS: --config RelWithDebInfo
- name: "Linux (Xenial, Clang, mbedTLS, libssh2)" - name: "Linux (Xenial, Clang, mbedTLS, libssh2)"
id: xenial-gcc-mbedtls id: xenial-gcc-mbedtls
@@ -57,7 +57,7 @@ jobs:
env: env:
CC: clang CC: clang
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DDEBUG_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=libssh2 -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DUSE_GSSAPI=ON -DUSE_SSH=libssh2
CMAKE_BUILD_OPTIONS: --config RelWithDebInfo CMAKE_BUILD_OPTIONS: --config RelWithDebInfo
- name: "macOS" - name: "macOS"
id: macos id: macos
@@ -65,7 +65,7 @@ jobs:
setup-script: osx setup-script: osx
env: env:
CC: clang CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DDEBUG_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DUSE_GSSAPI=ON
CMAKE_BUILD_OPTIONS: --config RelWithDebInfo CMAKE_BUILD_OPTIONS: --config RelWithDebInfo
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
@@ -79,7 +79,7 @@ jobs:
env: env:
ARCH: amd64 ARCH: amd64
CMAKE_GENERATOR: Visual Studio 17 2022 CMAKE_GENERATOR: Visual Studio 17 2022
CMAKE_OPTIONS: -A x64 -DDEBUG_LEAK_CHECKER=win32 -DDEPRECATE_HARD=ON -DUSE_HTTPS=Schannel -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2 -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_OPTIONS: -A x64 -DUSE_HTTPS=Schannel -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2
CMAKE_BUILD_OPTIONS: --config RelWithDebInfo CMAKE_BUILD_OPTIONS: --config RelWithDebInfo
BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin
BUILD_TEMP: D:\Temp BUILD_TEMP: D:\Temp
@@ -93,7 +93,7 @@ jobs:
env: env:
ARCH: x86 ARCH: x86
CMAKE_GENERATOR: Visual Studio 17 2022 CMAKE_GENERATOR: Visual Studio 17 2022
CMAKE_OPTIONS: -A Win32 -DDEBUG_LEAK_CHECKER=win32 -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2 -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_OPTIONS: -A Win32 -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON -DCMAKE_PREFIX_PATH=D:\Temp\libssh2
CMAKE_BUILD_OPTIONS: --config RelWithDebInfo CMAKE_BUILD_OPTIONS: --config RelWithDebInfo
BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin BUILD_PATH: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin;D:\Temp\libssh2\bin
BUILD_TEMP: D:\Temp BUILD_TEMP: D:\Temp
@@ -106,7 +106,7 @@ jobs:
env: env:
ARCH: amd64 ARCH: amd64
CMAKE_GENERATOR: MinGW Makefiles CMAKE_GENERATOR: MinGW Makefiles
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_OPTIONS:
CMAKE_BUILD_OPTIONS: --config RelWithDebInfo CMAKE_BUILD_OPTIONS: --config RelWithDebInfo
BUILD_TEMP: D:\Temp BUILD_TEMP: D:\Temp
BUILD_PATH: D:\Temp\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin BUILD_PATH: D:\Temp\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin
@@ -119,7 +119,7 @@ jobs:
env: env:
ARCH: x86 ARCH: x86
CMAKE_GENERATOR: MinGW Makefiles CMAKE_GENERATOR: MinGW Makefiles
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON -DUSE_HTTPS=Schannel -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_OPTIONS: -DUSE_HTTPS=Schannel
CMAKE_BUILD_OPTIONS: --config RelWithDebInfo CMAKE_BUILD_OPTIONS: --config RelWithDebInfo
BUILD_TEMP: D:\Temp BUILD_TEMP: D:\Temp
BUILD_PATH: D:\Temp\mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin BUILD_PATH: D:\Temp\mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin
@@ -166,6 +166,7 @@ jobs:
container: ${{ matrix.platform.container.name }} container: ${{ matrix.platform.container.name }}
container-version: ${{ env.docker-registry-container-sha }} container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }} shell: ${{ matrix.platform.shell }}
cmake-global-options: -DDEPRECATE_HARD=ON -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON
- name: Build candidate - name: Build candidate
uses: ./source/candidate/.github/actions/run-build uses: ./source/candidate/.github/actions/run-build
with: with:
@@ -173,6 +174,7 @@ jobs:
container: ${{ matrix.platform.container.name }} container: ${{ matrix.platform.container.name }}
container-version: ${{ env.docker-registry-container-sha }} container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }} shell: ${{ matrix.platform.shell }}
cmake-global-options: -DDEPRECATE_HARD=ON -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DEXPERIMENTAL_SHA256=ON -DBUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: Run control benchmarks - name: Run control benchmarks
uses: ./source/control/.github/actions/run-build uses: ./source/control/.github/actions/run-build
with: with:

View File

@@ -34,14 +34,14 @@ jobs:
env: env:
CC: clang CC: clang
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEBUG_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON -DEXPERIMENTAL_SHA256=ON CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEBUG_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON -DUSE_SSH=ON
- name: "macOS (SHA256)" - name: "macOS (SHA256)"
id: macos-sha256 id: macos-sha256
os: macos-14 os: macos-14
setup-script: osx setup-script: osx
env: env:
CC: clang CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEBUG_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON -DEXPERIMENTAL_SHA256=ON CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEBUG_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
SKIP_SSH_TESTS: true SKIP_SSH_TESTS: true
@@ -52,7 +52,7 @@ jobs:
env: env:
ARCH: amd64 ARCH: amd64
CMAKE_GENERATOR: Visual Studio 17 2022 CMAKE_GENERATOR: Visual Studio 17 2022
CMAKE_OPTIONS: -A x64 -DDEBUG_LEAK_CHECKER=win32 -DEXPERIMENTAL_SHA256=ON CMAKE_OPTIONS: -A x64 -DDEBUG_LEAK_CHECKER=win32
SKIP_SSH_TESTS: true SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true SKIP_NEGOTIATE_TESTS: true
# TODO: this is a temporary removal # TODO: this is a temporary removal
@@ -92,8 +92,7 @@ jobs:
container: ${{ matrix.platform.container.name }} container: ${{ matrix.platform.container.name }}
container-version: ${{ env.docker-registry-container-sha }} container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }} shell: ${{ matrix.platform.shell }}
env: cmake-global-options: -DDEPRECATE_HARD=ON -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -DEXPERIMENTAL_SHA256=ON
CMAKE_GLOBAL_OPTIONS: -DBUILD_TESTS=OFF
- name: Test - name: Test
uses: ./source/.github/actions/run-build uses: ./source/.github/actions/run-build
with: with:

View File

@@ -256,8 +256,7 @@ jobs:
container: ${{ matrix.platform.container.name }} container: ${{ matrix.platform.container.name }}
container-version: ${{ env.docker-registry-container-sha }} container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }} shell: ${{ matrix.platform.shell }}
env: cmake-global-options: -DDEPRECATE_HARD=ON -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON
CMAKE_GLOBAL_OPTIONS: -DDEPRECATE_HARD=ON
- name: Test - name: Test
uses: ./source/.github/actions/run-build uses: ./source/.github/actions/run-build
with: with:

View File

@@ -419,6 +419,7 @@ jobs:
container: ${{ matrix.platform.container.name }} container: ${{ matrix.platform.container.name }}
container-version: ${{ env.docker-registry-container-sha }} container-version: ${{ env.docker-registry-container-sha }}
shell: ${{ matrix.platform.shell }} shell: ${{ matrix.platform.shell }}
cmake-global-options: -DDEPRECATE_HARD=ON -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON
- name: Test - name: Test
uses: ./source/.github/actions/run-build uses: ./source/.github/actions/run-build
with: with:

View File

@@ -75,8 +75,8 @@ echo "##########################################################################
echo "## Configuring build environment" echo "## Configuring build environment"
echo "##############################################################################" echo "##############################################################################"
echo "${CMAKE}" -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G \"${CMAKE_GENERATOR}\" ${CMAKE_GLOBAL_OPTIONS} ${CMAKE_OPTIONS} -S \"${SOURCE_DIR}\" echo "${CMAKE}" -G \"${CMAKE_GENERATOR}\" ${CMAKE_GLOBAL_OPTIONS} ${CMAKE_OPTIONS} -S \"${SOURCE_DIR}\"
env PATH="${BUILD_PATH}" "${CMAKE}" -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G "${CMAKE_GENERATOR}" ${CMAKE_GLOBAL_OPTIONS} ${CMAKE_OPTIONS} -S "${SOURCE_DIR}" env PATH="${BUILD_PATH}" "${CMAKE}" -G "${CMAKE_GENERATOR}" ${CMAKE_GLOBAL_OPTIONS} ${CMAKE_OPTIONS} -S "${SOURCE_DIR}"
echo "" echo ""
echo "##############################################################################" echo "##############################################################################"