mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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
35
.github/workflows/mac.yml
vendored
35
.github/workflows/mac.yml
vendored
|
@ -3,10 +3,10 @@ name: Mac
|
|||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
production:
|
||||
profile:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
default: "release"
|
||||
type: string
|
||||
wpt-layout:
|
||||
required: false
|
||||
type: string
|
||||
|
@ -23,10 +23,11 @@ on:
|
|||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
production:
|
||||
profile:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
default: "release"
|
||||
type: choice
|
||||
options: ["release", "debug", "production"]
|
||||
wpt-layout:
|
||||
required: false
|
||||
type: choice
|
||||
|
@ -43,8 +44,6 @@ on:
|
|||
branches: ["try-mac", "try-wpt-mac", "try-wpt-mac-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"
|
||||
|
@ -80,11 +79,11 @@ jobs:
|
|||
python3 -m pip install --upgrade pip virtualenv
|
||||
python3 ./mach bootstrap
|
||||
brew install gnu-tar
|
||||
- name: Release build (${{ inputs.production && 'without' || 'with' }} debug assertions)
|
||||
- name: Build (${{ inputs.profile }})
|
||||
run: |
|
||||
python3 ./mach build ${{ env.cargo_profile_option }}
|
||||
python3 ./mach build --${{ inputs.profile }}
|
||||
- name: Smoketest
|
||||
run: python3 ./mach smoketest ${{ env.cargo_profile_option }}
|
||||
run: python3 ./mach smoketest --${{ inputs.profile }}
|
||||
- name: Script tests
|
||||
run: ./mach test-scripts
|
||||
- name: Unit tests
|
||||
|
@ -93,11 +92,11 @@ jobs:
|
|||
with:
|
||||
timeout_minutes: 20 # https://github.com/servo/servo/issues/30275
|
||||
max_attempts: 3 # https://github.com/servo/servo/issues/30683
|
||||
command: python3 ./mach test-unit ${{ env.cargo_profile_option }}
|
||||
command: python3 ./mach test-unit --${{ inputs.profile }}
|
||||
- name: Build mach package
|
||||
run: python3 ./mach package ${{ env.cargo_profile_option }}
|
||||
run: python3 ./mach package --${{ inputs.profile }}
|
||||
- name: Run smoketest for mach package
|
||||
run: ./etc/ci/macos_package_smoketest.sh target/${{ env.cargo_profile_name }}/servo-tech-demo.dmg
|
||||
run: ./etc/ci/macos_package_smoketest.sh target/${{ inputs.profile }}/servo-tech-demo.dmg
|
||||
- name: Rename build timing
|
||||
run: cp -r target/cargo-timings target/cargo-timings-macos
|
||||
- name: Archive build timing
|
||||
|
@ -110,7 +109,7 @@ jobs:
|
|||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mac
|
||||
path: target/${{ env.cargo_profile_name }}/servo-tech-demo.dmg
|
||||
path: target/${{ inputs.profile }}/servo-tech-demo.dmg
|
||||
- name: Upload nightly
|
||||
if: ${{ inputs.upload }}
|
||||
run: |
|
||||
|
@ -122,7 +121,7 @@ jobs:
|
|||
NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
|
||||
NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds
|
||||
- name: Build package for target
|
||||
run: gtar -czf target.tar.gz target/${{ env.cargo_profile_name }}/servo target/${{ env.cargo_profile_name }}/*.dylib target/${{ env.cargo_profile_name }}/lib/*.dylib resources
|
||||
run: gtar -czf target.tar.gz target/${{ inputs.profile }}/servo target/${{ inputs.profile }}/*.dylib target/${{ inputs.profile }}/lib/*.dylib resources
|
||||
- name: Upload package for target
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
@ -135,7 +134,7 @@ jobs:
|
|||
needs: ["build"]
|
||||
uses: ./.github/workflows/mac-wpt.yml
|
||||
with:
|
||||
production: ${{ inputs.production == 'true' }}
|
||||
profile: ${{ inputs.profile }}
|
||||
layout: "layout-2020"
|
||||
secrets: inherit
|
||||
|
||||
|
@ -145,7 +144,7 @@ jobs:
|
|||
needs: ["build"]
|
||||
uses: ./.github/workflows/mac-wpt.yml
|
||||
with:
|
||||
production: ${{ inputs.production == 'true' }}
|
||||
profile: ${{ inputs.profile }}
|
||||
layout: "layout-2013"
|
||||
secrets: inherit
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue