-
Notifications
You must be signed in to change notification settings - Fork 111
/
.travis.yml
118 lines (105 loc) · 4.63 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
114
115
116
117
118
language: ruby
rvm:
- 2.3.7
# language: python
# python:
# - "2.7"
os: osx
env: OSX=10.12
osx_image: xcode8.3
sudo: required
branches:
except:
- circleci
# /usr/local subdirs are Homebrew components
# cache:
# directories:
# - $HOME/Library/Caches/pip
# - /usr/local/Cellar
# - /usr/local/Frameworks
# - /usr/local/Homebrew
# - /usr/local/bin
# - /usr/local/etc
# - /usr/local/include
# - /usr/local/lib
# - /usr/local/opt
# - /usr/local/share
# - /usr/local/var
# timeout: 900
# before_cache:
# - ./travis/before_cache.sh
addons:
ssh_known_hosts: github.com
before_install:
- gem update --system
- gem install bundler
- export GH_USER=$(echo -n "${TRAVIS_REPO_SLUG}" | egrep -o '^[^/]+' | tr -d '\n')
- export TRAVIS_COMMIT="$(git rev-parse --verify -q HEAD)"
- export CHANGED_FORMULAE=$(./travis/changed_formulas.sh)
- if [ "${CHANGED_FORMULAE}" == "" ]; then
echo "Skipping CI; no changed formulae found in $TRAVIS_BUILD_DIR";
exit 0 || true;
travis_terminate 0;
exit 1;
else
echo "Changed formulae are ${CHANGED_FORMULAE}";
fi
- if [ "${CHANGED_FORMULAE}" == "osgeo-qt-webkit" ] || [ "${CHANGED_FORMULAE}" == "osgeo-qgis" ] || [ "${CHANGED_FORMULAE}" == "osgeo-qgis-ltr" ]|| [ "${CHANGED_FORMULAE}" == "osgeo-vtk" ]|| [ "${CHANGED_FORMULAE}" == "osgeo-insighttoolkit" ]; then
echo "Skipping CI; These formulas exceed the time limit in Travis CI.";
exit 0 || true;
travis_terminate 0;
exit 1;
fi
- export HOMEBREW_REPOSITORY="$(brew --repo)"
- sudo chown -R "$USER":admin "${HOMEBREW_REPOSITORY}"
- git -C "${HOMEBREW_REPOSITORY}" reset --hard origin/master
- mkdir -p "${HOMEBREW_REPOSITORY}/Library/Taps/${GH_USER}"
- ln -s "$TRAVIS_BUILD_DIR" "${HOMEBREW_REPOSITORY}/Library/Taps/${TRAVIS_REPO_SLUG}"
- cd "${HOMEBREW_REPOSITORY}/Library/Taps/${TRAVIS_REPO_SLUG}"
- chmod -f 0644 ${HOMEBREW_REPOSITORY}/Library/Taps/${TRAVIS_REPO_SLUG}/Formula/*.rb
- export TRAVIS_BUILD_DIR="${HOMEBREW_REPOSITORY}/Library/Taps/${TRAVIS_REPO_SLUG}"
- export HOMEBREW_DEVELOPER=1
- export HOMEBREW_NO_AUTO_UPDATE=1
- export HOMEBREW_PREFIX=$(brew --prefix)
- ulimit -n 1024
- ./travis/before_install.sh
install: ./travis/install.sh
# before_script: ./travis/before_script.sh
script: ./travis/script.sh
after_script: ./travis/after_script.sh
before_deploy:
# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
# Decrypt the travis_deploy_key.enc key into /tmp/travis_deploy_key
- openssl aes-256-cbc -K $encrypted_key -iv $encrypted_iv -in travis_deploy_key.enc -out /tmp/travis_deploy_key -d
# Make sure only the current user can read the private key
- chmod 600 /tmp/travis_deploy_key
# Create a script to return the passphrase environment variable to ssh-add
- echo 'echo ${SSH_PASSPHRASE}' > /tmp/askpass && chmod +x /tmp/askpass
# Start the authentication agent
- eval "$(ssh-agent -s)"
# Add the key to the authentication agent
- brew install util-linux # for setsid
- DISPLAY=":0.0" SSH_ASKPASS="/tmp/askpass" setsid ssh-add /tmp/travis_deploy_key </dev/null
# add changes
- ./travis/before_deploy.sh
# is disabled to use Circle CI
# deploy:
# skip_cleanup: true
# provider: bintray
# file: travis/bintray-upload.json
# user: nickrobison
# key:
# secure: "nEmP/uU8N+TbbX3zWED62CsjPxoDjXcOF3RtAENW/4qVBdI9r7dFmyE4WAW732Ttd1PbANPz7Lz494j2TS2hbn2R4yQ9CuIllsnjey/ve6TAq1FfYSruBuMGLK/7EJ/cSfZWsOBex7b68UeVlvyAra3ck6y9j1ouzF9RKEtCx3P/w3heLN5Fl0pNUCzwknrdBFGfTQRy8NSQnYo/8mpIQbCrXEQThJ4PZY/7s5tqDOv3tAesPTdoGmoNWWBoQe8ZnrwSutskcm6Nsf5nz64i44vai9Xx+9U3QpHDvzuAXOzwxFBGk1dfsnLRp/P71QrDYuqnMEExmfdZAWYK0o0JLuwsecOfSvG2C14fAp1rA2GNWMK9SViYxeYnJgwenGgd7FBci6N052mvyv3+52xGc7aHUlp74PvqYEv8LoILdOlG9jGj1jS41seQyW7Qyg6VYfQ+f1Vp4kUupH3EE53QgJzM6rVyFI9qmkThJTN0ZhUzIhwrTqUfceMkWyeYKd7/hk6AUxhYNZehtR7xH8pf1vibLifUr978M4vyutSwJ4xnaJKTvuUdA0d2GQHAuEDwfqPlYcIUDbKOVmbKj+SifKdSlcwGTYunzmKkJskA9DzYIbUjKe00jluAvjGZuoCIbIKdqlH1ntTUoW5OCpE09TmIZdh/SURRKo7QsfLNQ0I="
# # S3 bucket upload, which is not working right now
# # provider: s3
# # access_key_id:
# # secure: JxG4/zxgbYvKqX4kJTZdQxvAL+EHqmmi4OEjAOY+KUFAP4t9l5aLEYh6brjHF07kDyFyjMt8G7Hf+SZeznA/JGe8NaliXfCnxLH7ftApCP3l/Tl73z3wXnGL1L7EljiO0EbwlsJUM23B+01BMalzBfyLYOEc61LfSuJsEFFa/ck=
# # secret_access_key:
# # secure: ZdsR1FsY6ER6w6KvF9rjxY4s7GjLXRkT9Rmv4GWyL9+pcHI/4/2KMfab6gj1sQdbc2ocfBgGXR8hQZHi+NZPyTnHbIXf5n2YenLo9NyOHwNs1qiJgxXgtYvhtI/NXCcD9JgX5i5BRR3jkPqJBRe70CmoTwv29kR5Tp158tr3gIg=
# # bucket: osgeo4mac
# # local-dir: bottles
# # upload-dir: bottles
# # acl: public_read
# on:
# branch: master
# repo: OSGeo/homebrew-osgeo4mac