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

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