Skip to content

Commit ccfbaf8

Browse files
authored
run spelling and indentation test on another Travis build (#4180)
1 parent 6b93cf5 commit ccfbaf8

10 files changed

+129
-12
lines changed

.travis.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ matrix:
88
- BUILD=qt5
99
- QT_VERSION=5
1010
- LLVM_VERSION=3.8
11+
- TRAVIS_CONFIG=linux
1112
sudo: false
1213
cache:
1314
apt: true
@@ -21,10 +22,8 @@ matrix:
2122
apt:
2223
sources:
2324
- llvm-toolchain-precise-3.8
24-
- ubuntu-toolchain-r-test
2525
- george-edison55-precise-backports # doxygen 1.8.3
26-
- sourceline: 'ppa:nomeata/travis-backports'
27-
# - laurent-boulard-devtools (for silver-search, not whitelisted yet https://github.com/travis-ci/apt-source-whitelist/pull/345)
26+
- ubuntu-toolchain-r-test
2827
packages:
2928
- doxygen
3029
- bison
@@ -34,14 +33,34 @@ matrix:
3433
- libfcgi-dev
3534
- libfftw3-3
3635
- pkg-config
37-
- perl # lookahead regex in spell check script
3836
- poppler-utils
3937
- txt2tags
4038
- xvfb
4139
- flip
4240
- clang-3.8
41+
42+
43+
- os: linux
44+
language: python # This lets us use newer python versions from virtualenv
45+
env:
46+
- TRAVIS_CONFIG=code_layout
47+
dist: trusty
48+
sudo: false
49+
cache:
50+
apt: true
51+
#compiler: clang
52+
#python: "3.3"
53+
addons:
54+
apt:
55+
sources:
56+
- sourceline: 'ppa:jonathonf/backports' # silversearcher-ag backport
57+
packages:
58+
- pkg-config
59+
- xvfb
60+
- flip
4361
# used for spell checks
44-
# - silversearcher-ag not available in precise nor in a white listed ppa (in osgeo4travis as for now)
62+
- perl # lookahead regex in spell check script
63+
- silversearcher-ag
4564
- expect-dev # unbuffer
4665
- coreutils
4766
# OSX based build with QT4 and Python 2
@@ -69,16 +88,16 @@ notifications:
6988
on_start: never # default: never
7089

7190
before_install:
72-
- ./ci/travis/${TRAVIS_OS_NAME}/before_install.sh
91+
- ./ci/travis/${TRAVIS_CONFIG}/before_install.sh
7392

7493
install:
75-
- ./ci/travis/${TRAVIS_OS_NAME}/install.sh
94+
- ./ci/travis/${TRAVIS_CONFIG}/install.sh
7695

7796
before_script:
78-
- ./ci/travis/${TRAVIS_OS_NAME}/before_script.sh
97+
- ./ci/travis/${TRAVIS_CONFIG}/before_script.sh
7998

8099
script:
81-
- ./ci/travis/${TRAVIS_OS_NAME}/script.sh
100+
- ./ci/travis/${TRAVIS_CONFIG}/script.sh
82101

83102
after_script:
84-
- ./ci/travis/${TRAVIS_OS_NAME}/after_script.sh
103+
- ./ci/travis/${TRAVIS_CONFIG}/after_script.sh

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ ELSE (WIN32)
505505
SET (QGIS_PLUGIN_SUBDIR_REV ../../MacOS)
506506
SET (DEFAULT_INCLUDE_SUBDIR include/qgis)
507507

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

511511
# path for framework references when running from build directory

ci/travis/code_layout/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
3+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6)
4+
5+
ADD_SUBDIRECTORY(../../../src/astyle qgisstyle)
6+
7+
ENABLE_TESTING()
8+
9+
ADD_TEST(qgis_indentation ${CMAKE_SOURCE_DIR}/../../../scripts/verify-indentation.sh)
10+
ADD_TEST(qgis_spelling ${CMAKE_SOURCE_DIR}/../../../scripts/spell_check/spell_test.sh)

