mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
CI: clean up workflow names The workflow names on [the actions page](https://github.com/servo/servo/actions) could be a bit clearer and more consistent. This patch gives main.yml and pull-request.yml more meaningful names, clarifies the nightly builds, and groups the WPT-related builds in lexicographic order. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] ~~`./mach build -d` does not report any errors~~ - [ ] ~~`./mach test-tidy` does not report any errors~~ - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they affect the CI configuration <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
326 lines
12 KiB
YAML
326 lines
12 KiB
YAML
name: Merge queue and try
|
|
|
|
on:
|
|
# Triggers the workflow on push events but only for the master branch
|
|
push:
|
|
branches: [ "auto", "try", "try-linux", "try-mac", "try-windows", "try-wpt"]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
SHELL: /bin/bash
|
|
|
|
jobs:
|
|
decision:
|
|
name: Decision job
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Previous successful build check
|
|
uses: actions/github-script@v6
|
|
with:
|
|
script: |
|
|
if ((await github.rest.actions.listWorkflowRuns({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
workflow_id: "main.yml",
|
|
head_sha: context.sha,
|
|
status: "success",
|
|
})).data.workflow_runs.length > 0)
|
|
await github.rest.actions.cancelWorkflowRun({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
run_id: context.runId,
|
|
});
|
|
|
|
build-win:
|
|
name: Build (Windows)
|
|
runs-on: windows-2019
|
|
needs: ["decision"]
|
|
steps:
|
|
# FIXME LLVM 15 breaks Windows builds https://github.com/servo/servo/issues/29269
|
|
- name: LLVM 14
|
|
run: |
|
|
$llvmVersion = Get-LatestChocoPackageVersion -TargetVersion 14 -PackageName llvm
|
|
Choco-Install -PackageName llvm -ArgumentList '--allow-downgrade', '--version', $llvmVersion
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 2
|
|
- name: Copy to C drive
|
|
run: cp D:\a C:\ -Recurse
|
|
- name: Bootstrap
|
|
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
run: |
|
|
python -m pip install --upgrade pip virtualenv
|
|
python mach fetch
|
|
- name: Release build
|
|
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
run: python mach build --release --media-stack=dummy
|
|
- name: Unit tests
|
|
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
run: python mach test-unit --release
|
|
- name: Smoketest
|
|
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
run: python mach smoketest --angle
|
|
|
|
build-uwp-x64:
|
|
name: Build (Windows UWP x64)
|
|
runs-on: windows-2019
|
|
needs: ["decision"]
|
|
steps:
|
|
# FIXME LLVM 15 breaks Windows builds https://github.com/servo/servo/issues/29269
|
|
- name: LLVM 14
|
|
run: |
|
|
$llvmVersion = Get-LatestChocoPackageVersion -TargetVersion 14 -PackageName llvm
|
|
Choco-Install -PackageName llvm -ArgumentList '--allow-downgrade', '--version', $llvmVersion
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 2
|
|
- name: Copy to C drive
|
|
run: cp D:\a C:\ -Recurse
|
|
- name: Bootstrap
|
|
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
run: |
|
|
python -m pip install --upgrade pip virtualenv
|
|
python mach fetch
|
|
- name: Release build
|
|
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
run: python mach build --release --target=x86_64-uwp-windows-msvc
|
|
#- name: Package
|
|
# working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
# run: python mach package --release --target=x86_64-uwp-windows-msvc --uwp=x64
|
|
# env:
|
|
# CODESIGN_CERT: ${{ secrets.WINDOWS_CODESIGN_CERT }}
|
|
- name: Tidy
|
|
run: python mach test-tidy --force-cpp --no-wpt
|
|
|
|
build-uwp-arm64:
|
|
name: Build (Windows UWP arm64)
|
|
runs-on: windows-2019
|
|
needs: ["decision"]
|
|
steps:
|
|
# FIXME LLVM 15 breaks Windows builds https://github.com/servo/servo/issues/29269
|
|
- name: LLVM 14
|
|
run: |
|
|
$llvmVersion = Get-LatestChocoPackageVersion -TargetVersion 14 -PackageName llvm
|
|
Choco-Install -PackageName llvm -ArgumentList '--allow-downgrade', '--version', $llvmVersion
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 2
|
|
- name: Copy to C drive
|
|
run: cp D:\a C:\ -Recurse
|
|
- name: Bootstrap
|
|
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
run: |
|
|
python -m pip install --upgrade pip virtualenv
|
|
python mach fetch
|
|
- name: Release build
|
|
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
run: python mach build --release --target=aarch64-uwp-windows-msvc
|
|
#- name: Package
|
|
# working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
|
|
# run: python mach package --release --target=aarch64-uwp-windows-msvc --uwp=arm64
|
|
# env:
|
|
# CODESIGN_CERT: ${{ secrets.WINDOWS_CODESIGN_CERT }}
|
|
|
|
build-mac:
|
|
name: Build (macOS)
|
|
runs-on: macos-12
|
|
needs: ["decision"]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 2
|
|
# TODO: Remove this step when the compatibility issue between mozjs and
|
|
# Homebrew's Python 3.10 formula (servo/rust-mozjs#559) is fixed
|
|
- name: Select Python 3.9
|
|
run: |
|
|
brew install python@3.9
|
|
cd $(dirname $(which python3.9))
|
|
rm -f python3 pip3
|
|
ln -s python3.9 python3
|
|
ln -s pip3.9 pip3
|
|
- name: Bootstrap
|
|
run: |
|
|
python3 -m pip install --upgrade pip virtualenv
|
|
brew bundle install --verbose --no-upgrade --file=etc/taskcluster/macos/Brewfile
|
|
brew bundle install --verbose --no-upgrade --file=etc/taskcluster/macos/Brewfile-build
|
|
rm -rf /usr/local/etc/openssl
|
|
rm -rf /usr/local/etc/openssl@1.1
|
|
brew install openssl@1.1 gnu-tar
|
|
- name: Release build
|
|
run: |
|
|
export OPENSSL_INCLUDE_DIR="$(brew --prefix openssl)/include"
|
|
export OPENSSL_LIB_DIR="$(brew --prefix openssl)/lib"
|
|
export PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig/"
|
|
export PKG_CONFIG_PATH="$(brew --prefix zlib)/lib/pkgconfig/:$PKG_CONFIG_PATH"
|
|
python3 ./mach build --release
|
|
- name: Smoketest
|
|
run: python3 ./mach smoketest
|
|
- name: Unit tests
|
|
run: python3 ./mach test-unit --release
|
|
- name: Test package
|
|
run: python3 ./mach package --release
|
|
- name: Package smoketest
|
|
run: ./etc/ci/macos_package_smoketest.sh target/release/servo-tech-demo.dmg
|
|
- name: Package binary
|
|
run: gtar -czf target.tar.gz target/release/servo target/release/*.dylib resources
|
|
- name: Archive binary
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: release-binary-macos
|
|
path: target.tar.gz
|
|
|
|
# mac-wpt:
|
|
# name: Mac WPT Tests
|
|
# runs-on: macos-12
|
|
# needs: ["build-mac"]
|
|
# env:
|
|
# max_chunk_id: 20
|
|
# strategy:
|
|
# fail-fast: false
|
|
# matrix:
|
|
# chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
|
# steps:
|
|
# - uses: actions/checkout@v3
|
|
# with:
|
|
# fetch-depth: 2
|
|
# - uses: actions/download-artifact@v3
|
|
# with:
|
|
# name: release-binary-macos
|
|
# # TODO: Remove this step when the compatibility issue between mozjs and
|
|
# # Homebrew's Python 3.10 formula (servo/rust-mozjs#559) is fixed
|
|
# - name: Select Python 3.9
|
|
# run: |
|
|
# brew install python@3.9
|
|
# cd $(dirname $(which python3.9))
|
|
# rm -f python3 pip3
|
|
# ln -s python3.9 python3
|
|
# ln -s pip3.9 pip3
|
|
# - name: Prep test environment
|
|
# run: |
|
|
# gtar -xzf target.tar.gz
|
|
# python3 -m pip install --upgrade pip virtualenv
|
|
# brew bundle install --verbose --no-upgrade --file=etc/taskcluster/macos/Brewfile
|
|
# - name: Smoketest
|
|
# run: python3 ./mach smoketest
|
|
# - name: Run tests
|
|
# run: |
|
|
# python3 ./mach test-wpt \
|
|
# --release --processes $(sysctl -n hw.logicalcpu) --timeout-multiplier 8 \
|
|
# --total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
|
# --log-raw test-wpt.${{ matrix.chunk_id }}.log \
|
|
# --log-servojson wpt-jsonsummary.${{ matrix.chunk_id }}.log \
|
|
# --always-succeed
|
|
# python3 ./mach filter-intermittents wpt-jsonsummary.${{ matrix.chunk_id }}.log \
|
|
# --log-intermittents=intermittents.${{ matrix.chunk_id }}.log \
|
|
# --log-filteredsummary=filtered-wpt-summary.${{ matrix.chunk_id }}.log \
|
|
# --tracker-api=default --reporter-api=default
|
|
|
|
# - name: Archive logs
|
|
# uses: actions/upload-artifact@v3
|
|
# if: ${{ failure() }}
|
|
# with:
|
|
# name: wpt${{ matrix.chunk_id }}-logs-macos
|
|
# path: |
|
|
# test-wpt.${{ matrix.chunk_id }}.log
|
|
# wpt-jsonsummary.${{ matrix.chunk_id }}.log
|
|
# filtered-wpt-summary.${{ matrix.chunk_id }}.log
|
|
# intermittents.${{ matrix.chunk_id }}.log
|
|
|
|
build-linux:
|
|
name: Build (Linux)
|
|
runs-on: ubuntu-20.04
|
|
needs: ["decision"]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 2
|
|
- name: Bootstrap Python
|
|
run: python3 -m pip install --upgrade pip virtualenv
|
|
- name: Bootstrap dependencies
|
|
run: sudo apt update && python3 ./mach bootstrap
|
|
- name: Release build
|
|
run: python3 ./mach build --release
|
|
- name: Lockfile check
|
|
run: ./etc/ci/lockfile_changed.sh
|
|
- name: Forbidden panic check
|
|
run: ./etc/ci/check_no_panic.sh
|
|
- name: Package binary
|
|
run: tar -czf target.tar.gz target/release/servo resources
|
|
- name: Archive binary
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: release-binary
|
|
path: target.tar.gz
|
|
|
|
linux-wpt:
|
|
name: Linux WPT Tests
|
|
runs-on: ubuntu-20.04
|
|
needs: ["build-linux"]
|
|
env:
|
|
max_chunk_id: 20
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
chunk_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 2
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: release-binary
|
|
path: release-binary
|
|
- name: unPackage binary
|
|
run: tar -xzf release-binary/target.tar.gz
|
|
- name: Prep test environment
|
|
run: |
|
|
python3 -m pip install --upgrade pip virtualenv
|
|
sudo apt update
|
|
sudo apt install -qy --no-install-recommends libgl1 libssl1.1 libdbus-1-3 libxcb-xfixes0-dev libxcb-shape0-dev libunwind8 libegl1-mesa
|
|
wget http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
|
|
sudo apt install ./libffi6_3.2.1-8_amd64.deb
|
|
python3 ./mach bootstrap-gstreamer
|
|
- name: Run tests
|
|
run: |
|
|
python3 ./mach test-wpt \
|
|
--release --processes $(nproc) --timeout-multiplier 2 \
|
|
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
|
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
|
|
--log-servojson wpt-jsonsummary.${{ matrix.chunk_id }}.log \
|
|
--always-succeed
|
|
python3 ./mach filter-intermittents wpt-jsonsummary.${{ matrix.chunk_id }}.log \
|
|
--log-intermittents=intermittents.${{ matrix.chunk_id }}.log \
|
|
--log-filteredsummary=filtered-wpt-summary.${{ matrix.chunk_id }}.log \
|
|
--tracker-api=default --reporter-api=default
|
|
- name: Archive logs
|
|
uses: actions/upload-artifact@v3
|
|
if: ${{ failure() }}
|
|
with:
|
|
name: wpt${{ matrix.chunk_id }}-logs-linux
|
|
path: |
|
|
test-wpt.${{ matrix.chunk_id }}.log
|
|
wpt-jsonsummary.${{ matrix.chunk_id }}.log
|
|
filtered-wpt-summary.${{ matrix.chunk_id }}.log
|
|
intermittents.${{ matrix.chunk_id }}.log
|
|
|
|
build_result:
|
|
name: homu build finished
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- "build-win"
|
|
- "build-uwp-x64"
|
|
- "build-linux"
|
|
- "build-mac"
|
|
- "linux-wpt"
|
|
# - "mac-wpt"
|
|
|
|
steps:
|
|
- name: Mark the job as successful
|
|
run: exit 0
|
|
if: success()
|
|
- name: Mark the job as unsuccessful
|
|
run: exit 1
|
|
if: "!success()"
|