mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Convert more taskcluster jobs to Github Actions.
This commit is contained in:
parent
84c8653d7e
commit
a82b268be0
3 changed files with 148 additions and 1 deletions
30
.github/workflows/docs.yml
vendored
Normal file
30
.github/workflows/docs.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: Docs upload
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
upload-docs:
|
||||
name: Upload docs to GitHub Pages
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: Compile docs
|
||||
run: python3 ./mach doc
|
||||
env:
|
||||
RUSTDOCFLAGS: --disable-minification
|
||||
- name: Upload docs
|
||||
run: |
|
||||
cd target/doc
|
||||
git init
|
||||
git add .
|
||||
git -c user.name="Workflow" -c user.email="" \
|
||||
commit -q -m "Rebuild Servo documentation"
|
||||
git remote set-url origin https://git:${DOC_SERVO_ORG}@github.com/servo/doc.servo.org
|
||||
git push --force origin FETCH_HEAD:gh-pages
|
||||
env:
|
||||
DOC_SERVO_ORG: ${{ secrets.DOC_SERVO_ORG }}
|
110
.github/workflows/nightly.yml
vendored
Normal file
110
.github/workflows/nightly.yml
vendored
Normal file
|
@ -0,0 +1,110 @@
|
|||
name: Nightly builds
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run at 5:30 am, daily.
|
||||
- cron: '15 5 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
SHELL: /bin/bash
|
||||
|
||||
jobs:
|
||||
build-linux-with-rust-nightly:
|
||||
name: Build (Linux) + rustc nightly
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: Update rustc
|
||||
run: echo nightly > rust-toolchain
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip virtualenv
|
||||
sudo apt update
|
||||
python3 ./mach bootstrap
|
||||
- name: Release build
|
||||
run: python3 ./mach build --release
|
||||
- name: Unit tests
|
||||
run: python3 ./mach test-unit --release
|
||||
|
||||
upload-linux:
|
||||
name: Upload nightly (Linux)
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
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
|
||||
- name: Package
|
||||
run: python3 ./mach package --release
|
||||
- name: Upload
|
||||
run: python3 ./mach upload-nightly linux --secret-from-environment
|
||||
env:
|
||||
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
|
||||
|
||||
upload-mac:
|
||||
name: Upload nightly (macOS)
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- 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 }}
|
||||
|
||||
upload-win:
|
||||
name: Upload nightly (Windows)
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: Copy to C drive
|
||||
run: cp D:\a C:\ -Recurse
|
||||
- name: Bootstrap
|
||||
working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }"
|
||||
run: |
|
||||
python -m pip install --upgrade pip virtualenv
|
||||
python mach fetch
|
||||
- name: Release build
|
||||
working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }"
|
||||
run: python mach build --release --media-stack=dummy
|
||||
- name: Package
|
||||
working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }"
|
||||
run: python mach package --release
|
||||
- name: Upload
|
||||
working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }"
|
||||
run: python mach upload-nightly windows-msvc --secret-from-environment
|
||||
env:
|
||||
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
|
|
@ -601,7 +601,10 @@ class PackageCommands(CommandBase):
|
|||
@CommandArgument('--secret-from-taskcluster',
|
||||
action='store_true',
|
||||
help='Retrieve the appropriate secrets from taskcluster.')
|
||||
def upload_nightly(self, platform, secret_from_taskcluster):
|
||||
@CommandArgument('--secret-from-environment',
|
||||
action='store_true',
|
||||
help='Retrieve the appropriate secrets from the environment.')
|
||||
def upload_nightly(self, platform, secret_from_taskcluster, secret_from_environment):
|
||||
import boto3
|
||||
|
||||
def get_s3_secret():
|
||||
|
@ -611,6 +614,10 @@ class PackageCommands(CommandBase):
|
|||
secret = get_taskcluster_secret("s3-upload-credentials")
|
||||
aws_access_key = secret["aws_access_key_id"]
|
||||
aws_secret_access_key = secret["aws_secret_access_key"]
|
||||
elif secret_from_environment:
|
||||
secret = json.loads(os.environ['S3_UPLOAD_CREDENTIALS'])
|
||||
aws_access_key = secret["aws_access_key_id"]
|
||||
aws_secret_access_key = secret["aws_secret_access_key"]
|
||||
return (aws_access_key, aws_secret_access_key)
|
||||
|
||||
def nightly_filename(package, timestamp):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue