1language: objective-c 2 3os: 4 - osx 5 6cache: 7 - apt 8 - bundler 9 10before_install: 11 - ifmac () { if [[ $TRAVIS_OS_NAME == osx ]]; then eval $@; fi; } 12 - iflin () { if [[ $TRAVIS_OS_NAME == linux ]]; then eval $@; fi; } 13 - ifmac brew install cmake || true 14 - iflin sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test 15 - iflin sudo add-apt-repository -y ppa:andykimpe/cmake # backport of cmake 2.8.12 16 - iflin sudo add-apt-repository -y ppa:ondrej/php5 # libicu-dev 52 17 - iflin sudo apt-get update 18 - iflin sudo apt-get install libicu-dev=52.1-1+debphp.org~precise+1 gcc-4.7 g++-4.7 aptitude build-essential libfftw3-dev libxt-dev pkg-config cmake=2.8.12.2-3 libstdc++5 19 - iflin sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 20 - iflin sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7 21 - iflin sudo update-alternatives --auto gcc 22 - git clone https://github.com/supercollider/supercollider.git 23 24before_script: 25 - mkdir BUILD 26 - cd BUILD 27 - cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/SC3plugins -DCMAKE_BUILD_TYPE=Release -DSC_PATH=../supercollider .. 28 29script: 30 - make install 31 - ifmac mkdir -p $HOME/artifacts 32 - ifmac zip -q -r $HOME/artifacts/Plugins-$TRAVIS_COMMIT.zip SC3plugins 33 34before_deploy: 35 # required for github releases 36 - git fetch --tags 37 - export BUILD_PREFIX=$TRAVIS_REPO_SLUG/$TRAVIS_OS_NAME 38 - export S3_BUILDS_LOCATION=builds/$BUILD_PREFIX 39 - export S3_URL=https://supercollider.s3.amazonaws.com/$S3_BUILDS_LOCATION/Plugins-$TRAVIS_COMMIT.zip 40 - export FWD_HTML='<html><head><meta http-equiv="refresh" content="0; url='$S3_URL'" /></head></html>' 41 # put everything to be archived in artifacts/ 42 - mkdir -p "$HOME/artifacts/${TRAVIS_BRANCH%/*}" 43 - mkdir -p "$HOME/artifacts/${TRAVIS_TAG%/*}" 44 - echo $FWD_HTML > $HOME/artifacts/$TRAVIS_BRANCH-latest.html 45 - 'if [[ $TRAVIS_TAG != "head" ]]; then echo $FWD_HTML > $HOME/artifacts/$TRAVIS_TAG.html; fi;' 46 47deploy: 48 # s3 upload - every commit 49 - provider: s3 50 access_key_id: $AWS_KEY 51 secret_access_key: $AWS_SECRET 52 bucket: supercollider 53 local-dir: $HOME/artifacts 54 upload-dir: $S3_BUILDS_LOCATION 55 region: us-west-2 56 skip_cleanup: true 57 endpoint: s3-us-west-2.amazonaws.com 58 acl: public_read 59 on: 60 condition: $TRAVIS_OS_NAME = osx && ! -z $AWS_KEY && ! -z $AWS_SECRET 61 all_branches: true 62# github releases - only tags 63 - provider: releases 64 api_key: $GITHUB_KEY 65 file: $HOME/artifacts/Plugins-$TRAVIS_COMMIT.zip 66 prerelease: true 67 skip_cleanup: true 68 on: 69 condition: $TRAVIS_OS_NAME = osx && ! -z $GITHUB_KEY 70 tags: true 71 all_branches: true 72after-deploy: 73 - "echo S3 Build Location: $S3_URL" 74 75 76notifications: 77 on_success: change 78 on_failure: change 79 webhooks: 80 urls: 81 - https://webhooks.gitter.im/e/51b9b53ca50a7bfca97d 82 on_success: change 83 on_failure: always 84