forked from microsoft/vscode-arduino
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
80 lines (71 loc) · 2.07 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
language: node_js
node_js:
- '11'
os:
- linux
- osx
dist: trusty # using Ubuntu 14.04.5 LTS
# fixing https://github.com/Microsoft/vscode/issues/33998
addons:
apt:
sources:
# https://docs.travis-ci.com/user/languages/c/#GCC-on-Linux
- ubuntu-toolchain-r-test
packages:
- libsecret-1-dev
- g++-4.9
branches:
only:
- master
- /v?[0-9]+\.[0-9]+\.[0-9]+(.*)?/
env:
global:
- ISPRODTAG=^v?[0-9]+\.[0-9]+\.[0-9]+$
before_install:
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
wget https://downloads.arduino.cc/arduino-1.8.2-linux64.tar.xz -P /home/$USER;
tar -xvf /home/$USER/arduino-1.8.2-linux64.tar.xz -C /home/$USER/;
sudo ln -s /home/$USER/arduino-1.8.2/arduino /usr/bin/arduino;
fi
# Arduino 1.8.7 has breaking change, Install board package and library will fail
# https://github.com/arduino/Arduino/issues/8034
# Arduino 1.8.8 has fixed issue 8034.
- if [ $TRAVIS_OS_NAME == "osx" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
brew cask install arduino;
fi
install:
- npm install -g vsce
- npm install -g typescript
- npm install -g gulp
- npm install
# https://github.com/travis-ci/travis-ci/issues/8813
- rm -f ./node_modules/.bin/which
script:
- gulp tslint
- gulp genAikey
- vsce package
- npm test --silent
deploy:
# deploy to github release
- provider: releases
api_key: $GIT_TOKEN
file_glob: true
file: "*.vsix"
skip_cleanup: true
on:
tags: true
all_branches: true
condition: "$TRAVIS_OS_NAME == linux"
# deploy to vscode extension market
- provider: script
script: vsce publish -p $VSCE_TOKEN --packagePath *.vsix
skip_cleanup: true
on:
tags: true
all_branches: true
# if it's a PROD tag (something like 1.0.0), then publish extension to market.
condition: "$TRAVIS_OS_NAME == linux && $TRAVIS_TAG =~ $ISPRODTAG"