Skip to content

Commit 101d479

Browse files
authored
Merge pull request #955 from baylesj/yaml-cleanups
Modernize Travis and Appveyor configs
2 parents 2a3ae0e + 2690bc9 commit 101d479

File tree

7 files changed

+45
-58
lines changed

7 files changed

+45
-58
lines changed

.travis.yml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Build matrix / environment variables are explained on:
22
# http://about.travis-ci.org/docs/user/build-configuration/
3-
# This file can be validated on:
4-
# http://lint.travis-ci.org/
5-
# See also
6-
# http://stackoverflow.com/questions/22111549/travis-ci-with-clang-3-4-and-c11/30925448#30925448
7-
# to allow C++11, though we are not yet building with -std=c++11
3+
# This file can be validated on: http://www.yamllint.com/
4+
# Or using the Ruby based travel command line tool:
5+
# gem install travis --no-rdoc --no-ri
6+
# travis lint .travis.yml
87
language: cpp
98
sudo: false
109
addons:
@@ -15,34 +14,32 @@ addons:
1514
update: false # do not update homebrew by default
1615
apt:
1716
sources:
18-
#- ubuntu-toolchain-r-test
19-
- llvm-toolchain-precise-3.5
17+
- ubuntu-toolchain-r-test
18+
- llvm-toolchain-xenial-8
2019
packages:
21-
#- gcc-4.9
22-
#- g++-4.9
23-
- clang-3.5
20+
- clang-8
2421
- valgrind
2522
matrix:
2623
allow_failures:
2724
- os: osx
2825
include:
2926
- name: Mac clang meson static release testing
3027
os: osx
31-
osx_image: xcode9.4
28+
osx_image: xcode10.2
3229
compiler: clang
33-
env:
34-
CXX="clang++-3.5"
35-
CC="clang-3.5"
30+
env:
31+
CXX="clang++"
32+
CC="clang"
3633
LIB_TYPE=static
3734
BUILD_TYPE=release
3835
script: ./.travis_scripts/meson_builder.sh
39-
- name: trusty clang meson static release testing
36+
- name: Linux xenial clang meson static release testing
4037
os: linux
41-
dist: trusty
38+
dist: xenial
4239
compiler: clang
43-
env:
44-
CXX="clang++-3.5"
45-
CC="clang-3.5"
40+
env:
41+
CXX="clang++"
42+
CC="clang"
4643
LIB_TYPE=static
4744
BUILD_TYPE=release
4845
# before_install and install steps only needed for linux meson builds
@@ -51,27 +48,18 @@ matrix:
5148
install:
5249
- source ./.travis_scripts/travis.install.${TRAVIS_OS_NAME}.sh
5350
script: ./.travis_scripts/meson_builder.sh
54-
- name: xenial gcc cmake coverage
51+
- name: Linux xenial gcc cmake coverage
5552
os: linux
5653
dist: xenial
5754
compiler: gcc
58-
env:
55+
env:
5956
CXX=g++
6057
CC=gcc
6158
DO_Coverage=ON
6259
BUILD_TOOL="Unix Makefiles"
63-
BUILD_TYPE=Debug
64-
LIB_TYPE=shared
60+
BUILD_TYPE=Debug
61+
LIB_TYPE=shared
6562
DESTDIR=/tmp/cmake_json_cpp
6663
script: ./.travis_scripts/cmake_builder.sh
67-
# Valgrind has too many false positives from the python wrapping. Need a good suppression file
68-
# - name: xenial gcc cmake coverage
69-
# os: linux
70-
# dist: xenial
71-
# compiler: gcc
72-
# env: DO_MemCheck=ON CXX=/usr/bin/g++ BUILD_TOOL="Unix Makefiles" BUILD_TYPE=Debug LIB_TYPE=shared DESTDIR=/tmp/cmake_json_cpp
73-
# script: ./.travis_scripts/cmake_builder.sh
7464
notifications:
7565
email: false
76-
77-

.travis_scripts/cmake_builder.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# Optional environmental variables
1313
# - DESTDIR <- used for setting the install prefix
1414
# - BUILD_TOOL=["Unix Makefile"|"Ninja"]
15-
# - BUILDNAME <-- how to identify this build on the dashboard
15+
# - BUILDNAME <- how to identify this build on the dashboard
1616
# - DO_MemCheck <- if set, try to use valgrind
17-
# - DO_Coverage <- if set, try to do dashboard coverage testing
18-
#
17+
# - DO_Coverage <- if set, try to do dashboard coverage testing
18+
#
1919

