Skip to content

Commit

Permalink
ci: Fix main workflows (#1122)
Browse files Browse the repository at this point in the history
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`.)
  • Loading branch information
joeyparrish authored Oct 28, 2022
1 parent b221aa9 commit d5ca6e8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 30 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ on:
description: "The ref to build and test."
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:
lint:
name: Lint
Expand All @@ -40,9 +47,10 @@ jobs:
fail-fast: false
matrix:
# 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
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"]
lib_type: ["static", "shared"]
include:
Expand All @@ -56,7 +64,7 @@ jobs:
target_arch: x64
exe_ext: ""
build_type_suffix: ""
- os: windows-latest
- os: windows-2019
os_name: win
target_arch: x64
exe_ext: ".exe"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/custom-actions/build-docs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ runs:
python3 -m pip install \
sphinxcontrib.plantuml \
recommonmark \
cloud_sptheme \
breathe
echo "::endgroup::"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/custom-actions/build-packager/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ runs:
echo "${GITHUB_WORKSPACE}/depot_tools" >> $GITHUB_PATH
# Bypass VPYTHON included by depot_tools. Prefer the system installation.
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::"
- name: Build ninja (arm only)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/github_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
needs: [setup, lint, draft_release]
strategy:
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"]
lib_type: ["static", "shared"]
include:
Expand All @@ -126,7 +126,7 @@ jobs:
target_arch: x64
exe_ext: ""
build_type_suffix: ""
- os: windows-latest
- os: windows-2019
os_name: win
target_arch: x64
exe_ext: ".exe"
Expand Down
1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
'sphinx.ext.githubpages',
'sphinxcontrib.plantuml',
'recommonmark',
'cloud_sptheme.ext.table_styling',
'breathe']

# Breathe configurations.
Expand Down
22 changes: 0 additions & 22 deletions packager/testing/dockers/ArchLinux_Dockerfile

This file was deleted.

6 changes: 5 additions & 1 deletion packager/testing/dockers/test_dockers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PACKAGER_DIR="$(dirname "$(dirname "$(dirname "$(dirname ${SCRIPT_DIR})")")")"

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.
Expand Down

0 comments on commit d5ca6e8

Please sign in to comment.