Make the choice of layout runtime setting

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Martin Robinson 2023-06-28 10:07:08 +02:00
parent f11c6045e3
commit d31cdb682f
No known key found for this signature in database
GPG key ID: D56AA4FA55EFE6F8
262 changed files with 1740 additions and 3700 deletions

View file

@ -2,9 +2,6 @@ name: Linux workflow
on:
workflow_call:
inputs:
layout:
required: true
type: string
wpt:
required: false
type: string
@ -21,10 +18,6 @@ on:
type: string
workflow_dispatch:
inputs:
layout:
required: true
type: choice
options: ["2013", "2020"]
wpt:
default: "test"
required: false
@ -44,8 +37,6 @@ on:
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
LAYOUT: "${{ (contains(inputs.layout, '2020') || github.ref_name == 'try-wpt-2020') && 'layout-2020' || 'layout-2013' }}"
PACKAGE: "${{ (contains(inputs.layout, '2020') || github.ref_name == 'try-wpt-2020') && 'linux-layout2020' || 'linux' }}"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CCACHE: "sccache"
@ -72,22 +63,22 @@ jobs:
- name: Tidy
run: python3 ./mach test-tidy --no-progress --all
- name: Release build
run: python3 ./mach build --release --with-${{ env.LAYOUT }}
run: python3 ./mach build --release
- name: Smoketest
run: xvfb-run python3 ./mach smoketest
- name: Script tests
run: ./mach test-scripts
- name: Unit tests
if: ${{ inputs.unit-tests || github.ref_name == 'try-linux' }}
run: python3 ./mach test-unit --release --with-${{ env.LAYOUT }}
run: python3 ./mach test-unit --release
- name: Rename build timing
run: cp -r target/cargo-timings target/cargo-timings-linux-${{ env.LAYOUT }}
run: cp -r target/cargo-timings target/cargo-timings-linux
- name: Archive build timing
uses: actions/upload-artifact@v3
with:
name: cargo-timings
# Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*-${{ env.LAYOUT }}
path: target/cargo-timings-*
- name: Lockfile check
run: ./etc/ci/lockfile_changed.sh
- name: Package
@ -95,12 +86,12 @@ jobs:
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE }}
name: linux
path: target/release/servo-tech-demo.tar.gz
- name: Upload
if: ${{ inputs.upload }}
run: |
python3 ./mach upload-nightly ${{ env.PACKAGE }} \
python3 ./mach upload-nightly linux \
--secret-from-environment \
--github-release-id ${{ inputs.github-release-id }}
env:
@ -112,7 +103,7 @@ jobs:
- name: Archive binary
uses: actions/upload-artifact@v3
with:
name: ${{ env.LAYOUT }}-release-binary
name: release-binary
path: target.tar.gz
linux-wpt:
@ -125,6 +116,7 @@ jobs:
strategy:
fail-fast: false
matrix:
layout: ["layout-2020", "layout-2013"]
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
@ -132,7 +124,7 @@ jobs:
fetch-depth: 2
- uses: actions/download-artifact@v3
with:
name: ${{ env.LAYOUT }}-release-binary
name: release-binary
path: release-binary
- name: unPackage binary
run: tar -xzf release-binary/target.tar.gz
@ -151,45 +143,43 @@ jobs:
- name: Run tests
if: ${{ inputs.wpt != 'sync' }}
run: |
python3 ./mach test-wpt --with-${{ env.LAYOUT }} \
python3 ./mach test-wpt --with-${{ matrix.layout }} \
--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-raw-unexpected unexpected-test-wpt.${{ matrix.chunk_id }}.log \
--filter-intermittents filtered-test-wpt.${{ matrix.chunk_id }}.json
--log-raw test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log \
--log-raw-unexpected unexpected-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log \
--filter-intermittents filtered-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.json
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
INTERMITTENT_TRACKER_DASHBOARD_SECRET: ${{ secrets.INTERMITTENT_TRACKER_DASHBOARD_SECRET }}
- name: Run tests (sync)
if: ${{ inputs.wpt == 'sync' }}
run: |
python3 ./mach test-wpt --with-${{ env.LAYOUT }} \
python3 ./mach test-wpt --with-${{ matrix.layout }} \
--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
- name: Archive filtered results
uses: actions/upload-artifact@v3
if: ${{ always() && inputs.wpt != 'sync' }}
with:
name: wpt-filtered-results-linux-${{ env.LAYOUT }}
name: wpt-filtered-results-linux
path: |
filtered-test-wpt.${{ matrix.chunk_id }}.json
unexpected-test-wpt.${{ matrix.chunk_id }}.log
filtered-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.json
unexpected-test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log
- name: Archive logs
uses: actions/upload-artifact@v3
if: ${{ failure() && inputs.wpt != 'sync' }}
with:
name: wpt-logs-linux-${{ env.LAYOUT }}
name: wpt-logs-linux
path: |
test-wpt.${{ matrix.chunk_id }}.log
filtered-wpt-results.${{ matrix.chunk_id }}.json
test-wpt-${{ matrix.layout }}.${{ matrix.chunk_id }}.log
- name: Archive logs
uses: actions/upload-artifact@v3
if: ${{ inputs.wpt == 'sync' }}
with:
name: wpt-logs-linux-${{ env.LAYOUT }}
name: wpt-logs-linux-${{ matrix.layout }}
path: |
test-wpt.${{ matrix.chunk_id }}.log
wpt-jsonsummary.${{ matrix.chunk_id }}.log
@ -206,18 +196,23 @@ jobs:
fetch-depth: 2
- uses: actions/download-artifact@v3
with:
name: wpt-filtered-results-linux-${{ env.LAYOUT }}
name: wpt-filtered-results-linux
path: wpt-filtered-results-linux
- name: Create aggregated unexpected results
run: cat wpt-filtered-results-linux/*.log > unexpected-test-wpt.log
run: |
cat wpt-filtered-results-linux/*-layout-2020.*.log > unexpected-test-wpt-layout-2020.log
cat wpt-filtered-results-linux/*-layout-2013.*.log > unexpected-test-wpt-layout-2013.log
- name: Archive aggregate results
uses: actions/upload-artifact@v3
with:
name: wpt-filtered-results-linux-${{ env.LAYOUT }}
name: wpt-filtered-results-linux
path: |
unexpected-test-wpt.log
unexpected-test-wpt-layout-2020.log
unexpected-test-wpt-layout-2013.log
- name: Comment on PR with results
run: etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-${{ env.LAYOUT }}" wpt-filtered-results-linux/*.json
run: |
etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-2020" wpt-filtered-results-linux/*-layout-2020.*.json
etc/ci/report_aggregated_expected_results.py --tag="linux-wpt-2013" wpt-filtered-results-linux/*-layout-2013.*.json
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -3,9 +3,6 @@ name: Mac workflow
on:
workflow_call:
inputs:
layout:
required: true
type: string
unit-tests:
required: false
default: false
@ -19,10 +16,6 @@ on:
type: string
workflow_dispatch:
inputs:
layout:
required: true
type: choice
options: ["2013", "2020"]
unit-tests:
required: false
default: false
@ -37,8 +30,6 @@ on:
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}"
PACKAGE: "${{ contains(inputs.layout, '2020') && 'mac-layout2020' || 'mac' }}"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CCACHE: "sccache"
@ -60,35 +51,35 @@ jobs:
python3 ./mach bootstrap
- name: Release build
run: |
python3 ./mach build --release --with-${{ env.LAYOUT }}
python3 ./mach build --release
- name: Smoketest
run: python3 ./mach smoketest
- name: Script tests
run: ./mach test-scripts
- name: Unit tests
if: ${{ inputs.unit-tests || github.ref_name == 'try-mac' }}
run: python3 ./mach test-unit --release --with-${{ env.LAYOUT }}
run: python3 ./mach test-unit --release
- name: Package
run: python3 ./mach package --release
- name: Package smoketest
run: ./etc/ci/macos_package_smoketest.sh target/release/servo-tech-demo.dmg
- name: Rename build timing
run: cp -r target/cargo-timings target/cargo-timings-macos-${{ env.LAYOUT }}
run: cp -r target/cargo-timings target/cargo-timings-macos
- name: Archive build timing
uses: actions/upload-artifact@v3
with:
name: cargo-timings
# Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*-${{ env.LAYOUT }}
path: target/cargo-timings-*
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE }}
name: mac
path: target/release/servo-tech-demo.dmg
- name: Upload
if: ${{ inputs.upload }}
run: |
python3 ./mach upload-nightly ${{ env.PACKAGE }} --secret-from-environment \
python3 ./mach upload-nightly mac --secret-from-environment \
--github-release-id ${{ inputs.github-release-id }}
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
@ -100,7 +91,7 @@ jobs:
- name: Archive binary
uses: actions/upload-artifact@v3
with:
name: release-${{ env.LAYOUT }}-binary-macos
name: release-binary-macos
path: target.tar.gz
# mac-wpt:

View file

@ -38,7 +38,6 @@ jobs:
needs: ["decision"]
uses: ./.github/workflows/windows.yml
with:
layout: '2013'
unit-tests: true
build-mac:
@ -46,7 +45,6 @@ jobs:
needs: ["decision"]
uses: ./.github/workflows/mac.yml
with:
layout: '2013'
unit-tests: true
build-linux:
@ -54,16 +52,6 @@ jobs:
needs: ["decision"]
uses: ./.github/workflows/linux.yml
with:
layout: '2013'
wpt: 'test'
unit-tests: true
build-linux-layout-2020:
name: Linux (layout-2020)
needs: ["decision"]
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
wpt: 'test'
unit-tests: true
@ -77,7 +65,6 @@ jobs:
- "build-win"
- "build-mac"
- "build-linux"
- "build-linux-layout-2020"
steps:
- name: Mark the job as successful

View file

@ -59,11 +59,8 @@ jobs:
needs:
- create-draft-release
- upload-linux
- upload-linux-2013
- upload-win
- upload-win-2013
- upload-mac
- upload-mac-2013
upload-win:
# This job is only useful when run on upstream servo.
@ -73,20 +70,6 @@ jobs:
- create-draft-release
uses: ./.github/workflows/windows.yml
with:
layout: '2020'
upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit
upload-win-2013:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (Windows layout-2013)
needs:
- create-draft-release
uses: ./.github/workflows/windows.yml
with:
layout: '2013'
upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit
@ -99,20 +82,6 @@ jobs:
- create-draft-release
uses: ./.github/workflows/mac.yml
with:
layout: '2020'
upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit
upload-mac-2013:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (macOS layout-2013)
needs:
- create-draft-release
uses: ./.github/workflows/mac.yml
with:
layout: '2013'
upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit
@ -125,20 +94,6 @@ jobs:
- create-draft-release
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit
upload-linux-2013:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (Linux layout-2013)
needs:
- create-draft-release
uses: ./.github/workflows/linux.yml
with:
layout: '2013'
upload: true
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
secrets: inherit
secrets: inherit

View file

@ -11,13 +11,4 @@ jobs:
if: github.repository == 'servo/servo'
uses: ./.github/workflows/linux.yml
with:
layout: '2013'
unit-tests: true
build-linux-layout-2020:
name: Linux (layout-2020)
if: github.repository == 'servo/servo'
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
unit-tests: false
unit-tests: true

View file

@ -13,14 +13,4 @@ jobs:
if: github.repository != 'servo/servo' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/linux.yml
with:
layout: '2013'
unit-tests: true
build-linux-layout-2020:
name: Linux (layout-2020)
if: github.repository != 'servo/servo' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
# TODO: unit tests on layout-2020
unit-tests: false
unit-tests: true

View file

@ -15,17 +15,6 @@ jobs:
name: Linux
uses: ./.github/workflows/linux.yml
with:
layout: '2013'
wpt: 'sync'
unit-tests: false
linux-layout-2020:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Linux (layout-2020)
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
wpt: 'sync'
unit-tests: false
@ -36,7 +25,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- "linux"
- "linux-layout-2020"
steps:
- name: Checkout code
uses: actions/checkout@v3

View file

@ -3,9 +3,6 @@ name: Windows workflow
on:
workflow_call:
inputs:
layout:
required: true
type: string
unit-tests:
required: false
default: false
@ -19,10 +16,6 @@ on:
type: string
workflow_dispatch:
inputs:
layout:
required: true
type: choice
options: ["2013", "2020"]
unit-tests:
required: false
default: false
@ -37,8 +30,6 @@ on:
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}"
PACKAGE: "${{ contains(inputs.layout, '2020') && 'windows-msvc-layout2020' || 'windows-msvc' }}"
CCACHE: "ccache"
CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target
@ -64,28 +55,28 @@ jobs:
python mach fetch
python mach bootstrap-gstreamer
- name: Release build
run: python mach build --release --with-${{ env.LAYOUT }}
run: python mach build --release
- name: Copy resources
run: cp D:\a\servo\servo\resources C:\a\servo\servo -Recurse
- name: Smoketest
run: python mach smoketest --angle
- name: Unit tests
if: ${{ inputs.unit-tests || github.ref_name == 'try-windows' }}
run: python mach test-unit --release --with-${{ env.LAYOUT }}
run: python mach test-unit --release
- name: Rename build timing
run: cp C:\a\servo\servo\target\cargo-timings C:\a\servo\servo\target\cargo-timings-windows-${{ env.LAYOUT }} -Recurse
run: cp C:\a\servo\servo\target\cargo-timings C:\a\servo\servo\target\cargo-timings-windows -Recurse
- name: Archive build timing
uses: actions/upload-artifact@v3
with:
name: cargo-timings
# Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*-${{ env.LAYOUT }}
path: target/cargo-timings-*
- name: Package
run: python mach package --release
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE }}
name: win
# These files are available
# MSI Installer: C:\a\servo\servo\target\release\msi\Installer.msi
# Bundle: C:\a\servo\servo\target\release\msi\Servo.exe
@ -94,7 +85,7 @@ jobs:
- name: Upload
if: ${{ inputs.upload }}
run: |
python mach upload-nightly ${{ env.PACKAGE }} --secret-from-environment `
python mach upload-nightly win --secret-from-environment `
--github-release-id ${{ inputs.github-release-id }}
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}