Debian Codegraph @

build/travis/job1_Tests/environment.sh

raw
1 #!/bin/bash (This file should be sourced rather than executed.)
2 # Sourcing allows environment variables to be used outside the script, but other
3 # changes also persist. (If you change directory then remember to change back!)
4
5 if [ "$(basename "$0")" == "environment.sh" ]; then
6 echo "$0 was executed but it should have been sourced."
7 exit 1
8 fi
9
10 initial_dir="${PWD}"
11 set -e # exit on error
12 set -x # echo commands
13
14 # Set compilers
15 export CC=/usr/bin/gcc-4.9
16 export CXX=/usr/bin/g++-4.9
17
18 # Get Qt
19 mkdir qt5
20 wget -q -O qt5.zip http://utils.musescore.org.s3.amazonaws.com/qt542.zip
21 unzip -qq qt5.zip -d qt5
22 export PATH="${PWD}/qt5/bin:$PATH"
23 export QT_PLUGIN_PATH="${PWD}/qt5/plugins"
24 export QML2_IMPORT_PATH="${PWD}/qt5/qml"
25
26 # Setup install destination
27 mkdir "$HOME/software"
28 export PATH="$PATH:$HOME/bin:$HOME/software/bin"
29
30 # Prepare for post-install upload of artefacts to S3
31 export TRAVIS_SHORT_COMMIT="$(echo $TRAVIS_COMMIT | cut -c 1-8)"
32 export ARTIFACTS_TARGET_PATHS="$TRAVIS_SHORT_COMMIT"
33 export ARTIFACTS_PERMISSIONS=public-read
34 export TRAVIS_BUILD_DIR=vtest/html
35 #compatibility between ruby travis artefact and GO one
36 export ARTIFACTS_KEY=$ARTIFACTS_AWS_ACCESS_KEY_ID
37 export ARTIFACTS_SECRET=$ARTIFACTS_AWS_SECRET_ACCESS_KEY
38 artifacts -v || curl -sL https://raw.githubusercontent.com/meatballhat/artifacts/master/install | bash
39
40 # IMPORTANT: Must now return shell to it's initial state:
41 set +x
42 set +e
43 cd "${initial_dir}"