Add CI framework and move docs and examples into subdirectories

- travis with valgrind, cppcheck, ubsan, codecov, covscan (future)
  - appveyor with MSVC 2010 through 2017, cygwin 32/64, mingw 32/64
  - README updated, LICENSE, etc.
  - Moved documentation into doc/
  - Moved examples into example/
This commit is contained in:
James E. King III
2018-05-27 17:57:24 +00:00
parent 48965b4d51
commit c1593e7ea9
21 changed files with 416 additions and 92 deletions
+3
View File
@@ -0,0 +1,3 @@
fixes:
- home/travis/build/*/boost-root/boost/::include/boost/
- home/travis/build/*/boost-root/libs/*/src/::src/
+163
View File
@@ -0,0 +1,163 @@
# Copyright 2016 Peter Dimov
# Copyright 2017, 2018 James E. King III
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
#
# Generic Travis CI build script for boostorg repositories
#
# Instructions for customizing this script for your library:
#
# 1. Customize the compilers and language levels you want.
# 2. If you have move than include/, src/, test/, example/, examples/, or
# tools/ directories, modify your Travis CI project and add the environment
# variable DEPINST. For example if your build uses code in "bench/" and
# "fog/" directories, then set DEPINST to the following:
# --include bench --include fog
# 3. If you want to enable Coverity Scan, you need to provide the environment
# variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in
# your github settings.
# 4. Enable pull request builds in your boostorg/<library> account.
# 5. Change the default C++ version in ci/travis/*.sh (search for CXXSTD) if needed.
#
# That's it - the scripts will do everything else for you.
sudo: false
dist: trusty
language: cpp
env:
global:
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
# to use the default for a given environment, comment it out; recommend you build debug and release however..
# - B2_ADDRESS_MODEL=address-model=64,32
# - B2_LINK=link=shared,static
# - B2_THREADING=threading=multi,single
- B2_VARIANT=variant=release,debug
install:
- git clone https://github.com/jeking3/boost-ci.git boost-ci
- cp -pr boost-ci/ci .
- source ci/travis/install.sh
addons:
apt:
packages:
- binutils-gold
- gdb
- libc6-dbg
branches:
only:
- develop
- master
script:
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/build.sh
jobs:
include:
#################### Jobs to run on every pull request ####################
- os: linux
env:
- COMMENT="C++03"
- TOOLSET=gcc,gcc-7,clang
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
env:
- COMMENT="C++11"
- TOOLSET=gcc,gcc-7,clang
- CXXSTD=11
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
env:
- COMMENT=valgrind
- TOOLSET=clang
- B2_VARIANT=variant=debug
- TESTFLAGS=testing.launcher=valgrind
- VALGRIND_OPTS=--error-exitcode=1
addons:
apt:
packages:
- clang-5.0
- libstdc++-7-dev
- valgrind
sources:
- llvm-toolchain-trusty-5.0
- ubuntu-toolchain-r-test
- os: linux
env:
- COMMENT=cppcheck
script:
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/cppcheck.sh
- os: linux
env:
- COMMENT=UBSAN
- B2_VARIANT=variant=debug
- TOOLSET=gcc-7
- CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined"
- LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold"
- UBSAN_OPTIONS=print_stacktrace=1
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
- os: linux
env:
- COMMENT=CodeCov
- TOOLSET=gcc-7
addons:
apt:
packages:
- gcc-7
- g++-7
sources:
- ubuntu-toolchain-r-test
script:
- pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && cd lcov && sudo make install && which lcov && lcov --version && popd
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/codecov.sh
# does not work with sources install shell yet: see
# https://travis-ci.org/jeking3/tokenizer/jobs/384903189
# for a typical failure
# - os: osx
# osx_image: xcode9
# env:
# - TOOLSET=clang
# - CXXSTD=03,11
#################### Jobs to run on pushes to master, develop ###################
# Coverity Scan
- os: linux
if: (env(COVERITY_SCAN_TOKEN) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push))
env:
- COMMENT="Coverity Scan"
- TOOLSET=gcc
script:
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/coverity.sh
notifications:
email:
false
+11
View File
@@ -0,0 +1,11 @@
# Boost.Tokenizer Library Jamfile
#
# Copyright (c) 2018 James E. King III
#
# Use, modification, and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
# please order by name to ease maintenance
build-project example ;
build-project test ;
+23
View File
@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
+16
View File
@@ -7,6 +7,22 @@
Boost tokenizer is a part of [Boost C++ Libraries](http://github.com/boostorg). The Boost.Tokenizer package provides a flexible and easy-to-use way to break a string or other character sequence into a series of tokens.
## License
Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
## Properties
* C++03
* Header-Only
## Build Status
Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
[`master`](https://github.com/boostorg/tokenizer/tree/master) | [![Build Status](https://travis-ci.org/boostorg/tokenizer.svg?branch=master)](https://travis-ci.org/boostorg/tokenizer) | [![Build status](https://ci.appveyor.com/api/projects/status/FIXME-nuihr6s92fjb9gwy/branch/master?svg=true)](https://ci.appveyor.com/project/maintainer/tokenizer-xyzzy/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/FIXME-13982/badge.svg)](https://scan.coverity.com/projects/boostorg-tokenizer) | [![codecov](https://codecov.io/gh/boostorg/tokenizer/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/tokenizer/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/tokenizer.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/tokenizer.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/tokenizer.html)
[`develop`](https://github.com/boostorg/tokenizer/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/tokenizer.svg?branch=develop)](https://travis-ci.org/boostorg/tokenizer) | [![Build status](https://ci.appveyor.com/api/projects/status/FIXME-nuihr6s92fjb9gwy/branch/develop?svg=true)](https://ci.appveyor.com/project/maintainer/tokenizer-xyzzy/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/FIXME-13982/badge.svg)](https://scan.coverity.com/projects/boostorg-tokenizer) | [![codecov](https://codecov.io/gh/boostorg/tokenizer/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/tokenizer/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/tokenizer.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/tokenizer.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/tokenizer.html)
## Overview
+81
View File
@@ -0,0 +1,81 @@
# Copyright 2016, 2017 Peter Dimov
# Copyright (C) 2017, 2018 James E. King III
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
version: 1.0.{build}-{branch}
shallow_clone: true
branches:
only:
- develop
- master
matrix:
allow_failures:
- MAYFAIL: true
environment:
global:
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
# to use the default for a given environment, comment it out; recommend you build debug and release however..
# on Windows it is important to exercise all the possibilities, especially shared vs static
# B2_ADDRESS_MODEL: address-model=64,32
# B2_LINK: link=shared,static
# B2_THREADING: threading=multi,single
B2_VARIANT: variant=release,debug
CXXSTD: 03
matrix:
- FLAVOR: Visual Studio 2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
B2_ADDRESS_MODEL: address-model=64,32
- FLAVOR: Visual Studio 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-14.0
B2_ADDRESS_MODEL: address-model=64,32
- FLAVOR: Visual Studio 2010, 2012, 2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0
- FLAVOR: cygwin (32-bit)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ADDPATH: C:\cygwin\bin;
B2_ADDRESS_MODEL: address-model=32
# https://github.com/boostorg/test/issues/144
DEFINES: define=_POSIX_C_SOURCE=200112L
THREADING: threadapi=pthread
TOOLSET: gcc
- FLAVOR: cygwin (64-bit)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ADDPATH: C:\cygwin64\bin;
B2_ADDRESS_MODEL: address-model=64
# https://github.com/boostorg/test/issues/144
DEFINES: define=_POSIX_C_SOURCE=200112L
THREADING: threadapi=pthread
TOOLSET: gcc
- FLAVOR: mingw32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: i686
B2_ADDRESS_MODEL: address-model=32
SCRIPT: ci\appveyor\mingw.bat
- FLAVOR: mingw64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x86_64
B2_ADDRESS_MODEL: address-model=64
SCRIPT: ci\appveyor\mingw.bat
install:
- set SELF=%APPVEYOR_PROJECT_SLUG:-=_%
- git clone https://github.com/jeking3/boost-ci.git C:\boost-ci
- xcopy /s /e /q /i C:\boost-ci\ci .\ci
- ci\appveyor\install.bat
build: off
test_script:
- set SELF=%APPVEYOR_PROJECT_SLUG:-=_%
- PATH=%ADDPATH%%PATH%
- IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF% toolset=%TOOLSET% cxxstd=%CXXSTD% %CXXFLAGS% %DEFINES% %THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
+96
View File
@@ -0,0 +1,96 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Boost Tokenizer Overview</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000EE" vlink="#551A8B" alink=
"#FF0000">
<p><img src="../../boost.png" alt="C++ Boost" width="277" height=
"86"><br></p>
<h1 align="center">Table Of Contents</h1>
<p align="left">&nbsp;</p>
<h2 align="left"><a href="introduc.htm">Introduction</a></h2>
<h2 align="left">Containers and Iterators</h2>
<ul>
<li>
<h3 align="left"><a href="tokenizer.htm">tokenizer</a></h3>
</li>
<li>
<h3 align="left"><a href="token_iterator.htm">token iterator</a></h3>
</li>
</ul>
<h2><a href="tokenizerfunction.htm">TokenizerFunction Concept</a></h2>
<h2>TokenizerFunction Models</h2>
<ul>
<li>
<h3><a href="char_separator.htm">char_separator</a></h3>
</li>
<li>
<h3><a href=
"escaped_list_separator.htm">escaped_list_separator</a></h3>
</li>
<li>
<h3><a href="offset_separator.htm">offset_separator</a></h3>
</li>
<li><font color="red">Deprecated:</font> <a href=
"char_delimiters_separator.htm">char_delimiters_separator</a></li>
</ul>
<h2>&nbsp;</h2>
<h2>Acknowledgements</h2>
<p>I wish to thank the members of the boost mailing list, whose comments,
compliments, and criticisms during both the development and formal review
helped make the Tokenizer library what it is. I especially wish to thank
Aleksey Gurtovoy for the idea of using a pair of iterators to specify the
input, instead of a string. I also wish to thank Jeremy Siek for his idea
of providing a container interface for the token iterators and for
simplifying the template parameters for the TokenizerFunctions. He and
Daryle Walker also emphasized the need to separate interface and
implementation. Gary Powell sparked the idea of using the isspace and
ispunct as the defaults for char_delimiters_separator. Jeff Garland
provided ideas on how to change to order of the template parameters in
order to make tokenizer easier to declare. Thanks to Douglas Gregor who
served as review manager and provided many insights both on the boost list
and in e-mail on how to polish up the implementation and presentation of
Tokenizer. Finally, thanks to Beman Dawes who integrated the final version
into the boost distribution.</p>
<hr>
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
height="31" width="88"></a></p>
<p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->25
December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38518" --></p>
<p><i>Copyright &copy; 2000 Jeremy Siek<br>
Copyright &copy; 2001 John R. Bandela</i></p>
<p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href=
"http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
</body>
</html>
View File
-1
View File
@@ -1 +0,0 @@
Documentation is the top-level index.html file.
View File
+15
View File
@@ -0,0 +1,15 @@
# Boost.Tokenizer Library example Jamfile
#
# Copyright (c) 2008 James E. King III
#
# Distributed under the Boost Software License, Version 1.0. (See accompany-
# ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
import testing ;
test-suite "tokenizer-examples"
: [ run char_sep_example_1.cpp ]
[ run char_sep_example_2.cpp ]
[ run char_sep_example_3.cpp ]
;
+8 -91
View File
@@ -1,96 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Boost Tokenizer Overview</title>
<meta http-equiv="refresh" content="0; URL=doc/index.html">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000EE" vlink="#551A8B" alink=
"#FF0000">
<p><img src="../../boost.png" alt="C++ Boost" width="277" height=
"86"><br></p>
<h1 align="center">Table Of Contents</h1>
<p align="left">&nbsp;</p>
<h2 align="left"><a href="introduc.htm">Introduction</a></h2>
<h2 align="left">Containers and Iterators</h2>
<ul>
<li>
<h3 align="left"><a href="tokenizer.htm">tokenizer</a></h3>
</li>
<li>
<h3 align="left"><a href="token_iterator.htm">token iterator</a></h3>
</li>
</ul>
<h2><a href="tokenizerfunction.htm">TokenizerFunction Concept</a></h2>
<h2>TokenizerFunction Models</h2>
<ul>
<li>
<h3><a href="char_separator.htm">char_separator</a></h3>
</li>
<li>
<h3><a href=
"escaped_list_separator.htm">escaped_list_separator</a></h3>
</li>
<li>
<h3><a href="offset_separator.htm">offset_separator</a></h3>
</li>
<li><font color="red">Deprecated:</font> <a href=
"char_delimiters_separator.htm">char_delimiters_separator</a></li>
</ul>
<h2>&nbsp;</h2>
<h2>Acknowledgements</h2>
<p>I wish to thank the members of the boost mailing list, whose comments,
compliments, and criticisms during both the development and formal review
helped make the Tokenizer library what it is. I especially wish to thank
Aleksey Gurtovoy for the idea of using a pair of iterators to specify the
input, instead of a string. I also wish to thank Jeremy Siek for his idea
of providing a container interface for the token iterators and for
simplifying the template parameters for the TokenizerFunctions. He and
Daryle Walker also emphasized the need to separate interface and
implementation. Gary Powell sparked the idea of using the isspace and
ispunct as the defaults for char_delimiters_separator. Jeff Garland
provided ideas on how to change to order of the template parameters in
order to make tokenizer easier to declare. Thanks to Douglas Gregor who
served as review manager and provided many insights both on the boost list
and in e-mail on how to polish up the implementation and presentation of
Tokenizer. Finally, thanks to Beman Dawes who integrated the final version
into the boost distribution.</p>
<hr>
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
height="31" width="88"></a></p>
<p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->25
December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38518" --></p>
<p><i>Copyright &copy; 2000 Jeremy Siek<br>
Copyright &copy; 2001 John R. Bandela</i></p>
<p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href=
"http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
<body>
Automatic redirection failed, please go to
<a href="doc/index.html">doc/index.html</a>.&nbsp;<hr>
<p>© Copyright Beman Dawes, 2001</p>
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p>
</body>
</html>