forked from NordicSemiconductor/pc-nrfjprog-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (63 loc) · 1.97 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
branches:
only:
- master
- /^v?[0-9]/
language: cpp
filter_secrets: false
os:
- linux
- osx
- windows
addons:
apt:
sources: ubuntu-toolchain-r-test
packages: g++-6 ninja-build
homebrew:
packages: ninja
env:
global:
- NODE_ARCH="64"
matrix:
- NODE_VERSION="8.15.0"
- NODE_VERSION="10.15.0"
- NODE_VERSION="11.7.0"
- NODE_VERSION="8.15.0" npm_config_runtime="electron" npm_config_target="2.0.17" npm_config_disturl="https://atom.io/download/electron"
- NODE_VERSION="10.15.0" npm_config_runtime="electron" npm_config_target="4.0.6" npm_config_disturl="https://atom.io/download/electron"
matrix:
include:
- os: windows
env: NODE_ARCH="32" NODE_VERSION="8.15.0"
- os: windows
env: NODE_ARCH="32" NODE_VERSION="10.15.0"
- os: windows
env: NODE_ARCH="32" NODE_VERSION="11.7.0"
- os: windows
env: NODE_ARCH="32" NODE_VERSION="8.15.0" npm_config_runtime="electron" npm_config_target="2.0.17" npm_config_disturl="https://atom.io/download/electron"
- os: windows
env: NODE_ARCH="32" NODE_VERSION="10.15.0" npm_config_runtime="electron" npm_config_target="4.0.6" npm_config_disturl="https://atom.io/download/electron"
before_install:
- |
if [ $TRAVIS_OS_NAME == "windows" ]; then
choco install -y nvm
export NVM_HOME="C:\ProgramData\nvm"
export NVM_SYMLINK="C:\Program Files\nodejs"
export PATH=$PATH:$NVM_HOME:$NVM_SYMLINK
nvm install $NODE_VERSION $NODE_ARCH
nvm use $NODE_VERSION $NODE_ARCH
else
nvm install $NODE_VERSION
nvm use $NODE_VERSION
fi
- |
if [ $TRAVIS_OS_NAME == "linux" ]; then
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/gcc-6 100
fi
script:
- npm install --build-from-source
- npm run package-prebuilt
- echo tag=$TRAVIS_TAG pullrequest=$TRAVIS_PULL_REQUEST
- |
if [[ "$TRAVIS_TAG" =~ ^v?[0-9] ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
npm run publish-prebuilt
fi