mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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:
|
||||
workflow_call:
|
||||
inputs:
|
||||
|
@ -15,7 +15,7 @@ env:
|
|||
|
||||
jobs:
|
||||
linux-wpt:
|
||||
name: Linux WPT Tests ${{ inputs.layout }}
|
||||
name: WPT ${{ inputs.layout }}
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
max_chunk_id: 20
|
||||
|
@ -90,7 +90,7 @@ jobs:
|
|||
wpt-jsonsummary.${{ matrix.chunk_id }}.log
|
||||
|
||||
report-test-results:
|
||||
name: Reporting test results
|
||||
name: Report WPT Results
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ always() && !cancelled() && (github.ref_name == 'try-wpt' || github.ref_name == 'try-wpt-2020' || inputs.wpt == 'test') }}
|
||||
needs:
|
||||
|
|
25
.github/workflows/linux.yml
vendored
25
.github/workflows/linux.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Linux workflow
|
||||
name: Linux
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
|
@ -29,7 +29,7 @@ on:
|
|||
layout:
|
||||
required: false
|
||||
type: choice
|
||||
options: ["2013", "2020", "all"]
|
||||
options: ["none", "2013", "2020", "all"]
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -50,7 +50,7 @@ env:
|
|||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
|
@ -113,33 +113,33 @@ jobs:
|
|||
name: release-binary
|
||||
path: target.tar.gz
|
||||
|
||||
linux-wpt-2020:
|
||||
wpt-2020:
|
||||
if: ${{ github.ref_name == 'try-wpt-2020' || inputs.layout == '2020' || inputs.layout == 'all' }}
|
||||
name: Linux WPT Tests 2020
|
||||
needs: ["build-linux"]
|
||||
needs: ["build"]
|
||||
uses: ./.github/workflows/linux-wpt.yml
|
||||
with:
|
||||
wpt: ${{ inputs.wpt }}
|
||||
layout: "layout-2020"
|
||||
|
||||
linux-wpt-2013:
|
||||
wpt-2013:
|
||||
if: ${{ github.ref_name == 'try-wpt' || inputs.layout == '2013' || inputs.layout == 'all' }}
|
||||
name: Linux WPT Tests 2013
|
||||
needs: ["build-linux"]
|
||||
needs: ["build"]
|
||||
uses: ./.github/workflows/linux-wpt.yml
|
||||
with:
|
||||
wpt: ${{ inputs.wpt }}
|
||||
layout: "layout-2013"
|
||||
|
||||
build_result:
|
||||
name: homu build finished
|
||||
result:
|
||||
name: Result
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
# needs all build to detect cancellation
|
||||
needs:
|
||||
- "build-linux"
|
||||
- "linux-wpt-2020"
|
||||
- "linux-wpt-2013"
|
||||
- "build"
|
||||
- "wpt-2020"
|
||||
- "wpt-2013"
|
||||
|
||||
steps:
|
||||
- name: Mark the job as successful
|
||||
|
@ -148,3 +148,4 @@ jobs:
|
|||
- name: Mark the job as unsuccessful
|
||||
run: exit 1
|
||||
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:
|
||||
workflow_call:
|
||||
|
@ -36,7 +36,7 @@ env:
|
|||
CARGO_INCREMENTAL: 0
|
||||
|
||||
jobs:
|
||||
build-mac:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
|
@ -143,13 +143,13 @@ jobs:
|
|||
# test-wpt.${{ matrix.chunk_id }}.log
|
||||
# filtered-wpt-summary.${{ matrix.chunk_id }}.log
|
||||
|
||||
build_result:
|
||||
name: homu build finished
|
||||
result:
|
||||
name: Result
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
# needs all build to detect cancellation
|
||||
needs:
|
||||
- "build-mac"
|
||||
- "build"
|
||||
|
||||
steps:
|
||||
- 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:
|
||||
push:
|
||||
branches: ["auto", "try"]
|
||||
|
||||
# Used by GH merge queue for landing PRs
|
||||
# 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
|
||||
# random force pushes.
|
||||
branches: ["master", "try"]
|
||||
pull_request:
|
||||
types: ['opened', 'synchronize']
|
||||
branches: ["**"]
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
decision:
|
||||
name: Decision job
|
||||
name: Decision
|
||||
runs-on: ubuntu-20.04
|
||||
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
|
||||
with:
|
||||
script: |
|
||||
|
@ -35,6 +40,7 @@ jobs:
|
|||
|
||||
build-win:
|
||||
name: Windows
|
||||
if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}
|
||||
needs: ["decision"]
|
||||
uses: ./.github/workflows/windows.yml
|
||||
with:
|
||||
|
@ -42,6 +48,7 @@ jobs:
|
|||
|
||||
build-mac:
|
||||
name: Mac
|
||||
if: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}
|
||||
needs: ["decision"]
|
||||
uses: ./.github/workflows/mac.yml
|
||||
with:
|
||||
|
@ -53,11 +60,11 @@ jobs:
|
|||
uses: ./.github/workflows/linux.yml
|
||||
with:
|
||||
wpt: 'test'
|
||||
layout: 'all'
|
||||
unit-tests: true
|
||||
layout: ${{ (github.event_name == 'push' || github.event_name == 'merge_group') && 'all' || 'none' }}
|
||||
unit-tests: ${{ github.event_name == 'push' || github.event_name == 'merge_group' }}
|
||||
|
||||
build_result:
|
||||
name: homu build finished
|
||||
name: Result
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
# 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:
|
||||
workflow_call:
|
||||
|
@ -34,7 +34,7 @@ env:
|
|||
CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target
|
||||
|
||||
jobs:
|
||||
build-win:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
|
@ -73,7 +73,7 @@ jobs:
|
|||
path: C:\\a\\servo\\servo\\target\\cargo-timings-*
|
||||
- name: Package
|
||||
run: python mach package --release
|
||||
- name: Upload Package
|
||||
- name: Upload package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: win
|
||||
|
@ -82,7 +82,7 @@ jobs:
|
|||
# Bundle: C:\a\servo\servo\target\release\msi\Servo.exe
|
||||
# Zip: C:\a\servo\servo\target\release\msi\Servo.zip
|
||||
path: C:\\a\\servo\\servo\\target/release/msi/Servo.exe
|
||||
- name: Upload
|
||||
- name: Upload nightly
|
||||
if: ${{ inputs.upload }}
|
||||
run: |
|
||||
python mach upload-nightly windows-msvc --secret-from-environment `
|
||||
|
@ -92,13 +92,13 @@ jobs:
|
|||
NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
|
||||
NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds
|
||||
|
||||
build_result:
|
||||
name: homu build finished
|
||||
result:
|
||||
name: Result
|
||||
runs-on: ubuntu-latest
|
||||
if: always()
|
||||
# needs all build to detect cancellation
|
||||
needs:
|
||||
- "build-win"
|
||||
- "build"
|
||||
|
||||
steps:
|
||||
- name: Mark the job as successful
|
||||
|
@ -107,3 +107,4 @@ jobs:
|
|||
- name: Mark the job as unsuccessful
|
||||
run: exit 1
|
||||
if: contains(join(needs.*.result, ','), 'failure') || contains(join(needs.*.result, ','), 'cancelled')
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ class FileList(object):
|
|||
yield os.path.join(root, f)
|
||||
|
||||
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()
|
||||
if not last_merge:
|
||||
return
|
||||
|
|
|
@ -223,9 +223,17 @@ class TrackerDashboardFilter():
|
|||
run_id = github_context['run_id']
|
||||
build_url = f"{repo_url}/actions/runs/{run_id}"
|
||||
|
||||
commit_title = github_context["event"]["head_commit"]["message"]
|
||||
match = re.match(r"^Auto merge of #(\d+)", commit_title)
|
||||
pr_url = f"{repo_url}/pull/{match.group(1)}" if match else None
|
||||
commit_title = "<no title>"
|
||||
if "merge_group" in github_context["event"]:
|
||||
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(
|
||||
build_url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue