mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-28 04:09:00 +00:00
CI: Move the clang toolchain CI to GitHub actions
This commit is contained in:
parent
c7828b0640
commit
ac8d5cce3c
Notes:
sideshowbarker
2024-07-17 17:40:13 +09:00
Author: https://github.com/trflynn89
Commit: ac8d5cce3c
Pull-request: https://github.com/SerenityOS/serenity/pull/24263
Reviewed-by: https://github.com/ADKaster
2 changed files with 31 additions and 20 deletions
43
.github/workflows/cmake.yml
vendored
43
.github/workflows/cmake.yml
vendored
|
@ -21,15 +21,22 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
debug-options: ['ALL_DEBUG', 'NORMAL_DEBUG']
|
debug-options: ['NORMAL_DEBUG']
|
||||||
os: [ubuntu-22.04]
|
os: [ubuntu-22.04]
|
||||||
arch: ['x86_64', 'aarch64']
|
arch: ['x86_64']
|
||||||
|
toolchain: ['GNU', 'Clang']
|
||||||
# If ccache is broken and you would like to bust the ccache cache on Github Actions, increment this:
|
# If ccache is broken and you would like to bust the ccache cache on Github Actions, increment this:
|
||||||
ccache-mark: [0]
|
ccache-mark: [0]
|
||||||
exclude:
|
include:
|
||||||
# We currently manually disable the ALL_DEBUG build on AArch64 for sake of saving CI time, as it's not our main target.
|
- debug-options: 'NORMAL_DEBUG'
|
||||||
- debug-options: 'ALL_DEBUG'
|
os: ubuntu-22.04
|
||||||
arch: 'aarch64'
|
arch: 'aarch64'
|
||||||
|
toolchain: 'GNU'
|
||||||
|
|
||||||
|
- debug-options: 'ALL_DEBUG'
|
||||||
|
os: ubuntu-22.04
|
||||||
|
arch: 'x86_64'
|
||||||
|
toolchain: 'GNU'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Pull requests can trail behind `master` and can cause breakage if merging before running the CI checks on an updated branch.
|
# Pull requests can trail behind `master` and can cause breakage if merging before running the CI checks on an updated branch.
|
||||||
|
@ -60,17 +67,29 @@ jobs:
|
||||||
with:
|
with:
|
||||||
os: 'Serenity'
|
os: 'Serenity'
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
toolchain: 'GNU'
|
toolchain: ${{ matrix.toolchain }}
|
||||||
cache_key_extra: ${{ matrix.debug-options }}
|
cache_key_extra: ${{ matrix.debug-options }}
|
||||||
serenity_ccache_path: ${{ env.SERENITY_CCACHE_DIR }}
|
serenity_ccache_path: ${{ env.SERENITY_CCACHE_DIR }}
|
||||||
toolchain_ccache_path: ${{ env.TOOLCHAIN_CCACHE_DIR }}
|
toolchain_ccache_path: ${{ env.TOOLCHAIN_CCACHE_DIR }}
|
||||||
download_cache_path: ${{ github.workspace }}/Build/caches
|
download_cache_path: ${{ github.workspace }}/Build/caches
|
||||||
|
|
||||||
|
- name: Assign Build Parameters
|
||||||
|
id: 'build-parameters'
|
||||||
|
run: |
|
||||||
|
if ${{ matrix.toolchain == 'Clang' }} ; then
|
||||||
|
echo "build_directory=${{ github.workspace }}/Build/${{ matrix.arch }}clang" >> "$GITHUB_OUTPUT"
|
||||||
|
elif ${{ matrix.toolchain == 'GNU' }} ; then
|
||||||
|
echo "build_directory=${{ github.workspace }}/Build/${{ matrix.arch }}" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build toolchain
|
- name: Build toolchain
|
||||||
if: ${{ !steps.cache-restore.outputs.toolchain_prebuilt_hit }}
|
if: ${{ !steps.cache-restore.outputs.toolchain_prebuilt_hit }}
|
||||||
run: ARCH="${{ matrix.arch }}" ${{ github.workspace }}/Toolchain/BuildGNU.sh
|
run: |
|
||||||
|
${{ github.workspace }}/Toolchain/Build${{ matrix.toolchain }}.sh --ci
|
||||||
env:
|
env:
|
||||||
|
ARCH: ${{ matrix.arch}}
|
||||||
CCACHE_DIR: ${{ env.TOOLCHAIN_CCACHE_DIR }}
|
CCACHE_DIR: ${{ env.TOOLCHAIN_CCACHE_DIR }}
|
||||||
|
TRY_USE_LOCAL_TOOLCHAIN: 'y'
|
||||||
|
|
||||||
- name: Build AArch64 Qemu
|
- name: Build AArch64 Qemu
|
||||||
if: ${{ matrix.arch == 'aarch64' && !steps.cache-restore.outputs.qemu_cache_hit }}
|
if: ${{ matrix.arch == 'aarch64' && !steps.cache-restore.outputs.qemu_cache_hit }}
|
||||||
|
@ -84,7 +103,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cmake -S Meta/CMake/Superbuild -B Build/superbuild -GNinja \
|
cmake -S Meta/CMake/Superbuild -B Build/superbuild -GNinja \
|
||||||
-DSERENITY_ARCH=${{ matrix.arch }} \
|
-DSERENITY_ARCH=${{ matrix.arch }} \
|
||||||
-DSERENITY_TOOLCHAIN=GNU \
|
-DSERENITY_TOOLCHAIN=${{ matrix.toolchain }} \
|
||||||
-DBUILD_LAGOM=ON \
|
-DBUILD_LAGOM=ON \
|
||||||
-DCMAKE_C_COMPILER=gcc-13 \
|
-DCMAKE_C_COMPILER=gcc-13 \
|
||||||
-DCMAKE_CXX_COMPILER=g++-13 \
|
-DCMAKE_CXX_COMPILER=g++-13 \
|
||||||
|
@ -101,7 +120,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cmake -S Meta/CMake/Superbuild -B Build/superbuild -GNinja \
|
cmake -S Meta/CMake/Superbuild -B Build/superbuild -GNinja \
|
||||||
-DSERENITY_ARCH=${{ matrix.arch }} \
|
-DSERENITY_ARCH=${{ matrix.arch }} \
|
||||||
-DSERENITY_TOOLCHAIN=GNU \
|
-DSERENITY_TOOLCHAIN=${{ matrix.toolchain }} \
|
||||||
-DCMAKE_C_COMPILER=gcc-13 \
|
-DCMAKE_C_COMPILER=gcc-13 \
|
||||||
-DCMAKE_CXX_COMPILER=g++-13 \
|
-DCMAKE_CXX_COMPILER=g++-13 \
|
||||||
-DENABLE_UNDEFINED_SANITIZER=ON \
|
-DENABLE_UNDEFINED_SANITIZER=ON \
|
||||||
|
@ -137,12 +156,12 @@ jobs:
|
||||||
|
|
||||||
- name: Create Serenity Rootfs
|
- name: Create Serenity Rootfs
|
||||||
if: ${{ matrix.debug-options == 'NORMAL_DEBUG' }}
|
if: ${{ matrix.debug-options == 'NORMAL_DEBUG' }}
|
||||||
working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }}
|
working-directory: ${{ steps.build-parameters.outputs.build_directory }}
|
||||||
run: ninja install && ninja qemu-image
|
run: ninja install && ninja qemu-image
|
||||||
|
|
||||||
- name: Run On-Target Tests
|
- name: Run On-Target Tests
|
||||||
if: ${{ matrix.debug-options == 'NORMAL_DEBUG' && matrix.arch != 'aarch64' }}
|
if: ${{ matrix.debug-options == 'NORMAL_DEBUG' && matrix.arch != 'aarch64' }}
|
||||||
working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }}
|
working-directory: ${{ steps.build-parameters.outputs.build_directory }}
|
||||||
env:
|
env:
|
||||||
SERENITY_QEMU_CPU: "max,vmx=off"
|
SERENITY_QEMU_CPU: "max,vmx=off"
|
||||||
SERENITY_KERNEL_CMDLINE: "graphics_subsystem_mode=off panic=shutdown system_mode=self-test"
|
SERENITY_KERNEL_CMDLINE: "graphics_subsystem_mode=off panic=shutdown system_mode=self-test"
|
||||||
|
@ -167,5 +186,5 @@ jobs:
|
||||||
- name: Print Target Logs
|
- name: Print Target Logs
|
||||||
# Extremely useful if Serenity hangs trying to run one of the tests
|
# Extremely useful if Serenity hangs trying to run one of the tests
|
||||||
if: ${{ !cancelled() && matrix.debug-options == 'NORMAL_DEBUG'}}
|
if: ${{ !cancelled() && matrix.debug-options == 'NORMAL_DEBUG'}}
|
||||||
working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }}
|
working-directory: ${{ steps.build-parameters.outputs.build_directory }}
|
||||||
run: '[ ! -e debug.log ] || cat debug.log'
|
run: '[ ! -e debug.log ] || cat debug.log'
|
||||||
|
|
|
@ -28,11 +28,3 @@ stages:
|
||||||
os: 'macOS'
|
os: 'macOS'
|
||||||
host_cc: '$(brew --prefix llvm@18)/bin/clang'
|
host_cc: '$(brew --prefix llvm@18)/bin/clang'
|
||||||
host_cxx: '$(brew --prefix llvm@18)/bin/clang++'
|
host_cxx: '$(brew --prefix llvm@18)/bin/clang++'
|
||||||
|
|
||||||
- stage: SerenityOS
|
|
||||||
dependsOn: []
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- template: Meta/Azure/Serenity.yml
|
|
||||||
parameters:
|
|
||||||
arch: 'x86_64'
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue