Add qt5.7 on travis ci

This commit is contained in:
Konstantinos Sideris 2018-01-13 14:59:48 +02:00
parent f87b8fe817
commit d2962ec0b2
7 changed files with 89 additions and 35 deletions

30
.ci/install.sh Executable file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -ex
if [ $TRAVIS_OS_NAME == osx ]; then
brew update
brew install qt5 lmdb clang-format ninja
export CMAKE_PREFIX_PATH=/usr/local/opt/qt5
fi
if [ $TRAVIS_OS_NAME == linux ]; then
if [ -z "$QT_VERSION" ]; then
QT_VERSION="592"
fi
export QT_PKG=${QT_VERSION:0:2}
sudo add-apt-repository -y ppa:beineri/opt-qt${QT_VERSION}-trusty
sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
sudo apt-get update -qq
sudo apt-get install -qq -y \
qt${QT_PKG}base \
qt${QT_PKG}tools \
qt${QT_PKG}multimedia \
cmake \
liblmdb-dev
fi

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex
# #
# Create deb & rpm packages from the AppImage. # Create deb & rpm packages from the AppImage.
# #

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -ex
APP=nheko APP=nheko
DIR=${APP}.AppDir DIR=${APP}.AppDir

View file

@ -1,6 +0,0 @@
#!/usr/bin/env bash
sudo add-apt-repository -y ppa:beineri/opt-qt592-trusty
sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
sudo apt-get update -qq
sudo apt-get install -qq -y qt59base qt59tools cmake liblmdb-dev qt59multimedia

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -ex
TAG=`git tag -l --points-at HEAD` TAG=`git tag -l --points-at HEAD`

22
.ci/script.sh Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -ex
if [ $TRAVIS_OS_NAME == linux ]; then
QT_PKG=${QT_VERSION:0:2}
source /opt/qt${QT_PKG}/bin/qt${QT_PKG}-env.sh || true;
fi
make ci
if [ $TRAVIS_OS_NAME == osx ]; then
make lint;
if [ $DEPLOYMENT == 1 ] && [ ! -z $TRAVIS_TAG ]; then
make macos-deploy;
fi
fi
if [ $TRAVIS_OS_NAME == linux ] && [ $DEPLOYMENT == 1 ] && [ ! -z $TRAVIS_TAG ]; then
make linux-deploy;
fi

View file

