-
-
Notifications
You must be signed in to change notification settings - Fork 77
/
.travis.yml
142 lines (126 loc) · 3.68 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
language: cpp
# 18.04
dist: bionic
# - focal
os:
- linux
- osx
osx_image: xcode12
# we use travis container based infrastructure
# https://docs.travis-ci.com/user/installing-dependencies/#Installing-Packages-on-Container-Based-Infrastructure
# sudo: required
env:
matrix:
# - TRAVIS_NODE_VERSION="6"
#- TRAVIS_NODE_VERSION="6" ARCH="x86"
# - TRAVIS_NODE_VERSION="7"
#- TRAVIS_NODE_VERSION="7" ARCH="x86"
#- TRAVIS_ELECTRON_VERSION="1.4.14" TRAVIS_NODE_VERSION="6"
- TRAVIS_NODE_VERSION="8"
- TRAVIS_NODE_VERSION="9"
- TRAVIS_NODE_VERSION="10"
- TRAVIS_NODE_VERSION="11"
- TRAVIS_NODE_VERSION="12"
- TRAVIS_NODE_VERSION="13"
- TRAVIS_NODE_VERSION="14"
matrix:
exclude:
- os: osx
env: TRAVIS_NODE_VERSION="6"
- os: osx
env: TRAVIS_NODE_VERSION="6" ARCH="x86"
- os: osx
env: TRAVIS_NODE_VERSION="7"
- os: osx
env: TRAVIS_NODE_VERSION="8"
- os: osx
env: TRAVIS_NODE_VERSION="9"
#- os: osx
# env: TRAVIS_NODE_VERSION="7" ARCH="x86"
allow_failures:
- os: osx
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- g++
- libtbb2
- libtbb-dev
update: true
homebrew:
packages:
- tbb
- freetype
- opencascade
update: true
before_install:
- >
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
cat /etc/apt/sources.list
sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo apt-add-repository -y ppa:freecad-maintainers/freecad-daily
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends libocct-data-exchange-dev
fi
# reinstall latest nvm
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh
- nvm install $TRAVIS_NODE_VERSION
- PATH=$PATH:`pwd`/node_modules/.bin
- BASE_URL=$(node -p "'https://nodejs.org/dist/' + process.version")
- X86_FILE=$(node -p "'node-' + process.version + '-' + process.platform + '-x86'")
# download node if testing x86 architecture
- >
if [[ "$ARCH" == "x86" ]]; then
wget -q $BASE_URL/$X86_FILE.tar.gz
tar -xf $X86_FILE.tar.gz
export PATH=$X86_FILE/bin:$PATH
ls $X86_FILE/bin
echo " PATH =" $PATH
fi;
true;
# print versions
- uname -a
- file `which node`
- node --version
- node -p 'process.platform + "@" + process.arch'
- npm --version
# use g++ on linux
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++; fi
- $CXX --version
- npm install -g https://github.com/OpenWebCAD/node-pre-gyp-github.git node-pre-gyp
# compile Node-OCC
- bash ./prepare_node.sh
git:
submodules: false
install:
- npm install --build-from-source
script:
- >
if [[ -z $TRAVIS_ELECTRON_VERSION ]]; then
# export LD_LIBRARY_PATH=`pwd`/occt-7.2.0/lib
# export DYLD_LIBRARY_PATH=`pwd`/occt-7.2.0/lib
node ./
npm test
else
electron test_electron
electron_mocha test
fi;
true;
# if publishing, do it
# Figure out if we should publish
- PUBLISH_BINARY=false
# If we are building a tag then we need to publish a new binary package
- if [[ $TRAVIS_BRANCH == `git describe --tags --always HEAD` ]]; then PUBLISH_BINARY=true; fi;
# or if we put the string [publish binary] in the commit message
- if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then PUBLISH_BINARY=true; fi;
- if [[ $PUBLISH_BINARY == true ]]; then node-pre-gyp package; fi;
- if [[ $PUBLISH_BINARY == true ]]; then node-pre-gyp-github publish --release; fi;
# cleanup
- node-pre-gyp clean
cache:
directories:
- build_oce