Package in platform workflows

This commit is contained in:
sagudev 2023-04-06 16:19:08 +02:00
parent cfef75c99b
commit ec5b646b50
4 changed files with 53 additions and 4 deletions

View file

@ -34,6 +34,7 @@ env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}"
PACKAGE: "${{ contains(inputs.layout, '2020') && 'linux-layout2020' || 'linux' }}"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CCACHE: "sccache"
@ -65,6 +66,13 @@ jobs:
run: python3 ./mach test-unit --release --with-${{ env.LAYOUT }}
- name: Lockfile check
run: ./etc/ci/lockfile_changed.sh
- name: Package
run: python3 ./mach package --release
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE }}
path: target/release/servo-tech-demo.tar.gz
- name: Package binary
run: tar -czf target.tar.gz target/release/servo resources
- name: Archive binary

View file

@ -6,12 +6,20 @@ on:
layout:
required: true
type: string
unit-tests:
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
layout:
required: true
type: choice
options: ["2013", "2020"]
unit-tests:
required: false
default: false
type: boolean
push:
branches: ["try-mac"]
@ -19,6 +27,7 @@ env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
LAYOUT: "${{ contains(inputs.layout, '2020') && 'layout-2020' || 'layout-2013' }}"
PACKAGE: "${{ contains(inputs.layout, '2020') && 'mac-layout2020' || 'mac' }}"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CCACHE: "sccache"
@ -61,11 +70,17 @@ jobs:
- name: Smoketest
run: python3 ./mach smoketest
- name: Unit tests
if: ${{ inputs.unit-tests }}
run: python3 ./mach test-unit --release --with-${{ env.LAYOUT }}
- name: Test package
- name: Package
run: python3 ./mach package --release
- name: Package smoketest
run: ./etc/ci/macos_package_smoketest.sh target/release/servo-tech-demo.dmg
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE }}
path: target/release/servo-tech-demo.dmg
- name: Package binary
run: gtar -czf target.tar.gz target/release/servo target/release/*.dylib resources
- name: Archive binary

View file

@ -35,6 +35,7 @@ jobs:
uses: ./.github/workflows/windows.yml
with:
layout: '2013'
unit-tests: true
build-mac:
name: Mac
@ -42,6 +43,7 @@ jobs:
uses: ./.github/workflows/mac.yml
with:
layout: '2013'
unit-tests: true
build-linux:
name: Linux

View file

@ -6,12 +6,20 @@ on:
layout:
required: true
type: string
unit-tests:
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
layout:
required: true
type: choice
options: ["2013", "2020"]
unit-tests:
required: false
default: false
type: boolean
push:
branches: ["try-windows"]
@ -19,6 +27,7 @@ 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' }}"
jobs:
build-win:
@ -30,6 +39,12 @@ jobs:
fetch-depth: 2
- name: Copy to C drive
run: cp D:\a C:\ -Recurse
- name: wix311-binaries
shell: powershell
run: |
Start-BitsTransfer -Source https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311-binaries.zip -Destination C:\\wix311-binaries.zip
Expand-Archive C:\\wix311-binaries.zip -DestinationPath C:\\wix
echo "C:\\wix" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Bootstrap
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
run: |
@ -38,12 +53,21 @@ jobs:
- name: Release build
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
run: python mach build --release --media-stack=dummy --with-${{ env.LAYOUT }}
- name: Unit tests
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
run: python mach test-unit --release --with-${{ env.LAYOUT }}
- name: Smoketest
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
run: python mach smoketest --angle
- name: Unit tests
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
if: ${{ inputs.unit-tests }}
run: python mach test-unit --release --with-${{ env.LAYOUT }}
- name: Package
working-directory: "C:\\a\\servo\\servo"
run: python mach package --release
- name: Upload Package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE }}
path: target/release/msi/Servo.exe
build_result:
name: homu build finished