mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
519ca8ea08
Building Node.js without a ccache cache takes longer than the 50 minute Travis time limit for jobs for public repositories. To mitigate this we added a job to compile V8 on the basis that in the worst case it would complete within 50 minutes and provide a cache that could be used by a restarted `Compile Node.js` job. Recent PRs have exceeded the 50 minute time limit for the `Compile V8` job. When Travis times out a build the cache is not stored. This commit drops the `Compile V8` job and adds a manual timeout to the `Compile Node.js` job which will allow the cache to be stored and used in restarts of the job. PR-URL: https://github.com/nodejs/node/pull/30469 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
88 lines
3.0 KiB
YAML
88 lines
3.0 KiB
YAML
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"
|