Nightly workflow using platform workflows

This commit is contained in:
sagudev 2023-04-06 18:43:33 +02:00
parent ec5b646b50
commit 76e9c68ac7
4 changed files with 70 additions and 110 deletions

View file

@ -12,6 +12,10 @@ on:
required: false
default: false
type: boolean
upload:
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
layout:
@ -27,6 +31,10 @@ on:
required: false
default: false
type: boolean
upload:
required: false
default: false
type: boolean
push:
branches: ["try-linux", "try-wpt"]
@ -73,6 +81,11 @@ jobs:
with:
name: ${{ env.PACKAGE }}
path: target/release/servo-tech-demo.tar.gz
- name: Upload
if: ${{ inputs.upload }}
run: python3 ./mach upload-nightly ${{ env.PACKAGE }} --secret-from-environment
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
- name: Package binary
run: tar -czf target.tar.gz target/release/servo resources
- name: Archive binary

View file

@ -10,6 +10,10 @@ on:
required: false
default: false
type: boolean
upload:
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
layout:
@ -20,6 +24,10 @@ on:
required: false
default: false
type: boolean
upload:
required: false
default: false
type: boolean
push:
branches: ["try-mac"]
@ -81,6 +89,12 @@ jobs:
with:
name: ${{ env.PACKAGE }}
path: target/release/servo-tech-demo.dmg
- name: Upload
if: ${{ inputs.upload }}
run: python3 ./mach upload-nightly mac --secret-from-environment
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
GITHUB_HOMEBREW_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
- name: Package binary
run: gtar -czf target.tar.gz target/release/servo target/release/*.dylib resources
- name: Archive binary

View file

@ -11,122 +11,38 @@ env:
SHELL: /bin/bash
jobs:
upload-linux:
upload-win:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (Linux)
runs-on: ubuntu-20.04
strategy:
matrix:
layout-engine: ['2013', '2020']
include:
- layout-engine: '2013'
build-flag: '--with-layout-2013'
package: 'linux'
continue-on-error: false
- layout-engine: '2020'
build-flag: '--with-layout-2020'
package: 'linux-layout2020'
continue-on-error: true
continue-on-error: ${{ matrix.continue-on-error }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Bootstrap
run: |
python3 -m pip install --upgrade pip virtualenv
sudo apt update
python3 ./mach bootstrap
- name: Release build
run: python3 ./mach build --release ${{ matrix.build-flag }}
- name: Package
run: python3 ./mach package --release
- name: Upload
run: python3 ./mach upload-nightly ${{ matrix.package }} --secret-from-environment
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
name: Upload nightly (Windows)
uses: ./.github/workflows/windows.yml
with:
layout: '2013'
upload: true
upload-mac:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (macOS)
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
# TODO: Remove this step when the compatibility issue between mozjs and
# Homebrew's Python 3.10 formula (servo/rust-mozjs#559) is fixed
- name: Select Python 3.9
run: |
brew install python@3.9
cd $(dirname $(which python3.9))
rm -f python3 pip3
ln -s python3.9 python3
ln -s pip3.9 pip3
- name: Bootstrap
run: |
python3 -m pip install --upgrade pip virtualenv
brew bundle install --verbose --no-upgrade --file=etc/taskcluster/macos/Brewfile
brew bundle install --verbose --no-upgrade --file=etc/taskcluster/macos/Brewfile-build
rm -rf /usr/local/etc/openssl
rm -rf /usr/local/etc/openssl@1.1
brew install openssl@1.1 gnu-tar
- name: Release build
run: |
export OPENSSL_INCLUDE_DIR="$(brew --prefix openssl)/include"
export OPENSSL_LIB_DIR="$(brew --prefix openssl)/lib"
export PKG_CONFIG_PATH="$(brew --prefix libffi)/lib/pkgconfig/"
export PKG_CONFIG_PATH="$(brew --prefix zlib)/lib/pkgconfig/:$PKG_CONFIG_PATH"
python3 ./mach build --release
- name: Package
run: python3 ./mach package --release
- name: Smoketest
run: ./etc/ci/macos_package_smoketest.sh target/release/servo-tech-demo.dmg
- name: Upload
run: python3 ./mach upload-nightly mac --secret-from-environment
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
GITHUB_HOMEBREW_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
uses: ./.github/workflows/mac.yml
with:
layout: '2013'
upload: true
upload-win:
upload-linux:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (Windows)
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Copy to C drive
run: cp D:\a C:\ -Recurse
- uses: suisei-cn/actions-download-file@v1
id: wix311-binaries
name: Download wix binaries
with:
url: "https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311-binaries.zip"
target: "C:\\wix311-binaries.zip"
- uses: DuckSoft/extract-7z-action@v1.0
name: Extract wix binaries
with:
pathSource: "C:\\wix311-binaries.zip"
pathTarget: "C:\\wix"
- name: Add binaries to path
run: echo "C:\\wix" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Bootstrap
working-directory: "C:\\a\\servo\\servo"
run: |
python -m pip install --upgrade pip virtualenv
python mach fetch
- name: Release build
working-directory: "C:\\a\\servo\\servo"
run: python mach build --release --media-stack=dummy
- name: Package
working-directory: "C:\\a\\servo\\servo"
run: python mach package --release
- name: Upload
working-directory: "C:\\a\\servo\\servo"
run: python mach upload-nightly windows-msvc --secret-from-environment
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
name: Upload nightly (Linux)
uses: ./.github/workflows/linux.yml
with:
layout: '2013'
upload: true
upload-linux-2020:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (Linux layout2020)
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
upload: true

View file

@ -10,6 +10,10 @@ on:
required: false
default: false
type: boolean
upload:
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
layout:
@ -20,6 +24,10 @@ on:
required: false
default: false
type: boolean
upload:
required: false
default: false
type: boolean
push:
branches: ["try-windows"]
@ -67,7 +75,16 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE }}
path: target/release/msi/Servo.exe
# 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
# Zip: C:\a\servo\servo\target\release\msi\Servo.zip
path: C:\\a\\servo\\servo\\target/release/msi/Servo.exe
- name: Upload
if: ${{ inputs.upload }}
run: python mach upload-nightly windows-msvc --secret-from-environment
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
build_result:
name: homu build finished