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