forked from ActivityWatch/activitywatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
113 lines (105 loc) · 4.6 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
os: linux
dist: trusty
language: python
python: 3.6
env:
- TRAVIS_NODE_VERSION=8
services:
- mongodb
matrix:
include:
- os: linux
python: 3.6
env:
- DEPLOY=true
- TRAVIS_NODE_VERSION=8
- os: osx
osx_image: xcode10.1
language: generic
python: null
env:
- DEPLOY=true
- TRAVIS_NODE_VERSION=8
- os: windows
language: sh
python: 3.6.8
env:
- DEPLOY=false # set to true when tested and AppVeyor is deprecated
- TRAVIS_NODE_VERSION=8
- TRAVIS_PYTHON_VERSION=3.6.8
before_install:
# Windows:
# - Enable long paths
# - Install Python
# - Install node/npm using nvs
# - Install make
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
./scripts/ci/enable_long_paths.bat;
choco install -y python --version=$TRAVIS_PYTHON_VERSION;
cp /c/Python36/python.exe /c/Python36/python3.exe;
export PATH="/c/Python36:/c/Python36/Scripts:$PATH";
export NVS_HOME="C:\ProgramData\nvs";
git clone --single-branch https://github.com/jasongin/nvs $NVS_HOME;
source $NVS_HOME/nvs.sh;
export PATH="./node_modules/.bin:$PATH";
nvs add node/$TRAVIS_NODE_VERSION;
nvs use node/$TRAVIS_NODE_VERSION;
choco install -y make;
fi
# macOS:
# - Install Python 3.7.2
# - Install node using nvm
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew unlink python;
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/8de2c2b06a030b9f9a137f16481ed6c84512240c/Formula/python.rb;
brew install findutils;
export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH";
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;
fi
# Linux:
# - Install nvm and use correct node version
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
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;
fi
# Upgrade pip
- python3 -m pip install --upgrade pip wheel;
# Print version used
- python3 --version
- pip3 --version
- node --version
- npm --version
install:
- pip3 install --upgrade -r scripts/dev-requirements.txt
# Output something every 10 minutes or Travis kills the job if building takes more than 20min without output (as pip seems to on Windows when installing aw-server)
- while sleep 9m; do echo "=====[ $SECONDS seconds still running ]====="; done &
- make build
- kill %1 # Killing background sleep loop
- "make install"
script:
- "make test"
- "make test-integration"
- "make package"
before_deploy:
# Remove the folder from which the zip was created
- find dist/ -type f | grep -v "activitywatch-[^/]*" | xargs --no-run-if-empty rm -r
deploy:
- provider: releases
skip_cleanup: true
file_glob: true
file: dist/activitywatch-*.*
api_key:
secure: PSkaHT7bhmCBFutBhfIyHd/j784e0bgzVrahA9+IrEZQqHmJzGvkytf4mQ+EWz0lYDX/Jko7aIFfuCQ8yoVNnnwCu8SwTKXcwrkwuJrymupIK+Xxau6C4rMBLK81mphZs8t2YjJK720EquZ54Tt5Y79Dh2tk9ZxdgqWgVLVhhZziD2/I5BfpsqRgCFqZc4UKAOAf5jpe1lgCOz4zkLP3vgQUyIJgkc9A1BT01f5v860hAlH8HchBAlIMklzPJt3ps9ch8dLRtCC3ZQRWIQpNGjw10P4BO3DqjF4ASeo0ZtbLGIFZeWnnAbQxRIztPUqiYnTQckvHcHYAKG8cyO8SBKQj1au5FRTCHbafpOOzLDWkXx+fqaYakxmPlW6YGp+zaiDQsmNCIdCWWsFU8+gUgZL8Owf4eYc2LI4LW7SI/RC7HjllqNP8WVbZSbQRcvQrK9ZN6fiOixTLni2cXyKy6SxVaDd/+iji8YwPW8JrOawTsXIoZRDE6vq41Y47tO/MU9yLm8RkRkApBGgsc+5RJCEEiDyghJ3op+rWIavcMmSZQ3TBo5e00XyPBd7dGkxoLk9WUSuaZgTmi7FSfDDxWW9TiE7tP2ruIV4fcAlOOkM5ll3K6XIo61JM0JAuAKsg7g32lOnr2DEGDk8XlV3QqIEzwjXLjdVrk3ALabp8HjI=
on:
tags: true
condition: $DEPLOY = true
- provider: s3
skip_cleanup: true
access_key_id: AKIAIISX5RJFA4X23TTA
secret_access_key:
secure: RMrCpX6HsOlRwU3DW8kycQZKvlMy12jGZ2PY6mtyjRAy4S8ddq1FA42KlHnvCRxqwjBp7WBbINoczAiNUfoT62oa8/csSTO2WkD2XxRfIEjrY/NSBrz4lQBnQ9RENez4DBr0HsLSUwWt1ySN1O7cs+RC2Cz/i9+5qpMzU1gQgZYYBB77p4GR/S6HHDIbMO7c9IjhOHQp3p7d4evyvZ9+Oq1uncgKdzl5Qnl/xov6w8F6Yi0Tpe1q1l5UftpQmq6k1PgKQPTIv61r2mWCEAW77LeJaQvJeKY/UfXPecWHS6SriFQqraAtbSokD7juYwiddQ2niJ3q2zLTQBTt5paA+0lYe9Vwv0wQqAThUCnpBfPGTmowTeyW1zkoPLLEGPiRzVlwO6cV5jaModn54Jp210k301SuxS8CG9QbGOLJPplsLWx/+SX225aggpUqYd6YLkqrb/ikPfmrUeaM25ctVz7QoMzM8VuurcVgkNLQKbZvHutVNM056vuZqTKBNUsHwS0CPYwL9R0+z0Kz+7Pm9XS0jtnDl7fUcBUD7EVgimweAodEDrjbweDbvZN+0kiGcSjlARwhIQ1X3zUPqb/R1SfXZOk1/Koe48UScnpWZEFItga1ftF+OfGX7mitzN5FcX7SfBUzSuu0C8zouYRct+zfmfnBbGkOy3igVaGg7oY=
bucket: activitywatch-builds
local-dir: dist
acl: public_read
on:
condition: $DEPLOY = true