Auto merge of #28436 - jdm:fix-docs, r=jdm

Fix Github Actions doc builds

Fix #28423.
This commit is contained in:
bors-servo 2021-05-24 20:22:14 -04:00 committed by GitHub
commit b4622e0546
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 64 additions and 8 deletions

View file

@ -13,6 +13,11 @@ jobs:
- 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: Compile docs
run: python3 ./mach doc
env:

View file

@ -1,11 +1,9 @@
name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
# Triggers the workflow on push events but only for the master branch
push:
branches: [ "master", "github-actions-dev", "auto", "try", "try-linux", "try-mac", "try-windows", "try-wpt", "linux-wpt-tests"]
pull_request:
branches: [ "master", "github-actions-dev" ]
branches: [ "auto", "try", "try-linux", "try-mac", "try-windows", "try-wpt"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@ -63,6 +61,12 @@ jobs:
python3 ./mach build --release
- name: Smoketest
run: python3 ./mach smoketest
- name: Unit tests
run: python3 ./mach test-unit --release
- name: Test package
run: python3 ./mach package --release
- name: Package smoketest
run: ./etc/ci/macos_package_smoketest.sh 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

@ -93,18 +93,18 @@ jobs:
- name: Copy to C drive
run: cp D:\a C:\ -Recurse
- name: Bootstrap
working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }"
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
run: |
python -m pip install --upgrade pip virtualenv
python mach fetch
- name: Release build
working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }"
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
run: python mach build --release --media-stack=dummy
- name: Package
working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }"
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
run: python mach package --release
- name: Upload
working-directory: "C:\\a\\${ REPOSITORY_NAME }\\${ REPOSITORY_NAME }"
working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
run: python mach upload-nightly windows-msvc --secret-from-environment
env:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}

32
.github/workflows/pull-request.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Basic cross-platform builds and checks
on:
pull_request:
branches: ["**"]
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
jobs:
build-linux:
name: Build (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: Workflow check
run: ./etc/ci/workflow_changed.sh
- name: Release build
run: python3 ./mach build --release
- name: Unit tests
run: python3 ./mach test-unit --release
- name: Tidy
run: python3 ./mach test-tidy --no-progress --all
- name: Lockfile check
run: ./etc/ci/lockfile_changed.sh

15
etc/ci/workflow_changed.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
set -o errexit
set -o nounset
set -o pipefail
python3 etc/ci/generate_workflow.py
diff="$(find . -name 'main.yml' -print0 | xargs -0 git diff)"
echo "${diff}"
[[ -z "${diff}" ]]