2020
env_set=1
2121
if ${BUILD_TYPE+false}; then
@@ -78,7 +78,7 @@ if ! ${DO_MemCheck+false}; then
7878
valgrind --version
7979
CTEST_TESTING_OPTION="-D ExperimentalMemCheck"
8080
else
81-
# - DO_Coverage <- if set, try to do dashboard coverage testing
81+
# - DO_Coverage <- if set, try to do dashboard coverage testing
8282
if ! ${DO_Coverage+false}; then
8383
export CXXFLAGS="-fprofile-arcs -ftest-coverage"
8484
export LDFLAGS="-fprofile-arcs -ftest-coverage"
@@ -117,14 +117,14 @@ cd "${_BUILD_DIR_NAME}"
117117
ctest -C ${BUILD_TYPE} -D ExperimentalStart -D ExperimentalConfigure -D ExperimentalBuild ${CTEST_TESTING_OPTION} -D ExperimentalSubmit
118118
# Final step is to verify that installation succeeds
119119
cmake --build . --config ${BUILD_TYPE} --target install
120-
120+
121121
if [ "${DESTDIR}" != "/usr/local" ]; then
122122
${_BUILD_EXE} install
123123
fi
124124
cd -
125125

126126
if ${CLEANUP+false}; then
127-
echo "Skipping cleanup: build directory will persist."
127+
echo "Skipping cleanup: build directory will persist."
128128
else
129129
rm -r "${_BUILD_DIR_NAME}"
130130
fi
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
set -vex
2-
#before_install: pyenv install 3.5.4 && pyenv global 3.5.4
3-
#before_install: pyenv global 3.6
2+
3+
# Preinstalled versions of python are dependent on which Ubuntu distribution
4+
# you are running. The below version needs to be updated whenever we roll
5+
# the Ubuntu version used in Travis.
46
# https://docs.travis-ci.com/user/languages/python/
5-
# "for Trusty, this means 2.7.6 and 3.4.3"
67

7-
pyenv global 3.6
8+
pyenv global 3.7.1
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
# NOTHING TO DO HERE
2-
# set -vex
3-
4-
#brew install pyenv
5-
#which pyenv

.travis_scripts/travis.install.linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set -vex
22

3-
wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip
3+
wget https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip
44
unzip -q ninja-linux.zip -d build
55

66
pip3 install meson

.travis_scripts/travis.install.osx.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
# NOTHING TO DO HERE
2-
# set -vex
3-
4-
#python3 -m venv venv
5-
#source venv/bin/activate

appveyor.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@ clone_folder: c:\projects\jsoncpp
22

33
environment:
44
matrix:
5-
- CMAKE_GENERATOR: Visual Studio 12 2013
6-
- CMAKE_GENERATOR: Visual Studio 12 2013 Win64
7-
- CMAKE_GENERATOR: Visual Studio 14 2015
8-
- CMAKE_GENERATOR: Visual Studio 14 2015 Win64
5+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
6+
CMAKE_GENERATOR: Visual Studio 14 2015
7+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
8+
CMAKE_GENERATOR: Visual Studio 14 2015 Win64
9+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
10+
CMAKE_GENERATOR: Visual Studio 15 2017
11+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
12+
CMAKE_GENERATOR: Visual Studio 15 2017 Win64
913

1014
build_script:
1115
- cmake --version
1216
- cd c:\projects\jsoncpp
1317
- cmake -G "%CMAKE_GENERATOR%" -DCMAKE_INSTALL_PREFIX:PATH=%CD:\=/%/install -DBUILD_SHARED_LIBS:BOOL=ON .
14-
# Use ctest to make a dashboard build ctest -D Experimental(Start|Update|Configure|Build|Test|Coverage|MemCheck|Submit)
15-
#NOTE Testing on window is not yet finished - ctest -C Release -D ExperimentalStart -D ExperimentalConfigure -D ExperimentalBuild -D ExperimentalTest -D ExperimentalSubmit
18+
# Use ctest to make a dashboard build:
19+
# - ctest -D Experimental(Start|Update|Configure|Build|Test|Coverage|MemCheck|Submit)
20+
# NOTE: Testing on window is not yet finished:
21+
# - ctest -C Release -D ExperimentalStart -D ExperimentalConfigure -D ExperimentalBuild -D ExperimentalTest -D ExperimentalSubmit
1622
- ctest -C Release -D ExperimentalStart -D ExperimentalConfigure -D ExperimentalBuild -D ExperimentalSubmit
17-
# Final step is to verify that installation succeeds
23+
# Final step is to verify that installation succeeds
1824
- cmake --build . --config Release --target install
1925

2026
deploy:

0 commit comments

Comments
 (0)