Merge pull request #1917 from lioncash/ci
CI: Use Qt 5 and GCC 6 on Ubuntu CI builds
This commit is contained in:
commit
0473b59256
|
@ -11,12 +11,12 @@ fi
|
||||||
|
|
||||||
#if OS is linux or is not set
|
#if OS is linux or is not set
|
||||||
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
||||||
export CC=gcc-5
|
export CC=gcc-6
|
||||||
export CXX=g++-5
|
export CXX=g++-6
|
||||||
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
|
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||||
|
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -DCITRA_FORCE_QT4=ON ..
|
cmake ..
|
||||||
make -j4
|
make -j4
|
||||||
|
|
||||||
ctest -VV -C Release
|
ctest -VV -C Release
|
||||||
|
|
|
@ -5,8 +5,8 @@ set -x
|
||||||
|
|
||||||
#if OS is linux or is not set
|
#if OS is linux or is not set
|
||||||
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
|
||||||
export CC=gcc-5
|
export CC=gcc-6
|
||||||
export CXX=g++-5
|
export CXX=g++-6
|
||||||
mkdir -p $HOME/.local
|
mkdir -p $HOME/.local
|
||||||
|
|
||||||
curl -L http://www.cmake.org/files/v3.1/cmake-3.1.0-Linux-i386.tar.gz \
|
curl -L http://www.cmake.org/files/v3.1/cmake-3.1.0-Linux-i386.tar.gz \
|
||||||
|
|
20
.travis.yml
20
.travis.yml
|
@ -1,22 +1,26 @@
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
sudo: true
|
||||||
|
dist: trusty
|
||||||
|
- os: osx
|
||||||
|
sudo: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- secure: "AXHFIafTmbGDsHD3mUVj5a4I397DQjti/WoqAJGUp2PglxTcc04BwxZ9Z+xLuf5N2Hs5r9ojAJLT8OGxJCLBDXzneQTNSqXbFuYSLbqrEAiIRlA9eRIotWCg+wYcO+5e8MKX+cHVKwiIWasUB21AtCdq6msh6Y3pUshZp212VPg="
|
- secure: "AXHFIafTmbGDsHD3mUVj5a4I397DQjti/WoqAJGUp2PglxTcc04BwxZ9Z+xLuf5N2Hs5r9ojAJLT8OGxJCLBDXzneQTNSqXbFuYSLbqrEAiIRlA9eRIotWCg+wYcO+5e8MKX+cHVKwiIWasUB21AtCdq6msh6Y3pUshZp212VPg="
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
packages:
|
packages:
|
||||||
- gcc-5
|
- gcc-6
|
||||||
- g++-5
|
- g++-6
|
||||||
|
- qt5-default
|
||||||
|
- libqt5opengl5-dev
|
||||||
- xorg-dev
|
- xorg-dev
|
||||||
- lib32stdc++6 # For CMake
|
- lib32stdc++6 # For CMake
|
||||||
- lftp # To upload builds
|
- lftp # To upload builds
|
||||||
|
|
|
@ -40,7 +40,6 @@ option(CITRA_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" OFF)
|
||||||
|
|
||||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
option(ENABLE_QT "Enable the Qt frontend" ON)
|
||||||
option(CITRA_USE_BUNDLED_QT "Download bundled Qt binaries" OFF)
|
option(CITRA_USE_BUNDLED_QT "Download bundled Qt binaries" OFF)
|
||||||
option(CITRA_FORCE_QT4 "Use Qt4 even if Qt5 is available." OFF)
|
|
||||||
|
|
||||||
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit)
|
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit)
|
||||||
message(STATUS "Copying pre-commit hook")
|
message(STATUS "Copying pre-commit hook")
|
||||||
|
@ -201,18 +200,10 @@ if (ENABLE_QT)
|
||||||
set(QT_PREFIX_HINT)
|
set(QT_PREFIX_HINT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT CITRA_FORCE_QT4)
|
find_package(Qt5 REQUIRED COMPONENTS Widgets OpenGL ${QT_PREFIX_HINT})
|
||||||
find_package(Qt5 COMPONENTS Widgets OpenGL ${QT_PREFIX_HINT})
|
|
||||||
set(CITRA_QT_LIBS Qt5::Widgets Qt5::OpenGL)
|
set(CITRA_QT_LIBS Qt5::Widgets Qt5::OpenGL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CITRA_FORCE_QT4 OR NOT Qt5_FOUND)
|
|
||||||
# Try to fallback to Qt4
|
|
||||||
find_package(Qt4 REQUIRED COMPONENTS QtGui QtOpenGL ${QT_PREFIX_HINT})
|
|
||||||
set(CITRA_QT_LIBS Qt4::QtGui Qt4::QtOpenGL)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# This function should be passed a list of all files in a target. It will automatically generate
|
# This function should be passed a list of all files in a target. It will automatically generate
|
||||||
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
|
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
|
||||||
# one in the filesystem.
|
# one in the filesystem.
|
||||||
|
|
Loading…
Reference in a new issue