@ -1,3 +1,5 @@
---
language: cpp language: cpp
sudo: required sudo: required
dist: trusty dist: trusty
@ -14,48 +16,52 @@ matrix:
osx_image: xcode9 osx_image: xcode9
compiler: clang compiler: clang
env: env:
- DEPLOYMENT=1 - DEPLOYMENT=1
- os: linux - os: linux
compiler: gcc compiler: gcc
env: env:
- CXX_COMPILER=g++-6 - CXX_COMPILER=g++-6
- C_COMPILER=gcc-6 - C_COMPILER=gcc-6
- DEPLOYMENT=1 - QT_VERSION=592
- DEPLOYMENT=1
addons: addons:
apt: apt:
sources: ["ubuntu-toolchain-r-test"] sources: ["ubuntu-toolchain-r-test"]
packages: ["g++-6", "ninja-build"] packages: ["g++-6", "ninja-build"]
- os: linux
compiler: gcc
env:
- CXX_COMPILER=g++-6
- C_COMPILER=gcc-6
- QT_VERSION=571
addons:
apt:
sources: ["ubuntu-toolchain-r-test"]
packages: ["g++-6", "ninja-build"]
- os: linux - os: linux
compiler: clang compiler: clang
env: env:
- CXX_COMPILER=clang++-5.0 - CXX_COMPILER=clang++-5.0
- C_COMPILER=clang-5.0 - C_COMPILER=clang-5.0
- QT_VERSION=592
addons: addons:
apt: apt:
sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"] sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"]
packages: ["clang-5.0", "ninja-build"] packages: ["clang-5.0", "ninja-build"]
before_install: before_install:
- export CXX=${CXX_COMPILER} - export CXX=${CXX_COMPILER}
- export CC=${C_COMPILER} - export CC=${C_COMPILER}
install: install:
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install qt5 lmdb clang-format ninja; fi - ./.ci/install.sh
- if [ $TRAVIS_OS_NAME == osx ]; then export CMAKE_PREFIX_PATH=/usr/local/opt/qt5; fi
- if [ $TRAVIS_OS_NAME == linux ]; then ./.ci/linux/install-deps.sh; fi
before_script:
- if [ $TRAVIS_OS_NAME == linux ]; then source /opt/qt59/bin/qt59-env.sh; fi
script: script:
- make ci - ./.ci/script.sh
- if [ $TRAVIS_OS_NAME == osx ]; then make lint; fi
- if [ $TRAVIS_OS_NAME == osx ] && [ $DEPLOYMENT == 1 ] && [ ! -z $TRAVIS_TAG ]; then make macos-deploy; fi
- if [ $TRAVIS_OS_NAME == linux ] && [ $DEPLOYMENT == 1 ] && [ ! -z $TRAVIS_TAG ]; then make linux-deploy; fi
before_deploy: before_deploy:
- export RELEASE_DEB_FILE=$(ls *.deb) - export RELEASE_DEB_FILE=$(ls *.deb)
- export RELEASE_RPM_FILE=$(ls *.rpm) - export RELEASE_RPM_FILE=$(ls *.rpm)
deploy: deploy:
- skip_cleanup: true - skip_cleanup: true
@ -65,9 +71,9 @@ deploy:
secure: oprXzESukFiXBeF2BXkXUlegsAQc95Ub4kc/OkoNFaYBvqpA+IGpWHmHCx5JPny/OT3Kc2Urpe2JUeGSWDHZ7UCKDjH+NzGP3uN82fHh/HiszG/Srw7+hWEHm1ve+gMK9GS8pr+yUsUrPP0UfVXlPoI4pBWa4zGi2Ndb/SqvjCgIHFLtGyoBo6CydKQ/AyWiXSMKDfJL+Dx4JLIPP4RTCBJy8ZrZ8m/a5Tgy4Ij6+djjrgYCZCEhGxSYw7xDIT/9SV8g9NkrbisqBDrILzAH8Yhe4XMRMXo88OAxV5+Vb9Rw1hrqczez6lpFDbJetv8MjofND+pSoAFwtjaL1wTFK9Ud6w4O9AuHlEQH9cGVdvsxFcosRwJVh58x51JM9ptoktqhx/HHJBTuCHCYYlHwtRwbwqnMYdLzKZG5FnujT8DG+9mcva1fL6tzW/XD505VPMWwXFC/2/pvolgAkTFFXYSALAwZlK3IgoXU8Gok/3B4iHofzQsFf6Yq3BI/88x7tVASUqiYhoKrO50+gb6pNIRCyWgGUiBEVXBp6Ziq3ORQPyQJg7i9HHUGTUu74yvGLHWLwjNQzZP/hxJZK3VlJxzyXntdOxiJc8iOzNrU+rPKBAlAaE6bQDOoniIysEgdD5BXHTLFzPvts4P1n2Ckor5/rNJ+qXR8GU+/y7e1GKU= secure: oprXzESukFiXBeF2BXkXUlegsAQc95Ub4kc/OkoNFaYBvqpA+IGpWHmHCx5JPny/OT3Kc2Urpe2JUeGSWDHZ7UCKDjH+NzGP3uN82fHh/HiszG/Srw7+hWEHm1ve+gMK9GS8pr+yUsUrPP0UfVXlPoI4pBWa4zGi2Ndb/SqvjCgIHFLtGyoBo6CydKQ/AyWiXSMKDfJL+Dx4JLIPP4RTCBJy8ZrZ8m/a5Tgy4Ij6+djjrgYCZCEhGxSYw7xDIT/9SV8g9NkrbisqBDrILzAH8Yhe4XMRMXo88OAxV5+Vb9Rw1hrqczez6lpFDbJetv8MjofND+pSoAFwtjaL1wTFK9Ud6w4O9AuHlEQH9cGVdvsxFcosRwJVh58x51JM9ptoktqhx/HHJBTuCHCYYlHwtRwbwqnMYdLzKZG5FnujT8DG+9mcva1fL6tzW/XD505VPMWwXFC/2/pvolgAkTFFXYSALAwZlK3IgoXU8Gok/3B4iHofzQsFf6Yq3BI/88x7tVASUqiYhoKrO50+gb6pNIRCyWgGUiBEVXBp6Ziq3ORQPyQJg7i9HHUGTUu74yvGLHWLwjNQzZP/hxJZK3VlJxzyXntdOxiJc8iOzNrU+rPKBAlAaE6bQDOoniIysEgdD5BXHTLFzPvts4P1n2Ckor5/rNJ+qXR8GU+/y7e1GKU=
file_glob: true file_glob: true
file: file:
- nheko-x86_64.AppImage - nheko-x86_64.AppImage
- $RELEASE_DEB_FILE - $RELEASE_DEB_FILE
- $RELEASE_RPM_FILE - $RELEASE_RPM_FILE
on: on:
condition: $TRAVIS_OS_NAME == linux && $DEPLOYMENT == 1 condition: $TRAVIS_OS_NAME == linux && $DEPLOYMENT == 1
repo: mujx/nheko repo: mujx/nheko