-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
88 additions
and
106 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,61 @@ | ||
language: c++ | ||
compiler: | ||
- clang | ||
- gcc | ||
env: | ||
- TRAVIS_NODE_VERSION="10" npm_config_runtime="electron" npm_config_target="3.0.8" npm_config_dist_url=https://atom.io/download/electron | ||
- TRAVIS_NODE_VERSION="10" | ||
- TRAVIS_NODE_VERSION="12" | ||
- TRAVIS_NODE_VERSION="13" | ||
os: | ||
- linux | ||
- osx | ||
matrix: | ||
fast_finish: true | ||
sudo: false | ||
|
||
env: | ||
- CXX=g++-4.9 | ||
- CXX=clang++ | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.9 | ||
before_install: | ||
- echo "$TRAVIS_NODE_VERSION" | ||
- export "PATH=./node_modules/.bin:$PWD/node_modules/.bin:$HOME/.local/bin:$PATH" | ||
- if [ -n "$TRAVIS_TAG" ]; then openssl aes-256-cbc -K $encrypted_5d419efedfca_key -iv $encrypted_5d419efedfca_iv -in .travis.id_rsa.enc -out .travis.id_rsa -d; fi | ||
- if [ -n "$TRAVIS_TAG" ]; then chmod 0600 .travis.id_rsa; fi | ||
# dummy 7z because npm wants to run the prepublish script | ||
- mkdir -p $HOME/.local/bin/ && touch $HOME/.local/bin/7z && chmod +x $HOME/.local/bin/7z | ||
# coveralls | ||
- if [ -z "$TRAVIS_TAG" -a "$TRAVIS_OS_NAME" = "linux" ]; then export DO_COVERAGE=1; fi | ||
- if [ -n "$DO_COVERAGE" ]; then pip install --user cpp-coveralls coveralls-merge; fi | ||
# compilers | ||
- if [ "$CXX" = "g++" -a "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="g++-4.9" CC="gcc-4.9" AR="gcc-ar-4.9" RANLIB="gcc-ranlib-4.9" NM="gcc-nm-4.9" ; fi | ||
- if [ "$CXX" = "clang++" ]; then export npm_config_clang=1 ; fi | ||
# node versions | ||
- rm -rf ~/.nvm | ||
- git clone --branch v0.33.11 https://github.com/creationix/nvm.git ~/.nvm | ||
- source ~/.nvm/nvm.sh | ||
- nvm install "$TRAVIS_NODE_VERSION" | ||
- node --version | ||
# no coverage for tags (they are release builds!) | ||
- if [ -n "$TRAVIS_TAG" ]; then export CFLAGS="$CFLAGS -O3" LDFLAGS="$LDFLAGS"; fi | ||
- if [ -n "$DO_COVERAGE" ]; then export LDFLAGS="$LDFLAGS --coverage" CFLAGS="$CFLAGS --coverage"; fi | ||
- echo "CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\"" | ||
- unset NVM_IOJS_ORG_MIRROR | ||
|
||
language: node_js | ||
|
||
os: | ||
- linux | ||
- osx | ||
|
||
osx_image: xcode10 | ||
|
||
node_js: | ||
- "12" | ||
- "14" | ||
- "16" | ||
|
||
jobs: | ||
include: | ||
- os: linux | ||
arch: arm64 | ||
node_js: 12 | ||
env: CXX=g++-4.9 | ||
exclude: | ||
- os: osx | ||
env: CXX=g++-4.9 | ||
- os: linux | ||
env: CXX=clang++ | ||
|
||
install: | ||
- npm install --build-from-source --verbose | ||
script: | ||
- if [ x"$npm_config_runtime" != x"electron" ]; then node --expose-gc ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- -R spec -s 1000 -t 5000; fi | ||
- npm run jshint | ||
- npm install --build-from-source | ||
|
||
after_success: | ||
- if [ -n "$DO_COVERAGE" ]; then cpp-coveralls --gcov-options '\-lp' --build-root build --exclude build/liblzma --exclude node_modules --dump coverage/cppfiles.json; fi | ||
- if [ -n "$DO_COVERAGE" ]; then coveralls --stdout < coverage/lcov.info > coverage/jsfiles.json; fi | ||
- if [ -n "$DO_COVERAGE" ]; then coveralls-merge coverage/jsfiles.json coverage/cppfiles.json; fi | ||
# publish for node-pre-gyp | ||
- node-pre-gyp package | ||
- if [ -n "$TRAVIS_TAG" ] && ([ $CXX = "g++" ] || [ $CXX = "g++-4.9" ]); then echo 'put build/stage/lzma-native/* uploads/lzma-native/' |sftp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -b- -i .travis.id_rsa node-pre-gyp@addaleax.net; fi | ||
- npm install coveralls | ||
- nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls | ||
|
||
before_deploy: | ||
- ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$TRAVIS_OS_NAME-`uname -m`.tar" | ||
- npm run prebuild --v8_enable_pointer_compression=false --v8_enable_31bit_smis_on_64bit_arch=false | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ARCH=ia32 npm run prebuild --v8_enable_pointer_compression=false --v8_enable_31bit_smis_on_64bit_arch=false; fi | ||
- tar --create --verbose --file="$ARCHIVE_NAME" --directory "$TRAVIS_BUILD_DIR/prebuilds" . | ||
|
||
deploy: | ||
provider: releases | ||
draft: false | ||
prerelease: true | ||
file: "$ARCHIVE_NAME" | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
node: 12 | ||
api_key: $PREBUILD_GITHUB_TOKEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters