/
travisciinstall
executable file
·42 lines (37 loc) · 2.32 KB
/
travisciinstall
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
#!/bin/sh
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
docker pull ubuntu:16.04 \
&& docker run --name travis-ci -v $TRAVIS_BUILD_DIR:/iqrfsdk -td ubuntu:16.04 /bin/bash \
&& docker exec -ti travis-ci bash -c " apt -y --force-yes -qq update \
&& apt -y --force-yes install software-properties-common \
&& apt-add-repository -y ppa:beineri/opt-qt562-xenial \
&& apt -y --force-yes -qq update \
&& apt -y --force-yes -qq install cmake g++-5 git libgl1-mesa-dev libglu1-mesa-dev ninja-build \
&& apt -y --force-yes -qq install qt56location qt56multimedia qt56sensors qt56svg qt56tools qt56webchannel \
&& cd /usr/bin \
&& ln -s g++-5 g++"
if [ $? = 0 ]; then
# Do a few things that are done by Travis CI when not using Docker
docker exec -ti travis-ci bash -c " export CONFIG=${CONFIG} \
&& export CC=gcc \
&& export CXX=g++"
if [ $? = 0 ]; then
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
docker exec -ti travis-ci bash -c " git clone --depth=50 --branch=master https://github.com/opencor/opencor.git opencor \
&& cd opencor \
&& git checkout -qf ${TRAVIS_COMMIT}"
else
docker exec -ti travis-ci bash -c " git clone --depth=50 https://github.com/opencor/opencor.git opencor \
&& cd opencor \
&& git fetch origin +refs/pull/${TRAVIS_PULL_REQUEST}/merge \
&& git checkout -qf FETCH_HEAD"
fi
fi
fi
else
brew update \
&& curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/106d0878ee812cb8f5c403f717bdebe836445aee/Formula/qt5.rb \
&& brew install ./qt5.rb ninja \
&& export OPENSSL_ROOT_DIR=/usr/local/opt/openssl \
&& chmod -R 755 /usr/local/opt/qt5/*
fi