forked from OpenGeoscience/geojs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
107 lines (97 loc) · 3.87 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
language: node_js
# At this time, the travis trusty sudo environment works, but the sudo: false
# environment doesn't (it might with a bunch of apt packages).
sudo: required
dist: xenial
node_js:
- 8
addons:
# version 55.0 - 57.x have an issue with screenshots.
# version 67.0 has an issue with touch events.
# firefox: 66.0.5
firefox: latest
# We can change to a specific version of Chrome later. Versions 68 - 70 have
# an issue with webgl fallback rendering.
chrome: stable
apt:
packages:
- optipng
cache:
directories:
- node_modules
- "$HOME/cache"
- "$TRAVIS_BUILD_DIR/_build/ExternalData"
before_install:
# Start xvfb with a specific resolution and pixel depth
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24"
- CACHE="${HOME}/cache" CMAKE_VERSION=3.5.0 CMAKE_SHORT_VERSION=3.5 source ./scripts/install_cmake.sh
- npm install -g npm@latest
# Prune the npm packages. If this fails for any reason, just remove them all
- npm prune || rm -r node_modules
# Get a specific version of Chrome.
# - CHROME_VERSION=67.0.3396.79
# - if ! [ -f "${HOME}/cache/chrome64_${CHROME_VERSION}.deb" ]; then curl -L "https://www.slimjet.com/chrome/download-chrome.php?file=lnx%2Fchrome64_${CHROME_VERSION}.deb" -o "${HOME}/cache/chrome64_${CHROME_VERSION}.deb"; fi
# - sudo dpkg -i "${HOME}/cache/chrome64_${CHROME_VERSION}.deb"
- google-chrome --version
install:
# travis moved to "npm ci", but that fails with canvas-prebuilt as it tries
# to install it before node-pre-gyp
- npm install
- npm list || true
# Install for the website build
- npm run setup-website
# Download and extract the glslangValidator tool
- curl -OL https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip
- unzip glslang-master-linux-Release.zip bin/glslangValidator
before_script:
- export DISPLAY=:99.0
script:
# Use the glslangValidator to validate all .frag and .vert files
- find . \( -name '*.frag' \) -exec sh -c 'for n; do python scripts/preprocess_glsl.py "$n" | bin/glslangValidator --stdin -S frag || exit 1; done' sh {} \+
- find . \( -name '*.vert' \) -exec sh -c 'for n; do python scripts/preprocess_glsl.py "$n" | bin/glslangValidator --stdin -S vert || exit 1; done' sh {} \+
- npm run build
- npm run docs
- mkdir -p _build
- ctest -S cmake/travis_build.cmake -VV || true
- if [ -f _build/test_failed ] ; then false ; fi
# Build the website to ensure that it will pass
- npm run build-website
after_failure:
# Upload test results. First make them smaller with optipng.
- pip install --user --upgrade girder-client requests[security] pyOpenSSL six
- find _build/images -name '*-test.png' -exec optipng {} \+ || true
- find _build/images -name '*-test.png' -exec python scripts/upload_travis_results.py {} \+ || true
# Upload build artifacts
- find dist/built -type f -exec python scripts/upload_travis_results.py {} \+ || true
after_success:
- npm run codecov
# Upload build artifacts
- pip install --user --upgrade girder-client requests[security] pyOpenSSL six
- find dist/built -type f -exec python scripts/upload_travis_results.py {} \+
deploy:
- provider: pages
local-dir: website/public
github-token: $GITHUB_TOKEN
skip-cleanup: true
on:
branch: master
- provider: releases
api_key: $GITHUB_TOKEN
file:
- dist/built/geo.js
- dist/built/geo.min.js
- dist/built/geo.lean.js
- dist/built/geo.lean.min.js
skip-cleanup: true
on:
tags: true
# We could emit artifacts on all branches rather than just master
branch: master
# all_branches: true
- provider: npm
api_key: $NPM_TOKEN
email: [email protected]
skip-cleanup: true
script: "npm publish"
on:
tags: true