Make the choice of layout runtime setting

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Martin Robinson 2023-06-28 10:07:08 +02:00
parent f11c6045e3
commit d31cdb682f
No known key found for this signature in database
GPG key ID: D56AA4FA55EFE6F8
262 changed files with 1740 additions and 3700 deletions

View file

@ -3,9 +3,6 @@ name: Windows workflow
on:
workflow_call:
inputs:
layout:
required: true
type: string
unit-tests:
required: false
default: false
@ -19,10 +16,6 @@ on:
type: string
workflow_dispatch:
inputs:
layout:
required: true
type: choice
options: ["2013", "2020"]
unit-tests:
required: false
default: false
@ -37,8 +30,6 @@ on:
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}"
PACKAGE: "${{ contains(inputs.layout, '2020') && 'windows-msvc-layout2020' || 'windows-msvc' }}"
CCACHE: "ccache"
CARGO_TARGET_DIR: C:\\a\\servo\\servo\\target
@ -64,28 +55,28 @@ jobs:
python mach fetch
python mach bootstrap-gstreamer
- name: Release build
run: python mach build --release --with-${{ env.LAYOUT }}
run: python mach build --release
- name: Copy resources
run: cp D:\a\servo\servo\resources C:\a\servo\servo -Recurse
- name: Smoketest
run: python mach smoketest --angle
- name: Unit tests
if: ${{ inputs.unit-tests || github.ref_name == 'try-windows' }}
run: python mach test-unit --release --with-${{ env.LAYOUT }}
run: python mach test-unit --release
- name: Rename build timing
run: cp C:\a\servo\servo\target\cargo-timings C:\a\servo\servo\target\cargo-timings-windows-${{ env.LAYOUT }} -Recurse
run: cp C:\a\servo\servo\target\cargo-timings C:\a\servo\servo\target\cargo-timings-windows -Recurse
- name: Archive build timing
uses: actions/upload-artifact@v3
with:
name: cargo-timings
# Using a wildcard here ensures that the archive includes the path.
path: target/cargo-timings-*-${{ env.LAYOUT }}
path: target/cargo-timings-*
- name: Package
run: python mach package --release
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE }}
name: win
# These files are available
# MSI Installer: C:\a\servo\servo\target\release\msi\Installer.msi
# Bundle: C:\a\servo\servo\target\release\msi\Servo.exe
@ -94,7 +85,7 @@ jobs:
- name: Upload
if: ${{ inputs.upload }}
run: |
python mach upload-nightly ${{ env.PACKAGE }} --secret-from-environment `
python mach upload-nightly win --secret-from-environment `
--github-release-id ${{ inputs.github-release-id }}
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}