forked from octalmage/robotjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (48 loc) · 1.31 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
sudo: false
language: cpp
os:
- linux
- osx
env:
matrix:
- TRAVIS_NODE_VERSION="stable"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libx11-dev
- zlib1g-dev
- libpng12-dev
- libxtst-dev
- g++-4.8
- gcc-4.8
before_install:
# 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
# print versions
- node --version
- npm --version
# use g++-4.8 on Linux
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
- $CXX --version
before_script:
# Start xvfb
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export DISPLAY=:99.0; fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
script:
- node --version
install:
- npm install
- npm install node-gyp -g
- node-gyp rebuild --runtime=electron --target=1.4.8 --disturl=https://atom.io/download/atom-shell --abi=48
- mv build/Release/robotjs.node build/Release/robotjs-$TRAVIS_OS_NAME.node
deploy:
provider: releases
api_key: "$GITHUB_API_KEY"
file: "build/Release/robotjs-$TRAVIS_OS_NAME.node"
skip_cleanup: true
on:
tags: true