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:
Delan Azabani 2023-10-26 16:22:14 +08:00 committed by GitHub
parent 88234309b0
commit a3d2f0c586
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 342 additions and 188 deletions

View file

@ -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: |