2014-04-25 18:57:00 +02:00
language : cpp
2017-04-09 10:30:38 +02:00
sudo : required
2014-04-25 18:57:00 +02:00
2015-08-17 17:14:29 +02:00
os :
2017-03-04 14:22:46 +01:00
- linux
#- osx
2015-08-17 17:14:29 +02:00
2017-06-04 20:42:06 +02:00
# osx_image: xcode6.4
2015-08-17 17:14:29 +02:00
2014-04-25 18:57:00 +02:00
compiler :
2017-03-04 14:22:46 +01:00
- clang
- gcc
2014-04-25 18:57:00 +02:00
2017-03-02 22:49:42 +01:00
cache :
ccache : true
directories :
- $HOME/hombebrew_cache
2015-08-17 17:14:29 +02:00
matrix :
2017-03-04 14:22:46 +01:00
exclude :
- os : osx
compiler : gcc
2015-08-17 17:14:29 +02:00
2014-07-09 21:16:17 +02:00
git :
2018-01-06 14:02:20 +01:00
depth : false # Unshallow clone to obtain proper GIT_VERSION
2014-07-09 21:16:17 +02:00
submodules : false
2018-02-28 00:27:32 +01:00
env :
- QTVER=5.10.1
2014-04-25 18:57:00 +02:00
before_install :
2015-08-17 17:14:29 +02:00
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" = "g++" ]; then
2016-01-03 19:31:00 +01:00
export CXX="g++-5" CC="gcc-5" CXXFLAGS="-Wno-format-security";
2015-04-09 18:53:10 +02:00
fi;
2018-02-28 00:27:32 +01:00
install :
2017-04-09 10:30:38 +02:00
# Install updated libglew-dev since the version provided by trusty is outdated
2015-08-17 17:14:29 +02:00
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
2018-01-18 21:56:32 +01:00
wget https://mirrors.kernel.org/ubuntu/pool/universe/g/glew/libglew-dev_2.0.0-5_amd64.deb;
wget https://mirrors.kernel.org/ubuntu/pool/universe/g/glew/libglew2.0_2.0.0-5_amd64.deb;
wget https://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan1_1.0.61.1+dfsg1-1ubuntu1~16.04.1_amd64.deb;
wget https://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan-dev_1.0.61.1+dfsg1-1ubuntu1~16.04.1_amd64.deb;
sudo dpkg -i libglew2.0_2.0.0-5_amd64.deb libglew-dev_2.0.0-5_amd64.deb libvulkan1_1.0.61.1+dfsg1-1ubuntu1~16.04.1_amd64.deb libvulkan-dev_1.0.61.1+dfsg1-1ubuntu1~16.04.1_amd64.deb;
2015-08-17 17:14:29 +02:00
else
2017-08-23 15:22:15 +02:00
brew update;
2017-06-04 20:42:06 +02:00
brew install ccache glew llvm40;
2015-08-17 17:14:29 +02:00
fi;
2014-04-25 18:57:00 +02:00
before_script :
2017-10-09 19:50:09 +02:00
- git submodule update --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal 3rdparty/hidapi 3rdparty/Optional Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers
2018-02-28 00:27:32 +01:00
- mkdir build ; cd build
- export CMAKE_PREFIX_PATH=~/Qt/${QTVER}/gcc_64/lib/cmake
2017-08-13 20:38:37 +02:00
- if [ "$TRAVIS_PULL_REQUEST" = false ]; then
export CXXFLAGS="$CXXFLAGS -DBRANCH=$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH";
else
export CXXFLAGS="$CXXFLAGS -DBRANCH=$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH/#$TRAVIS_PULL_REQUEST";
fi;
2018-03-15 17:22:05 +01:00
- cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DUSE_NATIVE_INSTRUCTIONS=OFF -G Ninja;
2018-02-28 00:27:32 +01:00
script :
2017-12-06 00:10:35 +01:00
- ninja
2018-02-28 00:27:32 +01:00
after_script :
- cd build
2017-06-04 20:42:06 +02:00
- # AppImage generation
2018-01-26 19:18:09 +01:00
- if [ -n "$UPLOAD_URL" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$CC" = "clang" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
2018-03-12 00:07:37 +01:00
source /opt/qt510/bin/qt510-env.sh ;
echo $LD_LIBRARY_PATH ;
export LD_LIBRARY_PATH=/opt/qt510/lib ;
2017-12-06 00:10:35 +01:00
DESTDIR=appdir ninja install ; find appdir/ ;
2017-06-04 21:52:57 +02:00
find ../bin ;
2017-12-20 20:10:00 +01:00
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" ;
2017-06-04 21:52:57 +02:00
chmod a+x linuxdeployqt*.AppImage ;
2018-02-28 00:27:32 +01:00
export PATH=~/Qt/$QTVER/gcc_64/bin/:${PATH} ;
2017-06-04 21:52:57 +02:00
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs ;
2018-01-27 04:56:32 +01:00
rm ./appdir/usr/lib/libfreetype.so.6 ;
2018-04-18 19:12:55 +02:00
rm ./appdir/usr/lib/libglapi.so.0 ;
rm -r ./appdir/usr/share/doc ;
rm -r ./appdir/usr/share/man ;
rm -r ./appdir/usr/include ;
2017-07-21 21:43:08 +02:00
export PATH=${TRAVIS_BUILD_DIR}/build/squashfs-root/usr/bin/:${PATH} ;
2018-04-04 23:24:44 +02:00
echo "Embed newer libstdc++ for distros that don't come with it (ubuntu 14.04)";
mkdir -p appdir/usr/optional/ ; mkdir -p appdir/usr/optional/libstdc++/ ;
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./appdir/usr/optional/libstdc++/ ;
rm ./appdir/AppRun ;
2018-04-12 10:20:47 +02:00
wget -c https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64 -O ./appdir/AppRun ;
2018-04-04 23:24:44 +02:00
chmod a+x ./appdir/AppRun ;
2018-04-12 10:20:47 +02:00
wget -c https://github.com/RPCS3/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so -O ./appdir/usr/optional/exec.so ;
2018-04-04 23:24:44 +02:00
2018-04-08 02:01:39 +02:00
echo "Package it up and send it off" ;
2018-04-04 23:24:44 +02:00
./linuxdeployqt*.AppImage --appimage-extract ;
2017-07-21 21:43:08 +02:00
./squashfs-root/usr/bin/appimagetool ${TRAVIS_BUILD_DIR}/build/appdir ;
2017-06-04 21:52:57 +02:00
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq ;
2018-02-24 20:54:58 +01:00
COMM_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))" ;
COMM_COUNT="$(git rev-list --count HEAD)" ;
2018-02-23 20:49:45 +01:00
curl "${UPLOAD_URL}${TRAVIS_COMMIT:0:8}&t=${COMM_TAG}&a=${COMM_COUNT}" --upload-file ./RPCS3*.AppImage;
2017-06-04 20:42:06 +02:00
fi;
2015-01-18 10:28:21 +01:00
addons :
2015-10-03 15:16:05 +02:00
apt :
sources :
2017-03-04 14:22:46 +01:00
- ubuntu-toolchain-r-test
2017-03-21 18:16:18 +01:00
- llvm-toolchain-trusty-4.0
2017-08-23 13:29:13 +02:00
- sourceline : 'ppa:jonathonf/binutils' # We need to update binutils to a newer version to link against the ffmpeg libs on.
2018-03-11 17:13:56 +01:00
- sourceline: 'ppa:beineri/opt-qt-5.10.1-trusty' # <<WARNING>> : This needs to be updated manually whenever the QT Version changes. Add QT PPA since the installer is quite bad.
2015-10-03 15:16:05 +02:00
packages :
2017-08-23 13:29:13 +02:00
- binutils
2017-03-04 14:22:46 +01:00
- cmake
2017-12-06 00:10:35 +01:00
- ninja-build
2017-04-09 14:59:19 +02:00
- libasound2-dev
2017-03-04 14:22:46 +01:00
- libopenal-dev
- freeglut3-dev
2017-04-09 10:30:38 +02:00
#- libglew-dev
2017-06-06 18:58:06 +02:00
#- libvulkan1
#- libvulkan-dev
2017-03-04 14:22:46 +01:00
- libc6-dev
2017-03-21 18:16:18 +01:00
- llvm-4.0
- llvm-4.0-dev
2018-01-26 19:18:09 +01:00
# Clang 5.0 is now bundled in travis, so we no longer need the ppa version.
#- clang-4.0
2017-03-04 14:22:46 +01:00
- libedit-dev
- g++-5
- gcc-5
- libstdc++-5-dev
- lib32stdc++6
- zlib1g-dev
2018-03-11 17:13:56 +01:00
# From the beineri PPA
- qt510-meta-minimal # <<WARNING>> : This needs to be updated manually whenever the QT Version changes.
2017-04-29 02:57:12 +02:00
- libudev-dev
2017-07-28 17:30:35 +02:00
- libevdev-dev
2017-08-28 18:10:27 +02:00
- libpulse-dev