Skip to content

Commit

Permalink
build: drop Travis in favor of Actions
Browse files Browse the repository at this point in the history
GitHub Actions is running all tests already present on Travis, as well
as building on more platforms (OS X and Windows). With Travis we're also
getting timeouts more frequently than with Actions, which gives the
false impression tests are failing (making it harder to triage PRs ready
to merge).

To make our config simpler, CI.yml and pythonpackage.yml got merged. The
coverage is also increased by running tests on OS X.

Signed-off-by: Matheus Marchini <[email protected]>

PR-URL: #32450
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Christian Clauss <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Coe <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
mmarchini authored and addaleax committed Mar 30, 2020
1 parent 567b352 commit eda165f
Show file tree
Hide file tree
Showing 11 changed files with 167 additions and 212 deletions.
79 changes: 0 additions & 79 deletions .github/workflows/CI.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: build-windows

on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
FLAKY_TESTS: dontcare

jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
- name: Install deps
run: choco install nasm
- name: Environment Information
run: npx envinfo
- name: Build
run: ./vcbuild.bat
73 changes: 73 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: linters

on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
NODE_VERSION: 10.x

jobs:
lint-addon-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint addon docs
run: NODE=$(which node) make lint-addon-docs
lint-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint C/C++ files
run: make lint-cpp
lint-md:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint docs
run: |
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
NODE=$(which node) make lint-md
lint-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint JavaScript files
run: NODE=$(which node) make lint-js
lint-py:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint Python
run: |
make lint-py-build || true
NODE=$(which node) make lint lint-py
24 changes: 24 additions & 0 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: misc

on: [push, pull_request]

env:
NODE_VERSION: 12.x

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Build
run: NODE=$(which node) make doc-only
- uses: actions/upload-artifact@v1
with:
name: docs
path: out/doc
33 changes: 0 additions & 33 deletions .github/workflows/pythonpackage.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: test-linux

on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
FLAKY_TESTS: dontcare

jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j2 V=1
- name: Test
run: make run-ci -j2 V=1
23 changes: 23 additions & 0 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: test-macOS

on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
FLAKY_TESTS: dontcare

jobs:
test-macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j8 V=1
- name: Test
run: make run-ci -j8 V=1
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
!.gitkeep
!.mailmap
!.nycrc
!.travis.yml
!.eslintrc.yaml
!.cpplint

Expand Down
88 changes: 0 additions & 88 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
# Locate an acceptable python interpreter and then re-execute the script.
# Note that the mix of single and double quotes is intentional,
# as is the fact that the ] goes on a new line.
# When a 'which' call is made for a specific version of Python on Travis CI,
# pyenv will alert which shims are available and then will fail the build.
_=[ 'exec' '/bin/sh' '-c' '''
test ${TRAVIS} && exec python "$0" "$@" # workaround for pyenv on Travis CI
test ${FORCE_PYTHON2} && exec python2 "$0" "$@" # workaround for gclient
which python3.8 >/dev/null && exec python3.8 "$0" "$@"
which python3.7 >/dev/null && exec python3.7 "$0" "$@"
Expand Down
Loading

0 comments on commit eda165f

Please sign in to comment.