Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
run spelling and indentation test on another Travis build (#4180)
  • Loading branch information
3nids committed Feb 23, 2017
1 parent 6b93cf5 commit ccfbaf8
Show file tree
Hide file tree
Showing 10 changed files with 129 additions and 12 deletions.
39 changes: 29 additions & 10 deletions .travis.yml
Expand Up @@ -8,6 +8,7 @@ matrix:
- BUILD=qt5
- QT_VERSION=5
- LLVM_VERSION=3.8
- TRAVIS_CONFIG=linux
sudo: false
cache:
apt: true
Expand All @@ -21,10 +22,8 @@ matrix:
apt:
sources:
- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # doxygen 1.8.3
- sourceline: 'ppa:nomeata/travis-backports'
# - laurent-boulard-devtools (for silver-search, not whitelisted yet https://github.com/travis-ci/apt-source-whitelist/pull/345)
- ubuntu-toolchain-r-test
packages:
- doxygen
- bison
Expand All @@ -34,14 +33,34 @@ matrix:
- libfcgi-dev
- libfftw3-3
- pkg-config
- perl # lookahead regex in spell check script
- poppler-utils
- txt2tags
- xvfb
- flip
- clang-3.8


- os: linux
language: python # This lets us use newer python versions from virtualenv
env:
- TRAVIS_CONFIG=code_layout
dist: trusty
sudo: false
cache:
apt: true
#compiler: clang
#python: "3.3"
addons:
apt:
sources:
- sourceline: 'ppa:jonathonf/backports' # silversearcher-ag backport
packages:
- pkg-config
- xvfb
- flip
# used for spell checks
# - silversearcher-ag not available in precise nor in a white listed ppa (in osgeo4travis as for now)
- perl # lookahead regex in spell check script
- silversearcher-ag
- expect-dev # unbuffer
- coreutils
# OSX based build with QT4 and Python 2
Expand Down Expand Up @@ -69,16 +88,16 @@ notifications:
on_start: never # default: never

before_install:
- ./ci/travis/${TRAVIS_OS_NAME}/before_install.sh
- ./ci/travis/${TRAVIS_CONFIG}/before_install.sh

install:
- ./ci/travis/${TRAVIS_OS_NAME}/install.sh
- ./ci/travis/${TRAVIS_CONFIG}/install.sh

before_script:
- ./ci/travis/${TRAVIS_OS_NAME}/before_script.sh
- ./ci/travis/${TRAVIS_CONFIG}/before_script.sh

script:
- ./ci/travis/${TRAVIS_OS_NAME}/script.sh
- ./ci/travis/${TRAVIS_CONFIG}/script.sh

after_script:
- ./ci/travis/${TRAVIS_OS_NAME}/after_script.sh
- ./ci/travis/${TRAVIS_CONFIG}/after_script.sh
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -505,7 +505,7 @@ ELSE (WIN32)
SET (QGIS_PLUGIN_SUBDIR_REV ../../MacOS)
SET (DEFAULT_INCLUDE_SUBDIR include/qgis)

# Set server moodules path to DEFAULT_LIBEXEC_SUBDIR+'/server'
# Set server moodules path to DEFAULT_LIBEXEC_SUBDIR+'/server'
SET (DEFAULT_SERVER_MODULE_SUBDIR ${DEFAULT_LIBEXEC_SUBDIR}/server)

# path for framework references when running from build directory
Expand Down
10 changes: 10 additions & 0 deletions ci/travis/code_layout/CMakeLists.txt
@@ -0,0 +1,10 @@


CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6)

ADD_SUBDIRECTORY(../../../src/astyle qgisstyle)

ENABLE_TESTING()

ADD_TEST(qgis_indentation ${CMAKE_SOURCE_DIR}/../../../scripts/verify-indentation.sh)
ADD_TEST(qgis_spelling ${CMAKE_SOURCE_DIR}/../../../scripts/spell_check/spell_test.sh)
14 changes: 14 additions & 0 deletions ci/travis/code_layout/after_script.sh
@@ -0,0 +1,14 @@
###########################################################################
# after_script.sh
# ---------------------
# Date : February 2017
# Copyright : (C) 2017 by Denis Rouzaud
# Email : denis.rouzaud@gmail.com
###########################################################################
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################
19 changes: 19 additions & 0 deletions ci/travis/code_layout/before_install.sh
@@ -0,0 +1,19 @@
###########################################################################
# before_install.sh
# ---------------------
# Date : February 2017
# Copyright : (C) 2017 by Denis Rouzaud
# Email : denis.rouzaud@gmail.com
###########################################################################
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################

export DEBIAN_FRONTEND=noninteractive
export CORES=2

pip install autopep8
14 changes: 14 additions & 0 deletions ci/travis/code_layout/before_script.sh
@@ -0,0 +1,14 @@
###########################################################################
# before_script.sh
# ---------------------
# Date : February 2017
# Copyright : (C) 2017 by Denis Rouzaud
# Email : denis.rouzaud@gmail.com
###########################################################################
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################
19 changes: 19 additions & 0 deletions ci/travis/code_layout/install.sh
@@ -0,0 +1,19 @@
###########################################################################
# install.sh
# ---------------------
# Date : February 2017
# Copyright : (C) 2017 by Denis Rouzaud
# Email : denis.rouzaud@gmail.com
###########################################################################
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################

mkdir build
cd build

cmake ../ci/travis/code_layout
18 changes: 18 additions & 0 deletions ci/travis/code_layout/script.sh
@@ -0,0 +1,18 @@
###########################################################################
# script.sh
# ---------------------
# Date : February 2017
# Copyright : (C) 2017 by Denis Rouzaud
# Email : denis.rouzaud@gmail.com
###########################################################################
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################

cd build

xvfb-run ctest -V --output-on-failure
4 changes: 4 additions & 0 deletions ci/travis/linux/blacklist.txt
Expand Up @@ -8,6 +8,10 @@ ProcessingGrass7AlgorithmsImageryTest
ProcessingGrass7AlgorithmsRasterTest
PyQgsDBManagerGpkg

# layout tests are run on separate build
qgis_indentation
qgis_spelling

# flacky
qgis_filedownloader
qgis_openstreetmaptest
Expand Down
2 changes: 1 addition & 1 deletion ci/travis/linux/install.sh
Expand Up @@ -51,7 +51,7 @@ CMAKE_FLAGS="
-DWITH_QSPATIALITE=ON
-DWITH_QWTPOLAR=OFF
-DWITH_APIDOC=ON
-DWITH_ASTYLE=ON
-DWITH_ASTYLE=OFF
-DWITH_INTERNAL_YAML=OFF
-DDISABLE_DEPRECATED=ON
-DCXX_EXTRA_FLAGS=${CLANG_WARNINGS}
Expand Down

2 comments on commit ccfbaf8

@m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented on ccfbaf8 Feb 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@3nids I think this commit introduced some problems on travis. Tests always fails as soon as some source code files are involved.

@3nids
Copy link
Member Author

@3nids 3nids commented on ccfbaf8 Feb 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will have a look ASAP. Probably a missing package.

Please sign in to comment.