CI+CMake: Remove most of the *_CI CMake presets

These existed because of their `vcpkg_ci` base preset, whose goal was to
enable vcpkg-supported caching on GitHub. We now handle vcpkg caching in
the CI steps, removing the necessity for all these *_CI preset variants.

This allows us to reuse `inputs.build_preset` in the test step, and we
can do away with the Windows-specific test step since it is now almost
identical to the Linux/macOS test step.

I've left in the Windows_CI presets, because that one actually results
in a different set of compiled files compared to the
Windows_Experimental presets.
This commit is contained in:
Jelle Raaijmakers 2025-07-08 22:30:01 +02:00 committed by Andrew Kaster
commit 37b8ab54df
Notes: github-actions[bot] 2025-07-09 21:34:09 +00:00
5 changed files with 24 additions and 73 deletions

View file

@ -17,7 +17,7 @@ jobs:
matrix:
os_name: ['Linux']
arch: ['x86_64']
build_preset: ['Sanitizer_CI']
build_preset: ['Sanitizer']
toolchain: ['GNU']
clang_plugins: [false]
runner_labels: ['["blacksmith-16vcpu-ubuntu-2404"]']
@ -25,21 +25,21 @@ jobs:
include:
- os_name: 'Linux'
arch: 'x86_64'
build_preset: 'Sanitizer_CI'
build_preset: 'Sanitizer'
toolchain: 'Clang'
clang_plugins: true
runner_labels: '["blacksmith-16vcpu-ubuntu-2404"]'
- os_name: 'macOS'
arch: 'arm64'
build_preset: 'Sanitizer_CI'
build_preset: 'Sanitizer'
toolchain: 'Clang'
clang_plugins: false
runner_labels: '["macos-15", "self-hosted"]'
- os_name: 'Linux'
arch: 'x86_64'
build_preset: 'Fuzzers_CI'
build_preset: 'Fuzzers'
toolchain: 'Clang'
clang_plugins: false
runner_labels: '["blacksmith-16vcpu-ubuntu-2404"]'

View file

@ -61,7 +61,7 @@ jobs:
- name: Create build directory Ubuntu
run: |
cmake --preset Distribution_CI \
cmake --preset Distribution \
-DCMAKE_C_COMPILER=clang-20 \
-DCMAKE_CXX_COMPILER=clang++-20 \
-DENABLE_GUI_TARGETS=OFF
@ -73,7 +73,7 @@ jobs:
# See: https://github.com/microsoft/vcpkg/discussions/19454
- name: Create build directory macOS
run: |
cmake --preset Distribution_CI \
cmake --preset Distribution \
-DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" \
-DENABLE_GUI_TARGETS=OFF
if: ${{ matrix.os_name == 'macOS' }}

View file

@ -126,7 +126,7 @@ jobs:
run: sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
- name: Create Build Environment
if: ${{ inputs.os_name != 'Windows' && inputs.build_preset != 'Fuzzers_CI' }}
if: ${{ inputs.os_name != 'Windows' && inputs.build_preset != 'Fuzzers' }}
working-directory: ${{ github.workspace }}
env:
VCPKG_CACHE_SAS: ${{ github.ref == 'refs/heads/master' && secrets.VCPKG_CACHE_SAS || '' }}
@ -148,10 +148,10 @@ jobs:
cmake --preset ${{ inputs.build_preset }} -B Build
- name: Create Build Environment (Fuzzers)
if: ${{ inputs.build_preset == 'Fuzzers_CI' }}
if: ${{ inputs.build_preset == 'Fuzzers' }}
working-directory: ${{ github.workspace }}
run: |
cmake --preset=Distribution_CI -S Meta/Lagom -B ${{ github.workspace }}/Build/tools-build \
cmake --preset=Distribution -S Meta/Lagom -B ${{ github.workspace }}/Build/tools-build \
-DLAGOM_TOOLS_ONLY=ON \
-DINSTALL_LAGOM_TOOLS=ON \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/Build/tools-install \
@ -175,7 +175,7 @@ jobs:
cmake --install . --strip --prefix ${{ github.workspace }}/Install
- name: Build - macOS with Qt
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer_CI' }}
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer' }}
working-directory: ${{ github.workspace }}
run: |
cmake --preset ${{ inputs.build_preset }} -B Build -DENABLE_QT=ON
@ -194,33 +194,24 @@ jobs:
# === TEST ===
- name: Test
if: ${{ inputs.os_name != 'Windows' && inputs.build_preset == 'Sanitizer_CI' }}
if: ${{ contains(inputs.build_preset, 'Sanitizer') }}
working-directory: ${{ github.workspace }}
run: ctest --preset Sanitizer --output-on-failure --test-dir Build --timeout 1800
run: ctest --preset ${{ inputs.build_preset }} --output-on-failure --test-dir Build --timeout 1800
env:
TESTS_ONLY: 1
# NOTE: These are appended to the preset's options.
ASAN_OPTIONS: 'log_path=${{ github.workspace }}/asan.log'
UBSAN_OPTIONS: 'log_path=${{ github.workspace }}/ubsan.log'
ASAN_OPTIONS: 'log_path="${{ github.workspace }}/asan.log"'
UBSAN_OPTIONS: 'log_path="${{ github.workspace }}/ubsan.log"'
- name: Test
if: ${{ inputs.build_preset != 'Fuzzers_CI' && !contains(inputs.build_preset, 'Sanitizer_CI') }}
if: ${{ inputs.build_preset != 'Fuzzers' && !contains(inputs.build_preset, 'Sanitizer') }}
working-directory: ${{ github.workspace }}
run: ctest --output-on-failure --test-dir Build --timeout 1800
env:
TESTS_ONLY: 1
- name: Test (Windows)
if: ${{ inputs.os_name == 'Windows' }}
working-directory: ${{ github.workspace }}
run: ctest --preset ${{ inputs.build_preset }} --test-dir Build --timeout 1800
env:
TESTS_ONLY: 1
ASAN_OPTIONS: 'log_path="${{ github.workspace }}\asan.log"'
UBSAN_OPTIONS: 'log_path="${{ github.workspace }}\ubsan.log"'
- name: Upload LibWeb Test Artifacts
if: ${{ always() && inputs.build_preset != 'Fuzzers_CI' }}
if: ${{ always() && inputs.build_preset != 'Fuzzers' }}
uses: actions/upload-artifact@v4
with:
name: libweb-test-artifacts-${{ inputs.os_name }}-${{ inputs.build_preset }}-${{ inputs.toolchain }}-${{ inputs.clang-plugins }}
@ -229,7 +220,7 @@ jobs:
if-no-files-found: ignore
- name: Sanitizer Output
if: ${{ !cancelled() && inputs.build_preset == 'Sanitizer_CI' }}
if: ${{ !cancelled() && inputs.build_preset == 'Sanitizer' }}
working-directory: ${{ github.workspace }}
run: |
log_output=$(find . -maxdepth 1 \( -name 'asan.log.*' -o -name 'ubsan.log.*' \) -exec cat {} \; )
@ -241,7 +232,7 @@ jobs:
fi
- name: Lints
if: ${{ inputs.os_name == 'Linux' && inputs.build_preset == 'Sanitizer_CI' }}
if: ${{ inputs.os_name == 'Linux' && inputs.build_preset == 'Sanitizer' }}
working-directory: ${{ github.workspace }}
run: |
set -e