ci/travis/code_layout/after_script.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
###########################################################################
2+
# after_script.sh
3+
# ---------------------
4+
# Date : February 2017
5+
# Copyright : (C) 2017 by Denis Rouzaud
6+
# Email : denis.rouzaud@gmail.com
7+
###########################################################################
8+
# #
9+
# This program is free software; you can redistribute it and/or modify #
10+
# it under the terms of the GNU General Public License as published by #
11+
# the Free Software Foundation; either version 2 of the License, or #
12+
# (at your option) any later version. #
13+
# #
14+
###########################################################################
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
###########################################################################
2+
# before_install.sh
3+
# ---------------------
4+
# Date : February 2017
5+
# Copyright : (C) 2017 by Denis Rouzaud
6+
# Email : denis.rouzaud@gmail.com
7+
###########################################################################
8+
# #
9+
# This program is free software; you can redistribute it and/or modify #
10+
# it under the terms of the GNU General Public License as published by #
11+
# the Free Software Foundation; either version 2 of the License, or #
12+
# (at your option) any later version. #
13+
# #
14+
###########################################################################
15+
16+
export DEBIAN_FRONTEND=noninteractive
17+
export CORES=2
18+
19+
pip install autopep8
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
###########################################################################
2+
# before_script.sh
3+
# ---------------------
4+
# Date : February 2017
5+
# Copyright : (C) 2017 by Denis Rouzaud
6+
# Email : denis.rouzaud@gmail.com
7+
###########################################################################
8+
# #
9+
# This program is free software; you can redistribute it and/or modify #
10+
# it under the terms of the GNU General Public License as published by #
11+
# the Free Software Foundation; either version 2 of the License, or #
12+
# (at your option) any later version. #
13+
# #
14+
###########################################################################

ci/travis/code_layout/install.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
###########################################################################
2+
# install.sh
3+
# ---------------------
4+
# Date : February 2017
5+
# Copyright : (C) 2017 by Denis Rouzaud
6+
# Email : denis.rouzaud@gmail.com
7+
###########################################################################
8+
# #
9+
# This program is free software; you can redistribute it and/or modify #
10+
# it under the terms of the GNU General Public License as published by #
11+
# the Free Software Foundation; either version 2 of the License, or #
12+
# (at your option) any later version. #
13+
# #
14+
###########################################################################
15+
16+
mkdir build
17+
cd build
18+
19+
cmake ../ci/travis/code_layout

ci/travis/code_layout/script.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
###########################################################################
2+
# script.sh
3+
# ---------------------
4+
# Date : February 2017
5+
# Copyright : (C) 2017 by Denis Rouzaud
6+
# Email : denis.rouzaud@gmail.com
7+
###########################################################################
8+
# #
9+
# This program is free software; you can redistribute it and/or modify #
10+
# it under the terms of the GNU General Public License as published by #
11+
# the Free Software Foundation; either version 2 of the License, or #
12+
# (at your option) any later version. #
13+
# #
14+
###########################################################################
15+
16+
cd build
17+
18+
xvfb-run ctest -V --output-on-failure

ci/travis/linux/blacklist.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ ProcessingGrass7AlgorithmsImageryTest
88
ProcessingGrass7AlgorithmsRasterTest
99
PyQgsDBManagerGpkg
1010

11+
# layout tests are run on separate build
12+
qgis_indentation
13+
qgis_spelling
14+
1115
# flacky
1216
qgis_filedownloader
1317
qgis_openstreetmaptest

ci/travis/linux/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ CMAKE_FLAGS="
5151
-DWITH_QSPATIALITE=ON
5252
-DWITH_QWTPOLAR=OFF
5353
-DWITH_APIDOC=ON
54-
-DWITH_ASTYLE=ON
54+
-DWITH_ASTYLE=OFF
5555
-DWITH_INTERNAL_YAML=OFF
5656
-DDISABLE_DEPRECATED=ON
5757
-DCXX_EXTRA_FLAGS=${CLANG_WARNINGS}

0 commit comments

Comments
 (0)