mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Add --production
option to mach (#30707)
* --prod(uction) mach argument * Use profile in workflows instead of production * Use profiles in unit tests * ups * Build (${{ inputs.profile }})
This commit is contained in:
parent
c78b98252a
commit
96d37d3785
9 changed files with 90 additions and 71 deletions
33
.github/workflows/linux.yml
vendored
33
.github/workflows/linux.yml
vendored
|
@ -2,10 +2,10 @@ name: Linux
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
production:
|
||||
profile:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
default: "release"
|
||||
type: string
|
||||
wpt:
|
||||
required: false
|
||||
type: string
|
||||
|
@ -25,10 +25,11 @@ on:
|
|||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
production:
|
||||
profile:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
default: "release"
|
||||
type: choice
|
||||
options: ["release", "debug", "production"]
|
||||
wpt:
|
||||
default: "test"
|
||||
required: false
|
||||
|
@ -50,8 +51,6 @@ 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"
|
||||
|
@ -90,10 +89,10 @@ jobs:
|
|||
run: sudo apt update && python3 ./mach bootstrap
|
||||
- name: Tidy
|
||||
run: python3 ./mach test-tidy --no-progress --all
|
||||
- name: Release build (${{ inputs.production && 'without' || 'with' }} debug assertions)
|
||||
run: python3 ./mach build ${{ env.cargo_profile_option }}
|
||||
- name: Build (${{ inputs.profile }})
|
||||
run: python3 ./mach build --${{ inputs.profile }}
|
||||
- name: Smoketest
|
||||
run: xvfb-run python3 ./mach smoketest ${{ env.cargo_profile_option }}
|
||||
run: xvfb-run python3 ./mach smoketest --${{ inputs.profile }}
|
||||
- name: Script tests
|
||||
run: ./mach test-scripts
|
||||
- name: Unit tests
|
||||
|
@ -102,7 +101,7 @@ jobs:
|
|||
with:
|
||||
timeout_minutes: 20
|
||||
max_attempts: 2 # https://github.com/servo/servo/issues/30683
|
||||
command: python ./mach test-unit ${{ env.cargo_profile_option }}
|
||||
command: python ./mach test-unit --${{ inputs.profile }}
|
||||
- name: Rename build timing
|
||||
run: cp -r target/cargo-timings target/cargo-timings-linux
|
||||
- name: Archive build timing
|
||||
|
@ -114,12 +113,12 @@ jobs:
|
|||
- name: Lockfile check
|
||||
run: ./etc/ci/lockfile_changed.sh
|
||||
- name: Build mach package
|
||||
run: python3 ./mach package ${{ env.cargo_profile_option }}
|
||||
run: python3 ./mach package --${{ inputs.profile }}
|
||||
- name: Upload artifact for mach package
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux
|
||||
path: target/${{ env.cargo_profile_name }}/servo-tech-demo.tar.gz
|
||||
path: target/${{ inputs.profile }}/servo-tech-demo.tar.gz
|
||||
- name: Upload nightly
|
||||
if: ${{ inputs.upload }}
|
||||
run: |
|
||||
|
@ -131,7 +130,7 @@ jobs:
|
|||
NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
|
||||
NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds
|
||||
- name: Build package for target
|
||||
run: tar -czf target.tar.gz target/${{ env.cargo_profile_name }}/servo resources
|
||||
run: tar -czf target.tar.gz target/${{ inputs.profile }}/servo resources
|
||||
- name: Upload artifact for target
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
@ -144,7 +143,7 @@ jobs:
|
|||
needs: ["build"]
|
||||
uses: ./.github/workflows/linux-wpt.yml
|
||||
with:
|
||||
production: ${{ inputs.production == 'true' }}
|
||||
profile: ${{ inputs.profile }}
|
||||
wpt: ${{ inputs.wpt }}
|
||||
layout: "layout-2020"
|
||||
secrets: inherit
|
||||
|
@ -155,7 +154,7 @@ jobs:
|
|||
needs: ["build"]
|
||||
uses: ./.github/workflows/linux-wpt.yml
|
||||
with:
|
||||
production: ${{ inputs.production == 'true' }}
|
||||
profile: ${{ inputs.profile }}
|
||||
wpt: ${{ inputs.wpt }}
|
||||
layout: "layout-2013"
|
||||
secrets: inherit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue