diff options
-rw-r--r-- | .github/workflows/linux-wpt.yml | 6 | ||||
-rw-r--r-- | .github/workflows/linux.yml | 25 | ||||
-rw-r--r-- | .github/workflows/mac.yml | 10 | ||||
-rw-r--r-- | .github/workflows/main.yml | 29 | ||||
-rw-r--r-- | .github/workflows/pull-request.yml | 14 | ||||
-rw-r--r-- | .github/workflows/windows.yml | 15 | ||||
-rw-r--r-- | python/tidy/tidy.py | 2 | ||||
-rw-r--r-- | python/wpt/run.py | 14 |
8 files changed, 59 insertions, 56 deletions
diff --git a/.github/workflows/linux-wpt.yml b/.github/workflows/linux-wpt.yml index fd614b0a0fe..0570fae701b 100644 --- a/.github/workflows/linux-wpt.yml +++ b/.github/workflows/linux-wpt.yml @@ -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: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4d55ed42e9e..cc6f695bc26 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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') + diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 28d8cef1a84..cc30a80ae5a 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9d0c7afb72a..167a4dca574 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml deleted file mode 100644 index bbd66dd7f30..00000000000 --- a/.github/workflows/pull-request.yml +++ /dev/null @@ -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
\ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b8be054d9d9..401af96e4e2 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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') + diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py index 45e4260ab13..4e3bca9f5b4 100644 --- a/python/tidy/tidy.py +++ b/python/tidy/tidy.py @@ -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 diff --git a/python/wpt/run.py b/python/wpt/run.py index ae0fde9cb27..2b3cad5d563 100644 --- a/python/wpt/run.py +++ b/python/wpt/run.py @@ -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, |