View file

@ -20,7 +20,7 @@ jobs:
matrix:
os_name: ['Linux']
arch: ['arm64']
build_preset: ['Sanitizer_CI']
build_preset: ['Sanitizer']
toolchain: ['Clang']
clang_plugins: [false]
runner_labels: ['["blacksmith-8vcpu-ubuntu-2404-arm"]']
@ -28,35 +28,35 @@ jobs:
include:
- os_name: 'Linux'
arch: 'x86_64'
build_preset: 'Distribution_CI'
build_preset: 'Distribution'
toolchain: 'GNU'
clang_plugins: false
runner_labels: '["blacksmith-8vcpu-ubuntu-2404"]'
- os_name: 'macOS'
arch: 'arm64'
build_preset: 'Distribution_CI'
build_preset: 'Distribution'
toolchain: 'Clang'
clang_plugins: false
runner_labels: '["macos-15"]'
- os_name: 'Linux'
arch: 'arm64'
build_preset: 'Distribution_CI'
build_preset: 'Distribution'
toolchain: 'Clang'
clang_plugins: false
runner_labels: '["blacksmith-8vcpu-ubuntu-2404-arm"]'
- os_name: 'Linux'
arch: 'x86_64'
build_preset: 'Sanitizer_CI'
build_preset: 'Sanitizer'
toolchain: 'Swift'
clang_plugins: false
runner_labels: '["blacksmith-8vcpu-ubuntu-2404"]'
- os_name: 'macOS'
arch: 'arm64'
build_preset: 'Sanitizer_CI'
build_preset: 'Sanitizer'
toolchain: 'Swift'
clang_plugins: false
runner_labels: '["macos-15"]'

View file

@ -134,23 +134,9 @@
"VCPKG_OVERLAY_TRIPLETS": "${fileDir}/Meta/CMake/vcpkg/sanitizer-triplets"
}
},
{
"hidden": true,
"name": "vcpkg_ci",
"description": "FIXME: Use the GitHub Actions vcpkg cache"
},
{
"name": "CI",
"displayName": "Non-Sanitizer CI Config",
"inherits": [
"vcpkg_ci",
"unix_base"
]
},
{
"name": "Windows_CI",
"inherits": [
"vcpkg_ci",
"windows_base"
],
"displayName": "Windows CI Config",
@ -159,23 +145,6 @@
"ENABLE_QT": "OFF"
}
},
{
"name": "Distribution_CI",
"inherits": [
"vcpkg_ci",
"Distribution"
],
"displayName": "Distribution CI Config",
"description": "Distribution build with GitHub Actions cache"
},
{
"name": "Sanitizer_CI",
"inherits": [
"vcpkg_ci",
"Sanitizer"
],
"displayName": "Sanitizer CI Config"
},
{
"name": "Windows_Sanitizer_CI",
"inherits": [
@ -205,15 +174,6 @@
"ENABLE_ADDRESS_SANITIZER": "ON"
}
},
{
"name": "Fuzzers_CI",
"inherits": [
"vcpkg_ci",
"Fuzzers"
],
"displayName": "Fuzzers CI Config",
"description": "Fuzzers build with GitHub Actions cache"
},
{
"name": "Swift_Release",
"inherits": "unix_base",