mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 01:09:25 +00:00
CI: Use CMake build preset directly instead of a fuzzer flag
This commit is contained in:
committed by
Jelle Raaijmakers
parent
34bf42cffa
commit
af5f23cdda
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
os_name: ['Linux']
|
||||
os: [ubuntu-24.04]
|
||||
arch: ['x86_64']
|
||||
fuzzer: ['NO_FUZZ']
|
||||
build_preset: ['Sanitizer_CI']
|
||||
toolchain: ['GNU']
|
||||
clang_plugins: [false]
|
||||
|
||||
@@ -25,21 +25,21 @@ jobs:
|
||||
- os_name: 'Linux'
|
||||
os: ubuntu-24.04
|
||||
arch: 'x86_64'
|
||||
fuzzer: 'NO_FUZZ'
|
||||
build_preset: 'Sanitizer_CI'
|
||||
toolchain: 'Clang'
|
||||
clang_plugins: true
|
||||
|
||||
- os_name: 'macOS'
|
||||
os: macos-15
|
||||
arch: 'arm64'
|
||||
fuzzer: 'NO_FUZZ'
|
||||
build_preset: 'Sanitizer_CI'
|
||||
toolchain: 'Clang'
|
||||
clang_plugins: false
|
||||
|
||||
- os_name: 'Linux'
|
||||
os: ubuntu-24.04
|
||||
arch: 'x86_64'
|
||||
fuzzer: 'FUZZ'
|
||||
build_preset: 'Fuzzers_CI'
|
||||
toolchain: 'Clang'
|
||||
clang_plugins: false
|
||||
|
||||
@@ -49,5 +49,5 @@ jobs:
|
||||
os_name: ${{ matrix.os_name }}
|
||||
os: ${{ matrix.os }}
|
||||
arch: ${{ matrix.arch }}
|
||||
fuzzer: ${{ matrix.fuzzer }}
|
||||
build_preset: ${{ matrix.build_preset }}
|
||||
clang_plugins: ${{ matrix.clang_plugins }}
|
||||
|
||||
42
.github/workflows/lagom-template.yml
vendored
42
.github/workflows/lagom-template.yml
vendored
@@ -15,10 +15,9 @@ on:
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
fuzzer:
|
||||
required: false
|
||||
build_preset:
|
||||
required: true
|
||||
type: string
|
||||
default: 'NO_FUZZ'
|
||||
clang_plugins:
|
||||
required: false
|
||||
type: boolean
|
||||
@@ -79,10 +78,10 @@ jobs:
|
||||
fi
|
||||
|
||||
if ${{ inputs.clang_plugins }} ; then
|
||||
echo "ccache_key=${{ inputs.fuzzer }}-CLANG_PLUGINS" >> "$GITHUB_OUTPUT"
|
||||
echo "ccache_key=${{ inputs.build_preset }}-CLANG_PLUGINS" >> "$GITHUB_OUTPUT"
|
||||
echo "cmake_options=-DENABLE_CLANG_PLUGINS=ON" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "ccache_key=${{ inputs.fuzzer }}" >> "$GITHUB_OUTPUT"
|
||||
echo "ccache_key=${{ inputs.build_preset }}" >> "$GITHUB_OUTPUT"
|
||||
echo "cmake_options=" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
@@ -109,10 +108,10 @@ 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.fuzzer == 'NO_FUZZ' }}
|
||||
if: ${{ inputs.build_preset != 'Fuzzers_CI' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
cmake --preset Sanitizer_CI -B Build \
|
||||
cmake --preset ${{ inputs.build_preset }} -B Build \
|
||||
-DINCLUDE_WASM_SPEC_TESTS=ON \
|
||||
-DWASM_SPEC_TEST_SKIP_FORMATTING=ON \
|
||||
${{ steps.build-parameters.outputs.cmake_options }} \
|
||||
@@ -121,7 +120,7 @@ jobs:
|
||||
-DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }}
|
||||
|
||||
- name: Create Build Environment
|
||||
if: ${{ inputs.fuzzer == 'FUZZ' }}
|
||||
if: ${{ inputs.build_preset == 'Fuzzers_CI' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
set -e
|
||||
@@ -137,7 +136,7 @@ jobs:
|
||||
|
||||
ninja -C ${{ github.workspace }}/Build/tools-build install
|
||||
|
||||
cmake --preset Fuzzers_CI -B Build \
|
||||
cmake --preset ${{ inputs.build_preset }} -B Build \
|
||||
-DPython3_EXECUTABLE=${{ env.pythonLocation }}/bin/python \
|
||||
-DCMAKE_C_COMPILER=${{ steps.build-parameters.outputs.host_cc }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ steps.build-parameters.outputs.host_cxx }} \
|
||||
@@ -153,23 +152,23 @@ jobs:
|
||||
cmake --install . --strip --prefix ${{ github.workspace }}/Install
|
||||
|
||||
- name: Enable the Ladybird Qt chrome
|
||||
if: ${{ inputs.os_name == 'macOS' && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer_CI' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: cmake -B Build -DENABLE_QT=ON
|
||||
|
||||
- name: Build the Ladybird Qt chrome
|
||||
if: ${{ inputs.os_name == 'macOS' && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer_CI' }}
|
||||
working-directory: ${{ github.workspace }}/Build
|
||||
run: cmake --build .
|
||||
|
||||
- name: Enable the AppKit chrome with Swift files
|
||||
if: ${{ inputs.os_name == 'macOS' && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer_CI' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
# FIXME: Don't force release build after https://github.com/LadybirdBrowser/ladybird/issues/1101 is fixed
|
||||
run: cmake -B Build -DENABLE_QT=OFF -DENABLE_SWIFT=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
||||
- name: Build the AppKit chrome with Swift files
|
||||
if: ${{ inputs.os_name == 'macOS' && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
if: ${{ inputs.os_name == 'macOS' && inputs.build_preset == 'Sanitizer_CI' }}
|
||||
working-directory: ${{ github.workspace }}/Build
|
||||
run: cmake --build .
|
||||
|
||||
@@ -183,7 +182,7 @@ jobs:
|
||||
# === TEST ===
|
||||
|
||||
- name: Test
|
||||
if: ${{ inputs.fuzzer == 'NO_FUZZ' }}
|
||||
if: ${{ inputs.build_preset == 'Sanitizer_CI' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: ctest --preset Sanitizer --output-on-failure --test-dir Build --timeout 1800
|
||||
env:
|
||||
@@ -192,17 +191,24 @@ jobs:
|
||||
ASAN_OPTIONS: 'log_path=${{ github.workspace }}/asan.log'
|
||||
UBSAN_OPTIONS: 'log_path=${{ github.workspace }}/ubsan.log'
|
||||
|
||||
- name: Test
|
||||
if: ${{ inputs.build_preset != 'Fuzzers_CI' && inputs.build_preset != 'Sanitizer_CI' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: ctest --output-on-failure --test-dir Build --timeout 1800
|
||||
env:
|
||||
TESTS_ONLY: 1
|
||||
|
||||
- name: Upload LibWeb Test Artifacts
|
||||
if: ${{ always() && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
if: ${{ always() && inputs.build_preset != 'Fuzzers_CI' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: libweb-test-artifacts-${{ inputs.os_name }}-${{inputs.fuzzer}}-${{inputs.toolchain}}-${{inputs.clang-plugins}}
|
||||
name: libweb-test-artifacts-${{ inputs.os_name }}-${{inputs.build_preset}}-${{inputs.toolchain}}-${{inputs.clang-plugins}}
|
||||
path: ${{ github.workspace }}/Build/UI/Headless/test-dumps
|
||||
retention-days: 0
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Sanitizer Output
|
||||
if: ${{ !cancelled() && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
if: ${{ !cancelled() && inputs.build_preset == 'Sanitizer_CI' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
log_output=$(find . -maxdepth 1 \( -name 'asan.log.*' -o -name 'ubsan.log.*' \) -exec cat {} \; )
|
||||
@@ -214,7 +220,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Lints
|
||||
if: ${{ inputs.os_name == 'Linux' && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
if: ${{ inputs.os_name == 'Linux' && inputs.build_preset == 'Sanitizer_CI' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
set -e
|
||||
|
||||
Reference in New Issue
Block a user