Skip to content

Commit

Permalink
CI: Make Qt available and discoverable
Browse files Browse the repository at this point in the history
To ensure our Qt-using code gets tested by our CI systems as well.
  • Loading branch information
konserw authored and muggenhor committed Aug 17, 2017
1 parent 42d3970 commit b2a0b0d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
15 changes: 8 additions & 7 deletions .travis.yml
@@ -1,6 +1,5 @@
language: cpp
os:
- osx
- linux
sudo: required
dist: trusty
Expand All @@ -12,15 +11,16 @@ env:
- GMOCK_VER=1.7.0
- GMOCK_PATH=/usr/src/gmock #1.6.0 from ubuntu trusty repo
matrix:
exclude:
- os: osx
env: GMOCK_PATH=/usr/src/gmock
- os: osx
compiler: gcc #does anyone on osx use it?
include:
- os: linux
compiler: gcc
env: GMOCK_VER=1.8.0 VALGRIND_TESTS=ON
- os: osx
compiler: clang
env: GMOCK_VER=1.8.0 QT_DIR=/usr/local/Cellar/qt5/5.8.0_1
- os: osx
compiler: clang
env: GMOCK_VER=1.7.0 QT_DIR=/usr/local/Cellar/qt5/5.8.0_1

addons:
apt:
Expand All @@ -35,9 +35,10 @@ addons:
- google-mock
- ninja-build
- valgrind
- qtbase5-dev

before_install:
- if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then brew update && brew install ninja; fi
- if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then brew update && brew install ninja qt5; fi

script: ./travis.sh

Expand Down
5 changes: 4 additions & 1 deletion appveyor.yml
Expand Up @@ -9,6 +9,7 @@ environment:
BOOST_LIBRARYDIR: C:\msys64\mingw32\lib
BOOST_INCLUDEDIR: C:\msys64\mingw32\include\boost
CMAKE_GENERATOR: 'MSYS Makefiles'
QT_DIR: C:\Qt\5.8\mingw53_32
- MINGW_ARCH: x86_64
MINGW_ROOT: C:\msys64\mingw64
BOOST_ROOT: C:\msys64\mingw64
Expand All @@ -20,11 +21,13 @@ environment:
BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib32-msvc-14.0
BOOST_INCLUDEDIR: C:\Libraries\boost_1_59_0\boost
CMAKE_GENERATOR: 'NMake Makefiles'
QT_DIR: C:\Qt\5.8\msvc2015
- MSVC_ARCH: x64
BOOST_ROOT: C:\Libraries\boost_1_59_0
BOOST_INCLUDEDIR: C:\Libraries\boost_1_59_0\boost
BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0
CMAKE_GENERATOR: 'NMake Makefiles'
QT_DIR: C:\Qt\5.8\msvc2015_64

install:
- git submodule init
Expand All @@ -38,7 +41,7 @@ install:

build_script:
- cmake -E make_directory build
- cmake -E chdir build cmake -G "%CMAKE_GENERATOR%" -DCUKE_ENABLE_EXAMPLES=ON -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_INCLUDEDIR="%BOOST_INCLUDEDIR%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" ..
- cmake -E chdir build cmake -G "%CMAKE_GENERATOR%" -DCUKE_ENABLE_EXAMPLES=ON -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_INCLUDEDIR="%BOOST_INCLUDEDIR%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" -DCMAKE_PREFIX_PATH="%QT_DIR%" ..
- cmake --build build

test_script:
Expand Down
2 changes: 2 additions & 0 deletions travis.sh
@@ -1,6 +1,7 @@
#!/bin/sh
set -e #break script on non-zero exitcode from any command
set -x #display command being executed

gem install bundler
bundle install

Expand All @@ -11,6 +12,7 @@ cmake -E make_directory build
cmake -E chdir build cmake \
-G Ninja \
-DCUKE_ENABLE_EXAMPLES=on \
${QT_DIR:+"-DCMAKE_PREFIX_PATH=${QT_DIR}"} \
${VALGRIND_TESTS:+"-DVALGRIND_TESTS=${VALGRIND_TESTS}"} \
${GMOCK_PATH:-"-DGMOCK_VER=${GMOCK_VER}"} \
${GMOCK_PATH:+"-DGMOCK_SRC_DIR=${GMOCK_PATH}"} \
Expand Down

0 comments on commit b2a0b0d

Please sign in to comment.