diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml new file mode 100644 index 00000000000..7d00e7698ce --- /dev/null +++ b/.github/workflows/ci-windows.yml @@ -0,0 +1,32 @@ +name: CI + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - labeled + - unlabeled + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + # Do not cancel in-progress runs if a labeling action took place (other than 'windows'). Otherwise, adding irrelevant + # labels causes existing runs to be canceled and a new (identical) run to be started. + cancel-in-progress: ${{ (github.event.action != 'labeled' && github.event.action != 'unlabeled') || github.event.label.name == 'windows' }} + +jobs: + CI: + # Only run this job if the PR has the 'windows' label. + if: | + github.repository == 'LadybirdBrowser/ladybird' + && contains(github.event.pull_request.labels.*.name, 'windows') + name: 'Windows, x86_64, Windows_SanitizerCI, ClangCL' + uses: ./.github/workflows/lagom-template.yml + with: + toolchain: 'ClangCL' + os_name: 'Windows' + runner_labels: '["windows-2025"]' + arch: 'x86_64' + build_preset: 'Windows_Sanitizer_CI' + clang_plugins: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92a1b8577c8..df29187b46d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,6 @@ name: CI -on: - push: - pull_request: - types: - - opened - - synchronize - - reopened - - labeled +on: [push, pull_request] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }} @@ -16,12 +9,7 @@ concurrency: jobs: # CI matrix - runs the job in lagom-template.yml with different configurations. Lagom: - # Run the items in this matrix only if: - # 1. The repository is the Ladybird repository; and - # 2. If the event was a push event, or a PR event other than 'labeled', or the label name is 'windows' - if: | - github.repository == 'LadybirdBrowser/ladybird' - && (github.event_name != 'pull_request' || github.event.action != 'labeled' || github.event.label.name == 'windows') + if: github.repository == 'LadybirdBrowser/ladybird' name: ${{ matrix.os_name }}, ${{ matrix.arch }}, ${{ matrix.build_preset }}, ${{ matrix.toolchain }} strategy: @@ -33,7 +21,6 @@ jobs: toolchain: ['GNU'] clang_plugins: [false] runner_labels: ['["blacksmith-16vcpu-ubuntu-2404"]'] - enabled: [true] include: - os_name: 'Linux' @@ -42,7 +29,6 @@ jobs: toolchain: 'Clang' clang_plugins: true runner_labels: '["blacksmith-16vcpu-ubuntu-2404"]' - enabled: true - os_name: 'macOS' arch: 'arm64' @@ -50,7 +36,6 @@ jobs: toolchain: 'Clang' clang_plugins: false runner_labels: '["macos-15", "self-hosted"]' - enabled: true - os_name: 'Linux' arch: 'x86_64' @@ -58,15 +43,6 @@ jobs: toolchain: 'Clang' clang_plugins: false runner_labels: '["blacksmith-16vcpu-ubuntu-2404"]' - enabled: true - - - os_name: 'Windows' - arch: 'x86_64' - build_preset: 'Windows_Sanitizer_CI' - toolchain: 'ClangCL' - clang_plugins: false - runner_labels: '["windows-2025"]' - enabled: ${{ contains(github.event.pull_request.labels.*.name, 'windows') }} uses: ./.github/workflows/lagom-template.yml with: @@ -76,4 +52,3 @@ jobs: arch: ${{ matrix.arch }} build_preset: ${{ matrix.build_preset }} clang_plugins: ${{ matrix.clang_plugins }} - enabled: ${{ matrix.enabled }} diff --git a/.github/workflows/lagom-template.yml b/.github/workflows/lagom-template.yml index 68ec4c8f454..62fac3d97e9 100644 --- a/.github/workflows/lagom-template.yml +++ b/.github/workflows/lagom-template.yml @@ -22,10 +22,6 @@ on: required: false type: boolean default: false - enabled: - required: false - type: boolean - default: true env: # runner.workspace = /home/runner/work/ladybird @@ -42,7 +38,6 @@ env: jobs: CI: - if: ${{ inputs.enabled }} runs-on: ${{ fromJSON(inputs.runner_labels) }} steps: