mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Enable the GitHub merge queue (#29989)
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
9eee517132
commit
d5202a4a98
8 changed files with 59 additions and 56 deletions
6
.github/workflows/linux-wpt.yml
vendored
6
.github/workflows/linux-wpt.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Linux WPT workflow
|
name: Linux WPT Tests
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -15,7 +15,7 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux-wpt:
|
linux-wpt:
|
||||||
name: Linux WPT Tests ${{ inputs.layout }}
|
name: WPT ${{ inputs.layout }}
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
env:
|
||||||
max_chunk_id: 20
|
max_chunk_id: 20
|
||||||
|
@ -90,7 +90,7 @@ jobs:
|
||||||
wpt-jsonsummary.${{ matrix.chunk_id }}.log
|
wpt-jsonsummary.${{ matrix.chunk_id }}.log
|
||||||
|
|
||||||
report-test-results:
|
report-test-results:
|
||||||
name: Reporting test results
|
name: Report WPT Results
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ always() && !cancelled() && (github.ref_name == 'try-wpt' || github.ref_name == 'try-wpt-2020' || inputs.wpt == 'test') }}
|
if: ${{ always() && !cancelled() && (github.ref_name == 'try-wpt' || github.ref_name == 'try-wpt-2020' || inputs.wpt == 'test') }}
|
||||||
needs:
|
needs:
|
||||||
|
|
25
.github/workflows/linux.yml
vendored
25
.github/workflows/linux.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Linux workflow
|
name: Linux
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -29,7 +29,7 @@ on:
|
||||||
layout:
|
layout:
|
||||||
required: false
|
required: false
|
||||||
type: choice
|
type: choice
|
||||||
options: ["2013", "2020", "all"]
|
options: ["none", "2013", "2020", "all"]
|
||||||
unit-tests:
|
unit-tests:
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
|
@ -50,7 +50,7 @@ env:
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
@ -113,33 +113,33 @@ jobs:
|
||||||
name: release-binary
|
name: release-binary
|
||||||
path: target.tar.gz
|
path: target.tar.gz
|
||||||
|
|
||||||
linux-wpt-2020:
|
wpt-2020:
|
||||||
if: ${{ github.ref_name == 'try-wpt-2020' || inputs.layout == '2020' || inputs.layout == 'all' }}
|
if: ${{ github.ref_name == 'try-wpt-2020' || inputs.layout == '2020' || inputs.layout == 'all' }}
|
||||||
name: Linux WPT Tests 2020
|
name: Linux WPT Tests 2020
|
||||||
needs: ["build-linux"]
|
needs: ["build"]
|
||||||
uses: ./.github/workflows/linux-wpt.yml
|
uses: ./.github/workflows/linux-wpt.yml
|
||||||
with:
|
with:
|
||||||
wpt: ${{ inputs.wpt }}
|
wpt: ${{ inputs.wpt }}
|
||||||
layout: "layout-2020"
|
layout: "layout-2020"
|
||||||
|
|
||||||
linux-wpt-2013:
|
wpt-2013:
|
||||||
if: ${{ github.ref_name == 'try-wpt' || inputs.layout == '2013' || inputs.layout == 'all' }}
|
if: ${{ github.ref_name == 'try-wpt' || inputs.layout == '2013' || inputs.layout == 'all' }}
|
||||||
name: Linux WPT Tests 2013
|
name: Linux WPT Tests 2013
|
||||||
needs: ["build-linux"]
|
needs: ["build"]
|
||||||
uses: ./.github/workflows/linux-wpt.yml
|
uses: ./.github/workflows/linux-wpt.yml
|
||||||
with:
|
with:
|
||||||
wpt: ${{ inputs.wpt }}
|
wpt: ${{ inputs.wpt }}
|
||||||
layout: "layout-2013"
|
layout: "layout-2013"
|
||||||
|
|
||||||
build_result:
|
result:
|
||||||
name: homu build finished
|
name: Result
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
# needs all build to detect cancellation
|
# needs all build to detect cancellation
|
||||||
needs:
|
needs:
|
||||||
- "build-linux"
|
- "build"
|
||||||
- "linux-wpt-2020"
|
- "wpt-2020"
|
||||||
- "linux-wpt-2013"
|
- "wpt-2013"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Mark the job as successful
|
- name: Mark the job as successful
|
||||||
|
@ -148,3 +148,4 @@ jobs:
|
||||||
- name: Mark the job as unsuccessful
|
- name: Mark the job as unsuccessful
|
||||||
run: exit 1
|
run: exit 1
|
||||||
if: contains(join(needs.*.result, ','), 'failure') || contains(join(needs.*.result, ','), 'cancelled')
|
if: contains(join(needs.*.result, ','), 'failure') || contains(join(needs.*.result, ','), 'cancelled')
|
||||||
|
|
||||||
|
|
10
.github/workflows/mac.yml
vendored
10
.github/workflows/mac.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Mac workflow
|
name: Mac
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
@ -36,7 +36,7 @@ env:
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-mac:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
steps:
|
steps:
|
||||||
|
@ -143,13 +143,13 @@ jobs:
|
||||||
# test-wpt.${{ matrix.chunk_id }}.log
|
# test-wpt.${{ matrix.chunk_id }}.log
|
||||||
# filtered-wpt-summary.${{ matrix.chunk_id }}.log
|
# filtered-wpt-summary.${{ matrix.chunk_id }}.log
|
||||||
|
|
||||||
build_result:
|
result:
|
||||||
name: homu build finished
|
name: Result
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
# needs all build to detect cancellation
|
# needs all build to detect cancellation
|
||||||
needs:
|
needs:
|
||||||
- "build-mac"
|
- "build"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Mark the job as successful
|
- name: Mark the job as successful
|
||||||
|
|
29
.github/workflows/main.yml
vendored
29
.github/workflows/main.yml
vendored
|
@ -1,22 +1,27 @@
|
||||||
name: Merge queue and try
|
name: Main
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["auto", "try"]
|
# Run the entire pipeline for 'master' even though the merge queue already runs checks
|
||||||
|
# for every change. This just offers an extra layer of testing and covers the case of
|
||||||
# Used by GH merge queue for landing PRs
|
# random force pushes.
|
||||||
|
branches: ["master", "try"]
|
||||||
|
pull_request:
|
||||||
|
types: ['opened', 'synchronize']
|
||||||
|
branches: ["**"]
|
||||||
merge_group:
|
merge_group:
|
||||||
types: [checks_requested]
|
types: [checks_requested]
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
decision:
|
decision:
|
||||||
name: Decision job
|
name: Decision
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- name: Previous successful build check
|
# If an identical build exists that suceeded, skip this workflow run. We don't do
|
||||||
|
# this check for pull_request and merge_group events, out of caution.
|
||||||
|
- name: Skip previous identical builds
|
||||||
|
if: ${{ github.event_name != 'pull_request' && github.event_name != 'merge_group' }}
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -35,6 +40,7 @@ jobs:
|
||||||
|
|
||||||
build-win:
|
build-win:
|
||||||
name: Windows
|
name: Windows
|
||||||
|
if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}
|
||||||
needs: ["decision"]
|
needs: ["decision"]
|
||||||
uses: ./.github/workflows/windows.yml
|
uses: ./.github/workflows/windows.yml
|
||||||
with:
|
with:
|
||||||
|
@ -42,6 +48,7 @@ jobs:
|
||||||
|
|
||||||
build-mac:
|
build-mac:
|
||||||
name: Mac
|
name: Mac
|
||||||
|
if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}
|
||||||
needs: ["decision"]
|
needs: ["decision"]
|
||||||
uses: ./.github/workflows/mac.yml
|
uses: ./.github/workflows/mac.yml
|
||||||
with:
|
with:
|
||||||
|
@ -53,11 +60,11 @@ jobs:
|
||||||
uses: ./.github/workflows/linux.yml
|
uses: ./.github/workflows/linux.yml
|
||||||
with:
|
with:
|
||||||
wpt: 'test'
|
wpt: 'test'
|
||||||
layout: 'all'
|
layout: ${{ (github.event_name == 'push' || github.event_name == 'merge_group') && 'all' || 'none' }}
|
||||||
unit-tests: true
|
unit-tests: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}
|
||||||
|
|
||||||
build_result:
|
build_result:
|
||||||
name: homu build finished
|
name: Result
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
# needs all build to detect cancellation
|
# needs all build to detect cancellation
|
||||||
|
|
14
.github/workflows/pull-request.yml
vendored
14
.github/workflows/pull-request.yml
vendored
|
@ -1,14 +0,0 @@
|
||||||
name: Pull request
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: ['opened', 'synchronize']
|
|
||||||
branches: ["**"]
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-linux:
|
|
||||||
name: Linux
|
|
||||||
if: github.repository == 'servo/servo'
|
|
||||||
uses: ./.github/workflows/linux.yml
|
|
||||||
with:
|
|
||||||
unit-tests: true
|
|
15
.github/workflows/windows.yml
vendored
15
.github/workflows/windows.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: Windows workflow
|
name: Windows
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
@ -34,7 +34,7 @@ env:
|
||||||
CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target
|
CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-win:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
steps:
|
steps:
|
||||||
|
@ -73,7 +73,7 @@ jobs:
|
||||||
path: C:\\a\\servo\\servo\\target\\cargo-timings-*
|
path: C:\\a\\servo\\servo\\target\\cargo-timings-*
|
||||||
- name: Package
|
- name: Package
|
||||||
run: python mach package --release
|
run: python mach package --release
|
||||||
- name: Upload Package
|
- name: Upload package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: win
|
name: win
|
||||||
|
@ -82,7 +82,7 @@ jobs:
|
||||||
# Bundle: C:\a\servo\servo\target\release\msi\Servo.exe
|
# Bundle: C:\a\servo\servo\target\release\msi\Servo.exe
|
||||||
# Zip: C:\a\servo\servo\target\release\msi\Servo.zip
|
# Zip: C:\a\servo\servo\target\release\msi\Servo.zip
|
||||||
path: C:\\a\\servo\\servo\\target/release/msi/Servo.exe
|
path: C:\\a\\servo\\servo\\target/release/msi/Servo.exe
|
||||||
- name: Upload
|
- name: Upload nightly
|
||||||
if: ${{ inputs.upload }}
|
if: ${{ inputs.upload }}
|
||||||
run: |
|
run: |
|
||||||
python mach upload-nightly windows-msvc --secret-from-environment `
|
python mach upload-nightly windows-msvc --secret-from-environment `
|
||||||
|
@ -92,13 +92,13 @@ jobs:
|
||||||
NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
|
NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
|
||||||
NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds
|
NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds
|
||||||
|
|
||||||
build_result:
|
result:
|
||||||
name: homu build finished
|
name: Result
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
# needs all build to detect cancellation
|
# needs all build to detect cancellation
|
||||||
needs:
|
needs:
|
||||||
- "build-win"
|
- "build"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Mark the job as successful
|
- name: Mark the job as successful
|
||||||
|
@ -107,3 +107,4 @@ jobs:
|
||||||
- name: Mark the job as unsuccessful
|
- name: Mark the job as unsuccessful
|
||||||
run: exit 1
|
run: exit 1
|
||||||
if: contains(join(needs.*.result, ','), 'failure') || contains(join(needs.*.result, ','), 'cancelled')
|
if: contains(join(needs.*.result, ','), 'failure') || contains(join(needs.*.result, ','), 'cancelled')
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ class FileList(object):
|
||||||
yield os.path.join(root, f)
|
yield os.path.join(root, f)
|
||||||
|
|
||||||
def _git_changed_files(self):
|
def _git_changed_files(self):
|
||||||
args = ["git", "log", "-n1", "--merges", "--format=%H"]
|
args = ["git", "log", "-n1", "--committer", "noreply@github.com", "--format=%H"]
|
||||||
last_merge = subprocess.check_output(args, universal_newlines=True).strip()
|
last_merge = subprocess.check_output(args, universal_newlines=True).strip()
|
||||||
if not last_merge:
|
if not last_merge:
|
||||||
return
|
return
|
||||||
|
|
|
@ -223,9 +223,17 @@ class TrackerDashboardFilter():
|
||||||
run_id = github_context['run_id']
|
run_id = github_context['run_id']
|
||||||
build_url = f"{repo_url}/actions/runs/{run_id}"
|
build_url = f"{repo_url}/actions/runs/{run_id}"
|
||||||
|
|
||||||
commit_title = github_context["event"]["head_commit"]["message"]
|
commit_title = "<no title>"
|
||||||
match = re.match(r"^Auto merge of #(\d+)", commit_title)
|
if "merge_group" in github_context["event"]:
|
||||||
pr_url = f"{repo_url}/pull/{match.group(1)}" if match else None
|
commit_title = github_context["event"]["merge_group"]["head_commit"]["message"]
|
||||||
|
if "head_commit" in github_context["event"]:
|
||||||
|
commit_title = github_context["event"]["head_commit"]["message"]
|
||||||
|
|
||||||
|
pr_url = None
|
||||||
|
match = re.match(r"^Auto merge of #(\d+)", commit_title) or \
|
||||||
|
re.match(r"\(#(\d+)\)", commit_title)
|
||||||
|
if match:
|
||||||
|
pr_url = f"{repo_url}/pull/{match.group(1)}" if match else None
|
||||||
|
|
||||||
return GithubContextInformation(
|
return GithubContextInformation(
|
||||||
build_url,
|
build_url,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue