ci: Fix main workflows (#1122)
This brings some workflow improvements and fixes from the `cmake` branch to `main`, as well as some unique fixes to keep gclient working, so that we can continue to accept contributions in `main` until the `cmake` merge is ready. - Fix docs build in GitHub Actions (from `cmake` branch) - Cancel workflow when a PR is updated (from `cmake` branch) - Fix docker failures caused by running as root (from `cmake` branch) - Work around exception in depot_tools on Windows - Use Windows 2019 images in GitHub Actions for compatibility with gyp - Remove Docker build on ArchLinux, which no longer supports python2 at all - (NOTE: The `cmake` branch is still building on ArchLinux. Docker builds for Arch will be restored to the `main` branch when the `cmake` branch is finally merged to `main`.)
This commit is contained in:
parent
b221aa9caf
commit
d5ca6e84e6
|
@ -15,6 +15,13 @@ on:
|
||||||
description: "The ref to build and test."
|
description: "The ref to build and test."
|
||||||
required: False
|
required: False
|
||||||
|
|
||||||
|
# If another instance of this workflow is started for the same PR, cancel the
|
||||||
|
# old one. If a PR is updated and a new test run is started, the old test run
|
||||||
|
# will be cancelled automatically to conserve resources.
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.inputs.ref || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint
|
||||||
|
@ -40,9 +47,10 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# NOTE: macos-10.15 is required for now, to work around issues with our
|
# NOTE: macos-10.15 is required for now, to work around issues with our
|
||||||
# build system. See related comments in
|
# build system. The same is true for windows-2019. See related
|
||||||
|
# comments in
|
||||||
# .github/workflows/custom-actions/build-packager/action.yaml
|
# .github/workflows/custom-actions/build-packager/action.yaml
|
||||||
os: ["ubuntu-latest", "macos-10.15", "windows-latest", "self-hosted-linux-arm64"]
|
os: ["ubuntu-latest", "macos-10.15", "windows-2019", "self-hosted-linux-arm64"]
|
||||||
build_type: ["Debug", "Release"]
|
build_type: ["Debug", "Release"]
|
||||||
lib_type: ["static", "shared"]
|
lib_type: ["static", "shared"]
|
||||||
include:
|
include:
|
||||||
|
@ -56,7 +64,7 @@ jobs:
|
||||||
target_arch: x64
|
target_arch: x64
|
||||||
exe_ext: ""
|
exe_ext: ""
|
||||||
build_type_suffix: ""
|
build_type_suffix: ""
|
||||||
- os: windows-latest
|
- os: windows-2019
|
||||||
os_name: win
|
os_name: win
|
||||||
target_arch: x64
|
target_arch: x64
|
||||||
exe_ext: ".exe"
|
exe_ext: ".exe"
|
||||||
|
|
|
@ -17,7 +17,6 @@ runs:
|
||||||
python3 -m pip install \
|
python3 -m pip install \
|
||||||
sphinxcontrib.plantuml \
|
sphinxcontrib.plantuml \
|
||||||
recommonmark \
|
recommonmark \
|
||||||
cloud_sptheme \
|
|
||||||
breathe
|
breathe
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,8 @@ runs:
|
||||||
echo "${GITHUB_WORKSPACE}/depot_tools" >> $GITHUB_PATH
|
echo "${GITHUB_WORKSPACE}/depot_tools" >> $GITHUB_PATH
|
||||||
# Bypass VPYTHON included by depot_tools. Prefer the system installation.
|
# Bypass VPYTHON included by depot_tools. Prefer the system installation.
|
||||||
echo "VPYTHON_BYPASS=manually managed python not supported by chrome operations" >> $GITHUB_ENV
|
echo "VPYTHON_BYPASS=manually managed python not supported by chrome operations" >> $GITHUB_ENV
|
||||||
|
# Work around an issue in depot_tools on Windows, where an unexpected exception type appears.
|
||||||
|
sed -e 's/except subprocess.CalledProcessError:/except:/' -i.bk depot_tools/git_cache.py
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Build ninja (arm only)
|
- name: Build ninja (arm only)
|
||||||
|
|
|
@ -112,7 +112,7 @@ jobs:
|
||||||
needs: [setup, lint, draft_release]
|
needs: [setup, lint, draft_release]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: ["ubuntu-latest", "macos-latest", "windows-latest", "self-hosted-linux-arm64"]
|
os: ["ubuntu-latest", "macos-latest", "windows-2019", "self-hosted-linux-arm64"]
|
||||||
build_type: ["Debug", "Release"]
|
build_type: ["Debug", "Release"]
|
||||||
lib_type: ["static", "shared"]
|
lib_type: ["static", "shared"]
|
||||||
include:
|
include:
|
||||||
|
@ -126,7 +126,7 @@ jobs:
|
||||||
target_arch: x64
|
target_arch: x64
|
||||||
exe_ext: ""
|
exe_ext: ""
|
||||||
build_type_suffix: ""
|
build_type_suffix: ""
|
||||||
- os: windows-latest
|
- os: windows-2019
|
||||||
os_name: win
|
os_name: win
|
||||||
target_arch: x64
|
target_arch: x64
|
||||||
exe_ext: ".exe"
|
exe_ext: ".exe"
|
||||||
|
|
|
@ -35,7 +35,6 @@ extensions = ['sphinx.ext.autodoc',
|
||||||
'sphinx.ext.githubpages',
|
'sphinx.ext.githubpages',
|
||||||
'sphinxcontrib.plantuml',
|
'sphinxcontrib.plantuml',
|
||||||
'recommonmark',
|
'recommonmark',
|
||||||
'cloud_sptheme.ext.table_styling',
|
|
||||||
'breathe']
|
'breathe']
|
||||||
|
|
||||||
# Breathe configurations.
|
# Breathe configurations.
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
FROM archlinux:latest
|
|
||||||
|
|
||||||
# Install utilities, libraries, and dev tools.
|
|
||||||
RUN pacman -Sy --needed --noconfirm \
|
|
||||||
core/which \
|
|
||||||
c-ares \
|
|
||||||
gcc git python2 python3
|
|
||||||
|
|
||||||
# Default to python2 because our build system is ancient.
|
|
||||||
RUN ln -sf python2 /usr/bin/python
|
|
||||||
|
|
||||||
# Install depot_tools.
|
|
||||||
WORKDIR /
|
|
||||||
RUN git clone -b chrome/4147 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
||||||
RUN touch depot_tools/.disable_auto_update
|
|
||||||
ENV PATH /depot_tools:$PATH
|
|
||||||
|
|
||||||
# Bypass VPYTHON included by depot_tools. Prefer the system installation.
|
|
||||||
ENV VPYTHON_BYPASS="manually managed python not supported by chrome operations"
|
|
||||||
|
|
||||||
# Build and run this docker by mapping shaka-packager with
|
|
||||||
# -v "shaka-packager:/shaka-packager".
|
|
|
@ -7,7 +7,11 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
PACKAGER_DIR="$(dirname "$(dirname "$(dirname "$(dirname ${SCRIPT_DIR})")")")"
|
PACKAGER_DIR="$(dirname "$(dirname "$(dirname "$(dirname ${SCRIPT_DIR})")")")"
|
||||||
|
|
||||||
function docker_run() {
|
function docker_run() {
|
||||||
docker run -v ${PACKAGER_DIR}:/shaka-packager -w /shaka-packager/src ${CONTAINER} "$@"
|
docker run \
|
||||||
|
-v ${PACKAGER_DIR}:/shaka-packager \
|
||||||
|
-w /shaka-packager/src \
|
||||||
|
--user $(id -u):$(id -g) \
|
||||||
|
${CONTAINER} "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Command line arguments will be taken as an allowlist of OSes to run.
|
# Command line arguments will be taken as an allowlist of OSes to run.
|
||||||
|
|
Loading…
Reference in New Issue