mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Enable debug assertions for all builds other than official releases (#30509)
* Run main and try jobs with debug assertions * use single quotes in workflow expressions * set force-debug-assertions in main.yml * set force-debug-assertions as part of decision job * fix typo in MachCommands.build * fix more hardcoded profile names * fix tidy * split cargo_profile_option on windows * Fix running servoshell and unit tests through a symlink * rename steps to make them less confusing * fix more hardcoded cargo profile options * fix missing inputs in linux-wpt and mac-wpt * make filename an inherent method of Resource * rework release-with-debug-assertions profile to production profile * rework resource logic to eliminate std_test_override * set production flag in nightly release builds * clean up servobuild.example and windows.yml * oops forgot to check in embedder_traits/build.rs * fix mach test-unit behaviour through symlink * unit tests only need current_dir and ancestors * fix macOS package smoketest breakage * expect css/css-color/currentcolor-003 to crash under layout 2013 * fix more references to {force,release-with}-debug-assertions * fix local build failures under --profile production
This commit is contained in:
parent
88234309b0
commit
a3d2f0c586
31 changed files with 342 additions and 188 deletions
8
.github/workflows/linux-wpt.yml
vendored
8
.github/workflows/linux-wpt.yml
vendored
|
@ -2,6 +2,9 @@ name: Linux WPT Tests
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
production:
|
||||
required: false
|
||||
type: boolean
|
||||
wpt:
|
||||
required: false
|
||||
type: string
|
||||
|
@ -10,6 +13,7 @@ on:
|
|||
type: string
|
||||
|
||||
env:
|
||||
cargo_profile_option: ${{ inputs.production && '--profile production' || '--release' }}
|
||||
RUST_BACKTRACE: 1
|
||||
SHELL: /bin/bash
|
||||
WPT_COMMAND_LINE_ARG: "${{ inputs.layout == 'layout-2013' && '--legacy-layout' || '' }}"
|
||||
|
@ -67,7 +71,7 @@ jobs:
|
|||
if: ${{ inputs.wpt != 'sync' }}
|
||||
run: |
|
||||
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG \
|
||||
--release --processes $(nproc) --timeout-multiplier 2 \
|
||||
${cargo_profile_option} --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 \
|
||||
|
@ -79,7 +83,7 @@ jobs:
|
|||
if: ${{ inputs.wpt == 'sync' }}
|
||||
run: |
|
||||
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG \
|
||||
--release --processes $(nproc) --timeout-multiplier 2 \
|
||||
${cargo_profile_option} --processes $(nproc) --timeout-multiplier 2 \
|
||||
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
||||
--log-raw test-wpt.${{ matrix.chunk_id }}.log \
|
||||
--always-succeed
|
||||
|
|
34
.github/workflows/linux.yml
vendored
34
.github/workflows/linux.yml
vendored
|
@ -2,6 +2,9 @@ name: Linux
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
production:
|
||||
required: false
|
||||
type: boolean
|
||||
wpt:
|
||||
required: false
|
||||
type: string
|
||||
|
@ -21,6 +24,9 @@ on:
|
|||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
production:
|
||||
required: false
|
||||
type: boolean
|
||||
wpt:
|
||||
default: "test"
|
||||
required: false
|
||||
|
@ -42,6 +48,8 @@ on:
|
|||
branches: ["try-linux", "try-wpt", "try-wpt-2020"]
|
||||
|
||||
env:
|
||||
cargo_profile_option: ${{ inputs.production && '--profile production' || '--release' }}
|
||||
cargo_profile_name: ${{ inputs.production && 'production' || 'release' }}
|
||||
RUST_BACKTRACE: 1
|
||||
SHELL: /bin/bash
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
|
@ -82,15 +90,15 @@ jobs:
|
|||
run: sudo apt update && python3 ./mach bootstrap
|
||||
- name: Tidy
|
||||
run: python3 ./mach test-tidy --no-progress --all
|
||||
- name: Release build
|
||||
run: python3 ./mach build --release
|
||||
- name: Release build (${{ inputs.production && 'without' || 'with' }} debug assertions)
|
||||
run: python3 ./mach build ${cargo_profile_option}
|
||||
- name: Smoketest
|
||||
run: xvfb-run python3 ./mach smoketest --release
|
||||
run: xvfb-run python3 ./mach smoketest ${cargo_profile_option}
|
||||
- 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
|
||||
run: python3 ./mach test-unit ${cargo_profile_option}
|
||||
- name: Rename build timing
|
||||
run: cp -r target/cargo-timings target/cargo-timings-linux
|
||||
- name: Archive build timing
|
||||
|
@ -101,14 +109,14 @@ jobs:
|
|||
path: target/cargo-timings-*
|
||||
- name: Lockfile check
|
||||
run: ./etc/ci/lockfile_changed.sh
|
||||
- name: Package
|
||||
run: python3 ./mach package --release
|
||||
- name: Upload Package
|
||||
- name: Build mach package
|
||||
run: python3 ./mach package ${cargo_profile_option}
|
||||
- name: Upload artifact for mach package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux
|
||||
path: target/release/servo-tech-demo.tar.gz
|
||||
- name: Upload
|
||||
path: target/${cargo_profile_name}/servo-tech-demo.tar.gz
|
||||
- name: Upload nightly
|
||||
if: ${{ inputs.upload }}
|
||||
run: |
|
||||
python3 ./mach upload-nightly linux \
|
||||
|
@ -118,9 +126,9 @@ jobs:
|
|||
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
|
||||
NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
|
||||
NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds
|
||||
- name: Package binary
|
||||
run: tar -czf target.tar.gz target/release/servo resources
|
||||
- name: Archive binary
|
||||
- name: Build package for target
|
||||
run: tar -czf target.tar.gz target/${cargo_profile_name}/servo resources
|
||||
- name: Upload artifact for target
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release-binary
|
||||
|
@ -132,6 +140,7 @@ jobs:
|
|||
needs: ["build"]
|
||||
uses: ./.github/workflows/linux-wpt.yml
|
||||
with:
|
||||
production: ${{ inputs.production }}
|
||||
wpt: ${{ inputs.wpt }}
|
||||
layout: "layout-2020"
|
||||
|
||||
|
@ -141,6 +150,7 @@ jobs:
|
|||
needs: ["build"]
|
||||
uses: ./.github/workflows/linux-wpt.yml
|
||||
with:
|
||||
production: ${{ inputs.production }}
|
||||
wpt: ${{ inputs.wpt }}
|
||||
layout: "layout-2013"
|
||||
|
||||
|
|
8
.github/workflows/mac-wpt.yml
vendored
8
.github/workflows/mac-wpt.yml
vendored
|
@ -3,11 +3,15 @@ name: Mac WPT Tests
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
production:
|
||||
required: false
|
||||
type: boolean
|
||||
layout:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
cargo_profile_option: ${{ inputs.production && '--profile production' || '--release' }}
|
||||
RUST_BACKTRACE: 1
|
||||
SHELL: /bin/bash
|
||||
WPT_COMMAND_LINE_ARG: "${{ inputs.layout == 'layout-2013' && '--legacy-layout' || '' }}"
|
||||
|
@ -43,11 +47,11 @@ jobs:
|
|||
python3 -m pip install --upgrade pip virtualenv
|
||||
python3 ./mach bootstrap
|
||||
- name: Smoketest
|
||||
run: python3 ./mach smoketest --release
|
||||
run: python3 ./mach smoketest ${cargo_profile_option}
|
||||
- name: Run tests
|
||||
run: |
|
||||
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG \
|
||||
--release --processes $(sysctl -n hw.logicalcpu) --timeout-multiplier 8 \
|
||||
${cargo_profile_option} --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-raw-unexpected unexpected-test-wpt.${{ matrix.chunk_id }}.log \
|
||||
|
|
38
.github/workflows/mac.yml
vendored
38
.github/workflows/mac.yml
vendored
|
@ -3,6 +3,9 @@ name: Mac
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
production:
|
||||
required: false
|
||||
type: boolean
|
||||
wpt-layout:
|
||||
required: false
|
||||
type: string
|
||||
|
@ -19,6 +22,9 @@ on:
|
|||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
production:
|
||||
required: false
|
||||
type: boolean
|
||||
wpt-layout:
|
||||
required: false
|
||||
type: choice
|
||||
|
@ -35,6 +41,8 @@ on:
|
|||
branches: ["try-mac", "try-wpt-mac", "try-wpt-mac-2020"]
|
||||
|
||||
env:
|
||||
cargo_profile_option: ${{ inputs.production && '--profile production' || '--release' }}
|
||||
cargo_profile_name: ${{ inputs.production && 'production' || 'release' }}
|
||||
RUST_BACKTRACE: 1
|
||||
SHELL: /bin/bash
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
|
@ -70,21 +78,21 @@ jobs:
|
|||
python3 -m pip install --upgrade pip virtualenv
|
||||
python3 ./mach bootstrap
|
||||
brew install gnu-tar
|
||||
- name: Release build
|
||||
- name: Release build (${{ inputs.production && 'without' || 'with' }} debug assertions)
|
||||
run: |
|
||||
python3 ./mach build --release
|
||||
python3 ./mach build ${cargo_profile_option}
|
||||
- name: Smoketest
|
||||
run: python3 ./mach smoketest --release
|
||||
run: python3 ./mach smoketest ${cargo_profile_option}
|
||||
- name: Script tests
|
||||
run: ./mach test-scripts
|
||||
- name: Unit tests
|
||||
if: ${{ inputs.unit-tests || github.ref_name == 'try-mac' }}
|
||||
timeout-minutes: 30 # https://github.com/servo/servo/issues/30275
|
||||
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
|
||||
run: python3 ./mach test-unit ${cargo_profile_option}
|
||||
- name: Build mach package
|
||||
run: python3 ./mach package ${cargo_profile_option}
|
||||
- name: Run smoketest for mach package
|
||||
run: ./etc/ci/macos_package_smoketest.sh target/${cargo_profile_name}/servo-tech-demo.dmg
|
||||
- name: Rename build timing
|
||||
run: cp -r target/cargo-timings target/cargo-timings-macos
|
||||
- name: Archive build timing
|
||||
|
@ -93,12 +101,12 @@ jobs:
|
|||
name: cargo-timings
|
||||
# Using a wildcard here ensures that the archive includes the path.
|
||||
path: target/cargo-timings-*
|
||||
- name: Upload package
|
||||
- name: Upload artifact for mach package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mac
|
||||
path: target/release/servo-tech-demo.dmg
|
||||
- name: Upload
|
||||
path: target/${cargo_profile_name}/servo-tech-demo.dmg
|
||||
- name: Upload nightly
|
||||
if: ${{ inputs.upload }}
|
||||
run: |
|
||||
python3 ./mach upload-nightly mac --secret-from-environment \
|
||||
|
@ -108,9 +116,9 @@ jobs:
|
|||
GITHUB_HOMEBREW_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
|
||||
NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
|
||||
NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds
|
||||
- name: Package binary
|
||||
run: gtar -czf target.tar.gz target/release/servo target/release/*.dylib target/release/lib/*.dylib resources
|
||||
- name: Archive binary
|
||||
- name: Build package for target
|
||||
run: gtar -czf target.tar.gz target/${cargo_profile_name}/servo target/${cargo_profile_name}/*.dylib target/${cargo_profile_name}/lib/*.dylib resources
|
||||
- name: Upload package for target
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: release-binary-macos
|
||||
|
@ -122,6 +130,7 @@ jobs:
|
|||
needs: ["build"]
|
||||
uses: ./.github/workflows/mac-wpt.yml
|
||||
with:
|
||||
production: ${{ inputs.production }}
|
||||
layout: "layout-2020"
|
||||
|
||||
wpt-2013:
|
||||
|
@ -130,6 +139,7 @@ jobs:
|
|||
needs: ["build"]
|
||||
uses: ./.github/workflows/mac-wpt.yml
|
||||
with:
|
||||
production: ${{ inputs.production }}
|
||||
layout: "layout-2013"
|
||||
|
||||
result:
|
||||
|
|
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
@ -71,6 +71,7 @@ jobs:
|
|||
}
|
||||
|
||||
let returnValue = {
|
||||
production: false,
|
||||
platforms,
|
||||
layout,
|
||||
unit_tests,
|
||||
|
@ -85,6 +86,7 @@ jobs:
|
|||
if: ${{ contains(fromJson(needs.decision.outputs.configuration).platforms, 'windows') }}
|
||||
uses: ./.github/workflows/windows.yml
|
||||
with:
|
||||
production: ${{ fromJson(needs.decision.outputs.configuration).production }}
|
||||
unit-tests: ${{ fromJson(needs.decision.outputs.configuration).unit_tests }}
|
||||
|
||||
build-mac:
|
||||
|
@ -93,6 +95,7 @@ jobs:
|
|||
if: ${{ contains(fromJson(needs.decision.outputs.configuration).platforms, 'macos') }}
|
||||
uses: ./.github/workflows/mac.yml
|
||||
with:
|
||||
production: ${{ fromJson(needs.decision.outputs.configuration).production }}
|
||||
unit-tests: ${{ fromJson(needs.decision.outputs.configuration).unit_tests }}
|
||||
|
||||
build-linux:
|
||||
|
@ -101,6 +104,7 @@ jobs:
|
|||
if: ${{ contains(fromJson(needs.decision.outputs.configuration).platforms, 'linux') }}
|
||||
uses: ./.github/workflows/linux.yml
|
||||
with:
|
||||
production: ${{ fromJson(needs.decision.outputs.configuration).production }}
|
||||
wpt: 'test'
|
||||
layout: ${{ fromJson(needs.decision.outputs.configuration).layout }}
|
||||
unit-tests: ${{ fromJson(needs.decision.outputs.configuration).unit_tests }}
|
||||
|
|
5
.github/workflows/nightly.yml
vendored
5
.github/workflows/nightly.yml
vendored
|
@ -70,6 +70,7 @@ jobs:
|
|||
- create-draft-release
|
||||
uses: ./.github/workflows/windows.yml
|
||||
with:
|
||||
production: true
|
||||
upload: true
|
||||
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
|
||||
secrets: inherit
|
||||
|
@ -82,6 +83,7 @@ jobs:
|
|||
- create-draft-release
|
||||
uses: ./.github/workflows/mac.yml
|
||||
with:
|
||||
production: true
|
||||
upload: true
|
||||
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
|
||||
secrets: inherit
|
||||
|
@ -94,6 +96,7 @@ jobs:
|
|||
- create-draft-release
|
||||
uses: ./.github/workflows/linux.yml
|
||||
with:
|
||||
production: true
|
||||
upload: true
|
||||
github-release-id: ${{ needs.create-draft-release.outputs.release-id }}
|
||||
secrets: inherit
|
||||
secrets: inherit
|
||||
|
|
30
.github/workflows/windows.yml
vendored
30
.github/workflows/windows.yml
vendored
|
@ -3,6 +3,9 @@ name: Windows
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
production:
|
||||
required: false
|
||||
type: boolean
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -16,6 +19,9 @@ on:
|
|||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
production:
|
||||
required: false
|
||||
type: boolean
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -28,6 +34,8 @@ on:
|
|||
branches: ["try-windows"]
|
||||
|
||||
env:
|
||||
cargo_profile_option: ${{ inputs.production && '--profile production' || '--release' }}
|
||||
cargo_profile_name: ${{ inputs.production && 'production' || 'release' }}
|
||||
RUST_BACKTRACE: 1
|
||||
SHELL: /bin/bash
|
||||
CCACHE: "ccache"
|
||||
|
@ -69,15 +77,15 @@ jobs:
|
|||
python -m pip install --upgrade pip virtualenv
|
||||
python mach fetch
|
||||
python mach bootstrap-gstreamer
|
||||
- name: Release build
|
||||
run: python mach build --release
|
||||
- name: Release build (${{ inputs.production && 'without' || 'with' }} debug assertions)
|
||||
run: python mach build ($env:cargo_profile_option -split ' ')
|
||||
- name: Copy resources
|
||||
run: cp D:\a\servo\servo\resources C:\a\servo\servo -Recurse
|
||||
- name: Smoketest
|
||||
run: python mach smoketest --angle --release
|
||||
run: python mach smoketest --angle ($env:cargo_profile_option -split ' ')
|
||||
- name: Unit tests
|
||||
if: ${{ inputs.unit-tests || github.ref_name == 'try-windows' }}
|
||||
run: python mach test-unit --release
|
||||
run: python mach test-unit ($env:cargo_profile_option -split ' ')
|
||||
- name: Rename build timing
|
||||
run: cp C:\a\servo\servo\target\cargo-timings C:\a\servo\servo\target\cargo-timings-windows -Recurse
|
||||
- name: Archive build timing
|
||||
|
@ -86,17 +94,17 @@ jobs:
|
|||
name: cargo-timings
|
||||
# Using a wildcard here ensures that the archive includes the path.
|
||||
path: C:\\a\\servo\\servo\\target\\cargo-timings-*
|
||||
- name: Package
|
||||
run: python mach package --release
|
||||
- name: Upload package
|
||||
- name: Build mach package
|
||||
run: python mach package ($env:cargo_profile_option -split ' ')
|
||||
- name: Upload artifact for mach package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
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
|
||||
# Zip: C:\a\servo\servo\target\release\msi\Servo.zip
|
||||
path: C:\\a\\servo\\servo\\target/release/msi/Servo.exe
|
||||
# MSI Installer: C:\a\servo\servo\target\$env:cargo_profile_name\msi\Installer.msi
|
||||
# Bundle: C:\a\servo\servo\target\$env:cargo_profile_name\msi\Servo.exe
|
||||
# Zip: C:\a\servo\servo\target\$env:cargo_profile_name\msi\Servo.zip
|
||||
path: C:\\a\\servo\\servo\\target\\$env:cargo_profile_name\\msi\\Servo.exe
|
||||
- name: Upload nightly
|
||||
if: ${{ inputs.upload }}
|
||||
run: |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue