Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: drop Travis in favor of Actions #32450

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since jenkins convers all platform test, maybe just test linux on github action is enough ?

Copy link
Contributor Author

@mmarchini mmarchini Mar 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running on all three platforms gives authors an early signal on all Tier 1 platforms (I could even argue that we should be testing ARM here nevermind, ARM is for self-hosted hosts only, which is a whole other conversation). This is less a matter of coverage (we're not covering anything extra with Travis or GitHub Actions today), but rather a matter of early feedback on an easier to consume interface for outside contributors (this was the goal when Travis was introduced at least).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add macOS, should we add windows test too ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, yes. I just didn't add because I have no idea how we test Windows on Jenkins (the commands I used on Linux and macOS came from Jenkins config, so they are more suited for CI environments).

If anyone knows the best way to run tests on Windows on CI, feel free to comment :)

There's always the option to add tests for Windows in a follow up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with Tier 1 platforms for now. Linux is actually the slowest platform on Actions for our build/tests (* may possibly change if we start running tests on Windows).

I'm also happy for tests to be added on Windows in a follow up PR (we're not running tests on Windows in Actions or Travis CI before this PR).


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