We can prevent running builds unnecessarily by requiring the linters to succeed first. If either the code or commit linter fails, it means the author of the PR needs to rework their branch and after pushing their changes, we need to do a full new CI run anyway.
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint_code:
|
|
name: 'Lint Code'
|
|
uses: ./.github/workflows/lint-code.yml
|
|
|
|
lint_commits:
|
|
name: 'Lint Commits'
|
|
uses: ./.github/workflows/lint-commits.yml
|
|
|
|
# CI matrix - runs the job in lagom-template.yml with different configurations.
|
|
Lagom:
|
|
if: github.repository == 'LadybirdBrowser/ladybird'
|
|
needs: [lint_code, lint_commits]
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os_name: ['Linux']
|
|
os: [ubuntu-24.04]
|
|
arch: ['x86_64']
|
|
build_preset: ['Sanitizer_CI']
|
|
toolchain: ['GNU']
|
|
clang_plugins: [false]
|
|
|
|
include:
|
|
- os_name: 'Linux'
|
|
os: ubuntu-24.04
|
|
arch: 'x86_64'
|
|
build_preset: 'Sanitizer_CI'
|
|
toolchain: 'Clang'
|
|
clang_plugins: true
|
|
|
|
- os_name: 'macOS'
|
|
os: macos-15
|
|
arch: 'arm64'
|
|
build_preset: 'Sanitizer_CI'
|
|
toolchain: 'Clang'
|
|
clang_plugins: false
|
|
|
|
- os_name: 'Linux'
|
|
os: ubuntu-24.04
|
|
arch: 'x86_64'
|
|
build_preset: 'Fuzzers_CI'
|
|
toolchain: 'Clang'
|
|
clang_plugins: false
|
|
|
|
uses: ./.github/workflows/lagom-template.yml
|
|
with:
|
|
toolchain: ${{ matrix.toolchain }}
|
|
os_name: ${{ matrix.os_name }}
|
|
os: ${{ matrix.os }}
|
|
arch: ${{ matrix.arch }}
|
|
build_preset: ${{ matrix.build_preset }}
|
|
clang_plugins: ${{ matrix.clang_plugins }}
|