forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (57 loc) · 1.88 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
language: ruby
matrix:
include:
- env: OSX=10.11
os: osx
osx_image: xcode7.3
rvm: system
- os: linux
rvm: system
services: docker
sudo: required
allow_failures:
- os: linux
before_install:
- if [ -f ".git/shallow" ]; then
travis_retry git fetch --unshallow;
fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
sudo chown -R "$USER" "$(brew --repo)";
git -C "$(brew --repo)" reset --hard origin/master;
git -C "$(brew --repo)" clean -qxdff;
brew update || brew update;
brew tap homebrew/python homebrew/x11 homebrew/dupes homebrew/versions;
mkdir -p "$(brew --repo)/Library/Taps/homebrew";
ln -s "$TRAVIS_BUILD_DIR" "$(brew --repo)/Library/Taps/homebrew/homebrew-science";
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-science";
export TRAVIS_BUILD_DIR="$(brew --repo)/Library/Taps/homebrew/homebrew-science";
fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
docker pull linuxbrew/linuxbrew;
docker run
-v $(pwd):/home/linuxbrew/homebrew-science
linuxbrew/linuxbrew
/bin/sh -c 'brew tap homebrew/python homebrew/x11 homebrew/dupes homebrew/versions && brew update && cp -rf ~/homebrew-science $(brew --repo)/Library/Taps/homebrew/homebrew-science';
docker commit $(docker ps -l -q) linuxbrew;
fi
- env | grep TRAVIS | tee /tmp/travis.env
install:
- export HOMEBREW_DEVELOPER="1"
- ulimit -n 1024
script:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew test-bot --tap=homebrew/science;
else
docker run
-w /home/linuxbrew/.linuxbrew/Library/Taps/homebrew/homebrew-science
--env-file /tmp/travis.env
-e HOMEBREW_DEVELOPER=1
-e HOMEBREW_NO_AUTO_UPDATE=1
-t
linuxbrew
brew test-bot --tap=homebrew/science;
fi
notifications:
email:
on_success: never
on_failure: always