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:
Samson 2023-11-10 11:38:33 +01:00 committed by GitHub
parent c78b98252a
commit 96d37d3785
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 90 additions and 71 deletions

View file

@ -2,9 +2,9 @@ name: Linux WPT Tests
on:
workflow_call:
inputs:
production:
required: false
type: boolean
profile:
required: true
type: string
wpt:
required: false
type: string
@ -13,7 +13,6 @@ 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' || '' }}"
@ -71,7 +70,7 @@ jobs:
if: ${{ inputs.wpt != 'sync' }}
run: |
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG \
${{ env.cargo_profile_option }} --processes $(nproc) --timeout-multiplier 2 \
--${{ inputs.profile }} --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 \
@ -83,7 +82,7 @@ jobs:
if: ${{ inputs.wpt == 'sync' }}
run: |
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG \
${{ env.cargo_profile_option }} --processes $(nproc) --timeout-multiplier 2 \
--${{ inputs.profile }} --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