From b408413a32ea848d1aa21d4fb48f963103162cf8 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Thu, 2 Jan 2020 20:28:54 +0800 Subject: [PATCH 01/16] src: add build Github Action PR-URL: https://github.com/nodejs/node/pull/31153 Reviewed-By: Christian Clauss Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig --- .github/workflows/CI.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 00000000000000..47b59836300086 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,43 @@ +name: CI + +on: [push, pull_request] + +jobs: + build-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: 13.x + - name: Environment Information + run: npx envinfo + - name: Build + run: ./configure && make -j2 + build-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: 13.x + - 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: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: 13.x + - name: Environment Information + run: npx envinfo + - name: Build + run: ./configure && make -j8 From 2e080425114ac4e9e4c2ea373502a2a7b13af14d Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Sun, 12 Jan 2020 00:58:19 +0000 Subject: [PATCH 02/16] build: add GitHub actions to run linters Add jobs to our GitHub Actions workflow to run our various lint Makefile targets. The `setup-node` action used to run the JavaScript linter contains problem matchers for eslint that will annotate the files in a pull request if there are failures. PR-URL: https://github.com/nodejs/node/pull/31323 Reviewed-By: Ruben Bridgewater Reviewed-By: Anna Henningsen Reviewed-By: Jiawen Geng Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig --- .github/workflows/CI.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 47b59836300086..e63b95c0c0e658 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,3 +41,39 @@ jobs: 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 ${{ matrix.node-version }} + 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 ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: 10.x + - name: Lint docs + run: NODE=$(which node) make lint-md + lint-js: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: 10.x + - name: Lint JavaScript files + run: NODE=$(which node) make lint-js From 8ddb39e87018a49c3bd910e0fe817ef9f629d585 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Sun, 12 Jan 2020 03:06:52 -0500 Subject: [PATCH 03/16] build: fix step name in GitHub Actions workflow The CI workflow doesn't use the matrix strategy so there is no `${{ matrix.node-version }}` variable to use in the `Use Node.js` step names. PR-URL: https://github.com/nodejs/node/pull/31323 Reviewed-By: Ruben Bridgewater Reviewed-By: Anna Henningsen Reviewed-By: Jiawen Geng Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig --- .github/workflows/CI.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e63b95c0c0e658..006b7ebdd30c01 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 13 uses: actions/setup-node@v1 with: node-version: 13.x @@ -19,7 +19,7 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 13 uses: actions/setup-node@v1 with: node-version: 13.x @@ -33,7 +33,7 @@ jobs: runs-on: macOS-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 13 uses: actions/setup-node@v1 with: node-version: 13.x @@ -45,7 +45,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 10 uses: actions/setup-node@v1 with: node-version: 10.x @@ -61,7 +61,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 10 uses: actions/setup-node@v1 with: node-version: 10.x @@ -71,7 +71,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 10 uses: actions/setup-node@v1 with: node-version: 10.x From bf04e09cd93e9afb1a82cc644302d76acaea6d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=A9=E6=95=A3=E6=80=A7=E7=99=BE=E4=B8=87=E7=94=9C?= =?UTF-8?q?=E9=9D=A2=E5=8C=85?= Date: Mon, 13 Jan 2020 01:57:13 +0800 Subject: [PATCH 04/16] build: fix macos runner type in GitHub Action PR-URL: https://github.com/nodejs/node/pull/31327 Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Ruben Bridgewater Reviewed-By: Jiawen Geng Reviewed-By: Minwoo Jung Reviewed-By: Anto Aravinth Reviewed-By: Rich Trott --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 006b7ebdd30c01..257e4abbc10aca 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,7 +30,7 @@ jobs: - name: Build run: ./vcbuild.bat build-macOS: - runs-on: macOS-latest + runs-on: macos-latest steps: - uses: actions/checkout@v2 - name: Use Node.js 13 From 9a3e059d44a2a8616d35b90a57534ae254426b9f Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Mon, 13 Jan 2020 19:54:36 -0500 Subject: [PATCH 05/16] build: do not use setup-node in build workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The setup-node GitHub Action installs problem matchers that happen to match the warning message format of Visual Studio's C/C++ compiler. This is resulting in all of our pull requests being annotated with `Unchanged files with check annotations` which are confusing to new contributors as they are not due to the changes in the pull request. The action is used to run `npx envinfo` to dump some information into the logs before the actual build. All GitHub hosted runners already have a version of Node.js installed (12.x at the time of this commit) which we can use to run `envinfo`. Remove the action to avoid using the problematic problem matcher. PR-URL: https://github.com/nodejs/node/pull/31349 Fixes: https://github.com/nodejs/node/issues/31347 Reviewed-By: Colin Ihrig Reviewed-By: Jiawen Geng Reviewed-By: Michaël Zasso Reviewed-By: Sam Roberts Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott --- .github/workflows/CI.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 257e4abbc10aca..d2936382528b0d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,10 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js 13 - uses: actions/setup-node@v1 - with: - node-version: 13.x - name: Environment Information run: npx envinfo - name: Build @@ -19,10 +15,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js 13 - uses: actions/setup-node@v1 - with: - node-version: 13.x - name: Environment Information run: npx envinfo - name: Install deps @@ -33,10 +25,6 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js 13 - uses: actions/setup-node@v1 - with: - node-version: 13.x - name: Environment Information run: npx envinfo - name: Build From 57f6b5ad00a375e85157aea1af34356d445bd1b4 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 24 Jan 2020 16:00:12 +0000 Subject: [PATCH 06/16] build: build docs in GitHub Actions CI workflow PR-URL: https://github.com/nodejs/node/pull/31504 Reviewed-By: Jiawen Geng Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott --- .github/workflows/CI.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d2936382528b0d..356a9f990e4290 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,6 +3,16 @@ 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: From c2e00ed9cdb1fe6b15ece487eee783679a11ca39 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 20 Mar 2020 07:49:34 -0400 Subject: [PATCH 07/16] build: annotate markdown lint failures in pull requests Add a problem matcher for output from remark-lint to our lint-md GitHub Actions CI workflow so that any markdown linter failures are annotated in the pull request in the web UI. Signed-off-by: Richard Lau PR-URL: https://github.com/nodejs/node/pull/32391 Refs: https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md Refs: https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers Reviewed-By: Ruben Bridgewater Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Jiawen Geng Reviewed-By: Matheus Marchini --- .github/workflows/CI.yml | 4 +++- .../remark-lint-problem-matcher.json | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/remark-lint-problem-matcher.json diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 356a9f990e4290..f5b6281149c0fb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -64,7 +64,9 @@ jobs: with: node-version: 10.x - name: Lint docs - run: NODE=$(which node) make lint-md + run: | + echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json" + NODE=$(which node) make lint-md lint-js: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/remark-lint-problem-matcher.json b/.github/workflows/remark-lint-problem-matcher.json new file mode 100644 index 00000000000000..cfb281310a9a0f --- /dev/null +++ b/.github/workflows/remark-lint-problem-matcher.json @@ -0,0 +1,22 @@ +{ + "problemMatcher": [ + { + "owner": "remark-lint", + "pattern": [ + { + "regexp": "^(?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)*$", + "file": 1 + }, + { + "regexp": "^\\s+(?:\\d+:\\d+-)?(\\d+):(\\d+)\\s+\\S*(error|warning|info)\\S*\\s+(.+)\\s+(\\S+)\\s+(?:\\S+)$", + "line": 1, + "column": 2, + "severity": 3, + "message": 4, + "code": 5, + "loop": true + } + ] + } + ] +} From 9d80c4756272423effdaf09582fb48d1369fc41f Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 5 Sep 2019 15:56:12 +0200 Subject: [PATCH 08/16] build: drop Travis in favor of Actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 PR-URL: https://github.com/nodejs/node/pull/32450 Reviewed-By: Richard Lau Reviewed-By: Christian Clauss Reviewed-By: Jiawen Geng Reviewed-By: Matteo Collina Reviewed-By: Ben Coe Reviewed-By: Tobias Nießen Reviewed-By: Michaël Zasso --- .github/workflows/CI.yml | 79 ------------------------- .github/workflows/build-windows.yml | 23 ++++++++ .github/workflows/linters.yml | 73 +++++++++++++++++++++++ .github/workflows/misc.yml | 24 ++++++++ .github/workflows/pythonpackage.yml | 33 ----------- .github/workflows/test-linux.yml | 23 ++++++++ .github/workflows/test-macos.yml | 23 ++++++++ .gitignore | 1 - .travis.yml | 91 ----------------------------- doc/guides/collaborator-guide.md | 9 +-- 10 files changed, 167 insertions(+), 212 deletions(-) delete mode 100644 .github/workflows/CI.yml create mode 100644 .github/workflows/build-windows.yml create mode 100644 .github/workflows/linters.yml create mode 100644 .github/workflows/misc.yml delete mode 100644 .github/workflows/pythonpackage.yml create mode 100644 .github/workflows/test-linux.yml create mode 100644 .github/workflows/test-macos.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index f5b6281149c0fb..00000000000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 00000000000000..e342d93332b596 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -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 diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml new file mode 100644 index 00000000000000..f0ee528a0f4e0f --- /dev/null +++ b/.github/workflows/linters.yml @@ -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 diff --git a/.github/workflows/misc.yml b/.github/workflows/misc.yml new file mode 100644 index 00000000000000..b23120ae0f1d74 --- /dev/null +++ b/.github/workflows/misc.yml @@ -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 diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml deleted file mode 100644 index 9ff5e9a39d81fa..00000000000000 --- a/.github/workflows/pythonpackage.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml new file mode 100644 index 00000000000000..9b428b1f507d94 --- /dev/null +++ b/.github/workflows/test-linux.yml @@ -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 diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml new file mode 100644 index 00000000000000..55fda9317a91fb --- /dev/null +++ b/.github/workflows/test-macos.yml @@ -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 diff --git a/.gitignore b/.gitignore index 9864e6780b3bbd..f0e9b6b15d4c69 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,6 @@ !.gitkeep !.mailmap !.nycrc -!.travis.yml !.eslintrc.yaml !.cpplint diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e1069317ecc2c5..00000000000000 --- a/.travis.yml +++ /dev/null @@ -1,91 +0,0 @@ -os: linux -language: cpp -# Currently this file can only support one PYTHON_VERSION. -# To experiment with Python 3, comment out Python 2.7 and uncomment one of the Python 3 versions. -env: - global: - - PYTHON_VERSION="2.7.15" - # - PYTHON_VERSION="3.6.7" - # - PYTHON_VERSION="3.7.1" -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 https://goo.gl/p2fr5Q" - 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 https://goo.gl/p2fr5Q" diff --git a/doc/guides/collaborator-guide.md b/doc/guides/collaborator-guide.md index 7e887d7543f50a..956eae7fb23726 100644 --- a/doc/guides/collaborator-guide.md +++ b/doc/guides/collaborator-guide.md @@ -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 From cd6f327335afccadd1199ffd2577c28cbd536fde Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 1 Apr 2020 23:00:59 -0400 Subject: [PATCH 09/16] fixup: 2.7 for windows --- .github/workflows/build-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index e342d93332b596..be708a1efc15f4 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -3,7 +3,7 @@ name: build-windows on: [push, pull_request] env: - PYTHON_VERSION: 3.8 + PYTHON_VERSION: 2.7 FLAKY_TESTS: dontcare jobs: From aa7ca3cb67453a387c7d2b43780a780c7f176957 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 1 Apr 2020 23:01:09 -0400 Subject: [PATCH 10/16] fixup: 2.7 linux --- .github/workflows/test-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 9b428b1f507d94..e4523ff9868437 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -3,7 +3,7 @@ name: test-linux on: [push, pull_request] env: - PYTHON_VERSION: 3.8 + PYTHON_VERSION: 2.7 FLAKY_TESTS: dontcare jobs: From ff117fb70e2f401b5d6ae1b83c698aa6b2e206b3 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 1 Apr 2020 23:01:16 -0400 Subject: [PATCH 11/16] fixup: 2.7 macos --- .github/workflows/test-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 55fda9317a91fb..51dfc3d245e01c 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -3,7 +3,7 @@ name: test-macOS on: [push, pull_request] env: - PYTHON_VERSION: 3.8 + PYTHON_VERSION: 2.7 FLAKY_TESTS: dontcare jobs: @@ -14,7 +14,7 @@ jobs: - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@v1 with: - PYTHON_VERSION: ${{ env.PYTHON_VERSION }} + python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information run: npx envinfo - name: Build From b1762761fd5482252610c39066a4ee9657f388a1 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 1 Apr 2020 23:05:21 -0400 Subject: [PATCH 12/16] fixup: linux --- .github/workflows/test-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index e4523ff9868437..d63627f1f0cc78 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@v1 with: - PYTHON_VERSION: ${{ env.PYTHON_VERSION }} + python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information run: npx envinfo - name: Build From c73411522e6c93750114600f4e2f10b692b7bd41 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 1 Apr 2020 23:05:40 -0400 Subject: [PATCH 13/16] fixup: windows --- .github/workflows/build-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index be708a1efc15f4..fa40044f7c177d 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@v1 with: - PYTHON_VERSION: ${{ env.PYTHON_VERSION }} + python-version: ${{ env.PYTHON_VERSION }} - name: Install deps run: choco install nasm - name: Environment Information From 473911183c3c2252c2b9e45f0e93693add74a5ed Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 1 Apr 2020 23:20:19 -0400 Subject: [PATCH 14/16] fixup: windows 2016 --- .github/workflows/build-windows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index fa40044f7c177d..951938806e4848 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -8,7 +8,7 @@ env: jobs: build-windows: - runs-on: windows-latest + runs-on: windows-2016 steps: - uses: actions/checkout@v2 - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -19,5 +19,7 @@ jobs: run: choco install nasm - name: Environment Information run: npx envinfo + - name: Setup Visual studio + run: npx windows-build-tools - name: Build run: ./vcbuild.bat From 833482db63f2ec733414f48fb9534dfecd6ed534 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 1 Apr 2020 23:24:10 -0400 Subject: [PATCH 15/16] fixup: windows oops --- .github/workflows/build-windows.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 951938806e4848..7d7a8167308960 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -19,7 +19,5 @@ jobs: run: choco install nasm - name: Environment Information run: npx envinfo - - name: Setup Visual studio - run: npx windows-build-tools - name: Build run: ./vcbuild.bat From 8cb4db05ca3af52945682583b9c4b57ba34d4303 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Wed, 1 Apr 2020 23:41:18 -0400 Subject: [PATCH 16/16] fixup: don't get rid of python 3 test --- .github/workflows/pythonpackage.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/pythonpackage.yml diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml new file mode 100644 index 00000000000000..9ff5e9a39d81fa --- /dev/null +++ b/.github/workflows/pythonpackage.yml @@ -0,0 +1,33 @@ +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