forked from bitfocus/companion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (60 loc) · 1.8 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
matrix:
include:
- os: osx
osx_image: xcode8.3
language: node_js
node_js: "8"
- os: linux
services: docker
language: generic
branches:
only:
- master
env:
global:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
notifications:
slack: bitfocusio:Kf9NGYG60SzXkZ2tJO8wIknp
webhooks: https://webhook.bitfocus.io/travis
cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.npm/_prebuilds
- $HOME/.cache/snapcraft
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
before_install:
- curl -L https://yarnpkg.com/latest.tar.gz | tar xvz && mv yarn-v* $HOME/.yarn
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- ./tools/build_writefile.sh
script:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker run --rm \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
-v ~/.cache/snapcraft:/root/.cache/snapcraft \
haakonn/companion-build:2.0 \
/bin/bash -c "yarn update ; yarn lindist ; yarn test";
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install nasm cmake
yarn update
yarn dist
yarn test
fi
- ./tools/build_rename_git.sh
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
after_success:
- "if [[ \"$TRAVIS_OS_NAME\" == \"osx\" ]]; then curl -T electron-output/*.zip -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_IP/deploy/electron-output/ ; fi"
- "if [[ \"$TRAVIS_OS_NAME\" == \"linux\" ]]; then curl -T electron-linux-output/*.tar.gz -u $FTP_USER:$FTP_PASSWORD ftp://$FTP_IP/deploy/electron-linux-output/ ; fi"