mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
build: drop Travis in favor of Actions
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 <mmarchini@netflix.com> PR-URL: https://github.com/nodejs/node/pull/32450 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
ca19d553cf
commit
7c66f4544a
11 changed files with 167 additions and 212 deletions
79
.github/workflows/CI.yml
vendored
79
.github/workflows/CI.yml
vendored
|
@ -1,79 +0,0 @@
|
|||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: NODE=$(which node) make doc-only
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: docs
|
||||
path: out/doc
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Environment Information
|
||||
run: npx envinfo
|
||||
- name: Build
|
||||
run: ./configure && make -j2
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Environment Information
|
||||
run: npx envinfo
|
||||
- name: Install deps
|
||||
run: choco install nasm
|
||||
- name: Build
|
||||
run: ./vcbuild.bat
|
||||
build-macOS:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Environment Information
|
||||
run: npx envinfo
|
||||
- name: Build
|
||||
run: ./configure && make -j8
|
||||
lint-addon-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 10
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: Lint addon docs
|
||||
run: NODE=$(which node) make lint-addon-docs
|
||||
lint-cpp:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Lint C/C++ files
|
||||
run: make lint-cpp
|
||||
lint-md:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 10
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- 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 10
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10.x
|
||||
- name: Lint JavaScript files
|
||||
run: NODE=$(which node) make lint-js
|
23
.github/workflows/build-windows.yml
vendored
Normal file
23
.github/workflows/build-windows.yml
vendored
Normal file
|
@ -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
.github/workflows/linters.yml
vendored
Normal file
73
.github/workflows/linters.yml
vendored
Normal file
|
@ -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
.github/workflows/misc.yml
vendored
Normal file
24
.github/workflows/misc.yml
vendored
Normal file
|
@ -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
.github/workflows/pythonpackage.yml
vendored
33
.github/workflows/pythonpackage.yml
vendored
|
@ -1,33 +0,0 @@
|
|||
name: Python 3 testing
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
python-version: [3.8] # [2.7, 3.5, 3.6, 3.7]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Compile Node.js
|
||||
run: |
|
||||
python ./configure.py
|
||||
make -j2 V=1
|
||||
- name: Test JS Suites
|
||||
run: |
|
||||
python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
|
||||
- name: Test C++ Suites
|
||||
run: |
|
||||
make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
|
||||
python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
|
||||
- name: Make lint
|
||||
run: |
|
||||
make lint-py-build || true
|
||||
NODE=$(which node) make lint lint-py
|
23
.github/workflows/test-linux.yml
vendored
Normal file
23
.github/workflows/test-linux.yml
vendored
Normal file
|
@ -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
.github/workflows/test-macos.yml
vendored
Normal file
23
.github/workflows/test-macos.yml
vendored
Normal file
|
@ -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
.gitignore
vendored
1
.gitignore
vendored
|
@ -19,7 +19,6 @@
|
|||
!.gitkeep
|
||||
!.mailmap
|
||||
!.nycrc
|
||||
!.travis.yml
|
||||
!.eslintrc.yaml
|
||||
!.cpplint
|
||||
|
||||
|
|
88
.travis.yml
88
.travis.yml
|
@ -1,88 +0,0 @@
|
|||
os: linux
|
||||
language: cpp
|
||||
env:
|
||||
global:
|
||||
- PYTHON_VERSION="3.7.1"
|
||||
- PYTHON=python3
|
||||
jobs:
|
||||
include:
|
||||
- stage: "Compile"
|
||||
name: "Compile Node.js"
|
||||
cache: ccache
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-6
|
||||
install:
|
||||
- export CCACHE_NOSTATS=1
|
||||
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
|
||||
- export CC='ccache gcc-6'
|
||||
- export CXX='ccache g++-6'
|
||||
script:
|
||||
- pyenv global ${PYTHON_VERSION}
|
||||
- ./configure
|
||||
- timeout --preserve-status 45m make -j2 V=1
|
||||
before_cache:
|
||||
- cp out/Release/node /home/travis/.ccache
|
||||
- cp out/Release/cctest /home/travis/.ccache
|
||||
|
||||
- stage: "Tests"
|
||||
name: "Test JS Suites"
|
||||
cache: ccache
|
||||
install:
|
||||
- mkdir -p out/Release
|
||||
- cp /home/travis/.ccache/node out/Release/node
|
||||
script:
|
||||
- pyenv global ${PYTHON_VERSION}
|
||||
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default
|
||||
|
||||
- name: "Test C++ Suites"
|
||||
cache: ccache
|
||||
install:
|
||||
- export CCACHE_NOSTATS=1
|
||||
- export CCACHE_SLOPPINESS="file_macro,include_file_mtime,include_file_ctime,time_macros,file_stat_matches"
|
||||
- export CC='ccache gcc'
|
||||
- export CXX='ccache g++'
|
||||
- mkdir -p out/Release
|
||||
- cp /home/travis/.ccache/node out/Release/node
|
||||
- ln -fs out/Release/node node
|
||||
- cp /home/travis/.ccache/cctest out/Release/cctest
|
||||
- touch config.gypi
|
||||
script:
|
||||
- pyenv global ${PYTHON_VERSION}
|
||||
- out/Release/cctest
|
||||
- make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
|
||||
- python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api
|
||||
|
||||
- name: "Run Linter and Build Docs"
|
||||
language: node_js
|
||||
node_js: "node"
|
||||
install:
|
||||
- pyenv global ${PYTHON_VERSION}
|
||||
- make lint-py-build || true
|
||||
script:
|
||||
- NODE=$(which node) make lint-py doc-only lint
|
||||
|
||||
- name: "First commit message adheres to guidelines at <a href=\"https://goo.gl/p2fr5Q\">https://goo.gl/p2fr5Q</a>"
|
||||
if: type = pull_request
|
||||
language: node_js
|
||||
node_js: "node"
|
||||
script:
|
||||
- if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
|
||||
bash -x tools/lint-pr-commit-message.sh ${TRAVIS_PULL_REQUEST};
|
||||
fi
|
||||
|
||||
- name: "Find syntax errors in our Python dependencies"
|
||||
language: python
|
||||
python: 3.8
|
||||
install:
|
||||
- mv .flake8 disabled.flake8 # take the blinders off of flake8
|
||||
- python3.8 -m pip install --upgrade pip
|
||||
- python3.8 -m pip install flake8
|
||||
script:
|
||||
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
allow_failures: # TODO (cclauss): remove this when dependencies are clean
|
||||
- name: "Find syntax errors in our Python dependencies"
|
||||
- name: "First commit message adheres to guidelines at <a href=\"https://goo.gl/p2fr5Q\">https://goo.gl/p2fr5Q</a>"
|
3
configure
vendored
3
configure
vendored
|
@ -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" "$@"
|
||||
|
|
|
@ -175,14 +175,7 @@ fail before the change, and pass after the change.
|
|||
|
||||
All pull requests must pass continuous integration tests. Code changes must pass
|
||||
on [project CI server](https://ci.nodejs.org/). Pull requests that only change
|
||||
documentation and comments can use Travis CI results.
|
||||
|
||||
Travis CI jobs have a fixed running time limit that building Node.js sometimes
|
||||
exceeds. If the `Compile Node.js` Travis CI job has timed out it will fail after
|
||||
around 45 minutes. The exit code will be 143, indicating that a `SIGTERM` signal
|
||||
terminated the `make` command. When this happens, restart the timed out job. It
|
||||
will reuse built artifacts from the previous timed-out run, and thus take less
|
||||
time to complete.
|
||||
documentation and comments can use GitHub Actions results.
|
||||
|
||||
Do not land any pull requests without passing (green or yellow) CI runs. If
|
||||
there are CI failures unrelated to the change in the pull request, try "Resume
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue