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

@ -3,15 +3,14 @@ name: Mac WPT Tests
on:
workflow_call:
inputs:
production:
required: false
type: boolean
profile:
required: true
type: string
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' || '' }}"
@ -47,11 +46,11 @@ jobs:
python3 -m pip install --upgrade pip virtualenv
python3 ./mach bootstrap
- name: Smoketest
run: python3 ./mach smoketest ${{ env.cargo_profile_option }}
run: python3 ./mach smoketest --${{ inputs.profile }}
- name: Run tests
run: |
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG \
${{ env.cargo_profile_option }} --processes $(sysctl -n hw.logicalcpu) --timeout-multiplier 8 \
--${{ inputs.profile }} --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 \