forked from supercollider/supercollider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
109 lines (98 loc) · 3.85 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
compiler:
- gcc
os:
- linux
- osx
sudo: required
dist: trusty
osx_image: xcode7.3
cache:
- apt
- bundler
before_install:
- ifmac () { if [[ $TRAVIS_OS_NAME == osx ]]; then eval $@; fi; }
- iflin () { if [[ $TRAVIS_OS_NAME == linux ]]; then eval $@; fi; }
- ifmac brew update
- ifmac brew tap homebrew/versions
- ifmac brew outdated cmake || brew upgrade cmake
- ifmac brew install qt55 libsndfile python || true
- ifmac brew link qt55 --force
- iflin sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
- iflin sudo add-apt-repository --yes ppa:beineri/opt-qt551-trusty
- iflin sudo apt-get update
- iflin sudo apt-get install --yes build-essential gcc-4.9 g++-4.9 cmake pkg-config qt55base qt55location qt55declarative qt55sensors qt55tools qt55webengine qt55webchannel qt55webkit qt55xmlpatterns libjack-jackd2-dev libsndfile1-dev libasound2-dev libavahi-client-dev libreadline6-dev libfftw3-dev libicu-dev libxt-dev libudev-dev
- iflin sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
- iflin sudo update-alternatives --auto gcc
before_script:
- iflin source /opt/qt55/bin/qt55-env.sh
- mkdir BUILD
- cd BUILD
- export QT_PREFIX=$HOME/qt/gcc_64
- export QT_PLUGIN_PATH=$QT_PREFIX/plugins
- export COMMIT_NAME=$TRAVIS_COMMIT
- ifmac cmake -G"Xcode" -DCMAKE_PREFIX_PATH=`brew --prefix qt55` -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 .. --debug-output
- iflin cmake -DSC_EL=no -DCMAKE_INSTALL_PREFIX:PATH=$PWD/Install -DCMAKE_BUILD_TYPE=Release .. --debug-output
# some paths
- ifmac export SCLANG=$TRAVIS_BUILD_DIR/BUILD/Install/SuperCollider/SuperCollider.app/Contents/MacOS/sclang
- iflin export SCLANG=$TRAVIS_BUILD_DIR/BUILD/Install/bin/sclang
# prep for testing
- sudo pip install git+https://github.com/scztt/qpm.git@qpm-unit
- qpm quark checkout CommonTests CommonTestsGUI --location $HOME/Quarks
- cp ../travis_test_run_proto.json ./travis_test_run.json
script:
# build
- iflin sudo make install
- ifmac cmake --build . --config Release --target install
# test
- $TRAVIS_BUILD_DIR/testsuite/sclang/launch_test.py $SCLANG
- qpm test.run -l ./travis_test_run.json --path $SCLANG --include $HOME/Quarks
# package
- ifmac mkdir -p $HOME/artifacts
- (ifmac cd Install; ifmac zip -q -r $HOME/artifacts/SC-$COMMIT_NAME.zip SuperCollider)
before_deploy:
# required for github releases
- git fetch --tags
- export BUILD_PREFIX=$TRAVIS_REPO_SLUG/$TRAVIS_OS_NAME
- export S3_BUILDS_LOCATION=builds/$BUILD_PREFIX
- export S3_URL=https://supercollider.s3.amazonaws.com/$S3_BUILDS_LOCATION/SC-$COMMIT_NAME.zip
- export FWD_HTML='<html><head><meta http-equiv="refresh" content="0; url='$S3_URL'" /></head></html>'
# put everything to be archived in artifacts/
- mkdir -p "$HOME/artifacts/${TRAVIS_BRANCH%/*}"
- mkdir -p "$HOME/artifacts/${TRAVIS_TAG%/*}"
- echo $FWD_HTML > $HOME/artifacts/$TRAVIS_BRANCH-latest.html
- 'if [[ $TRAVIS_TAG != "head" ]]; then echo $FWD_HTML > $HOME/artifacts/$TRAVIS_TAG.html; fi;'
deploy:
# s3 upload - every commit
- provider: s3
access_key_id: $AWS_KEY
secret_access_key: $AWS_SECRET
bucket: supercollider
local-dir: $HOME/artifacts
upload-dir: $S3_BUILDS_LOCATION
region: us-west-2
skip_cleanup: true
endpoint: s3-us-west-2.amazonaws.com
acl: public_read
on:
condition: $TRAVIS_OS_NAME = osx && ! -z $AWS_KEY && ! -z $AWS_SECRET
all_branches: true
# github releases - only tags
- provider: releases
api_key: $GITHUB_KEY
file: $HOME/artifacts/SC-$COMMIT_NAME.zip
prerelease: true
skip_cleanup: true
on:
condition: $TRAVIS_OS_NAME = osx && ! -z $GITHUB_KEY
tags: true
all_branches: true
after-deploy:
- "echo S3 Build Location: $S3_URL"
notifications:
on_success: change
on_failure: change
webhooks:
urls:
- https://webhooks.gitter.im/e/51b9b53ca50a7bfca97d
on_success: change
on_failure: always