Skip to content

Commit 46caf62

Browse files
committed
Merge branch 'develop'
2 parents fcee593 + 168f969 commit 46caf62

File tree

17 files changed

+551
-22
lines changed

17 files changed

+551
-22
lines changed

.codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fixes:
2+
- home/travis/build/*/boost-root/boost/::include/boost/
3+
- home/travis/build/*/boost-root/libs/*/src/::src/

.travis.yml

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Copyright 2016 Peter Dimov
2+
# Copyright 2017, 2018 James E. King III
3+
# Distributed under the Boost Software License, Version 1.0.
4+
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
5+
6+
#
7+
# Generic Travis CI build script for boostorg repositories
8+
#
9+
# Instructions for customizing this script for your library:
10+
#
11+
# 1. Copy the ci/ directory from the same source into your project:
12+
# ci/build.sh runs the build
13+
# ci/codecov.sh is used to run a profiling build and upload results to codecov.io
14+
# ci/coverity.sh is used to run a coverity build and upload results coverity scan
15+
# 2. Customize the compilers and language levels you want. Default is C++03.
16+
# 3. Update the global B2 environment settings to your liking.
17+
# 4. If you have more than include/, src/, and test/ directories then
18+
# add them to the depinst.py line as "--include tools" for tools/ (you
19+
# can put multiple --include on the command line).
20+
# 5. If you want to enable Coverity Scan, you need to provide the environment
21+
# variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in
22+
# your github settings.
23+
# 6. Enable pull request builds in your boostorg/<library> account.
24+
# 7. Change the default C++ version in ci/*.sh (search for CXXSTD)
25+
#
26+
# That's it - the scripts will do everything else for you.
27+
28+
sudo: false
29+
dist: trusty
30+
language: cpp
31+
32+
env:
33+
global:
34+
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
35+
# to use the default for a given environment, comment it out; recommend you build debug and release however..
36+
# - B2_ADDRESS_MODEL=address-model=64,32
37+
# - B2_LINK=link=shared,static
38+
# - B2_THREADING=threading=multi,single
39+
- B2_VARIANT=variant=release,debug
40+
41+
install:
42+
- export SELF=`basename $TRAVIS_BUILD_DIR`
43+
- cd ..
44+
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
45+
- cd boost-root
46+
- git submodule update -q --init tools/boostdep
47+
- git submodule update -q --init tools/build
48+
- git submodule update -q --init tools/inspect
49+
- cp -r $TRAVIS_BUILD_DIR/* libs/$SELF
50+
- export BOOST_ROOT="`pwd`"
51+
- export PATH="`pwd`":$PATH
52+
- python tools/boostdep/depinst/depinst.py $SELF --include example
53+
- ./bootstrap.sh
54+
- ./b2 headers
55+
56+
addons:
57+
apt:
58+
packages:
59+
- binutils-gold
60+
- gdb
61+
- libc6-dbg
62+
63+
branches:
64+
only:
65+
- develop
66+
- master
67+
68+
script:
69+
- cd libs/$SELF
70+
- ci/build.sh
71+
72+
jobs:
73+
include:
74+
- os: linux
75+
env:
76+
- COMMENT="C++03"
77+
- TOOLSET=gcc,gcc-7
78+
addons:
79+
apt:
80+
packages:
81+
- g++-7
82+
sources:
83+
- ubuntu-toolchain-r-test
84+
- os: linux
85+
env:
86+
- COMMENT="C++11"
87+
- TOOLSET=clang
88+
- CXXSTD=11
89+
addons:
90+
apt:
91+
packages:
92+
- g++-7
93+
sources:
94+
- ubuntu-toolchain-r-test
95+
- os: linux
96+
env:
97+
- COMMENT=valgrind
98+
- TOOLSET=clang
99+
- B2_VARIANT=variant=debug
100+
- TESTFLAGS=testing.launcher=valgrind
101+
addons:
102+
apt:
103+
packages:
104+
- clang-5.0
105+
- libstdc++-7-dev
106+
- valgrind
107+
sources:
108+
- llvm-toolchain-trusty-5.0
109+
- ubuntu-toolchain-r-test
110+
111+
- os: linux
112+
env:
113+
- COMMENT=cppcheck
114+
script:
115+
- libs/$SELF/ci/cppcheck.sh
116+
117+
- os: linux
118+
env:
119+
- COMMENT=UBSAN
120+
- B2_VARIANT=variant=debug
121+
- TOOLSET=gcc-7
122+
- CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined"
123+
- LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined"
124+
- UBSAN_OPTIONS=print_stacktrace=1
125+
addons:
126+
apt:
127+
packages:
128+
- g++-7
129+
sources:
130+
- ubuntu-toolchain-r-test
131+
132+
- os: linux
133+
env:
134+
- COMMENT=CodeCov
135+
- TOOLSET=gcc-7
136+
addons:
137+
apt:
138+
packages:
139+
- gcc-7
140+
- g++-7
141+
sources:
142+
- ubuntu-toolchain-r-test
143+
script:
144+
- pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && cd lcov && sudo make install && which lcov && lcov --version && popd
145+
- cd libs/$SELF
146+
- ci/codecov.sh
147+
148+
#################### Jobs to run on every pull request ####################
149+
# osx was disabled because it is very slow to start (can delay builds by 30 minutes)
150+
# - os: osx
151+
# osx_image: xcode9
152+
# env:
153+
# - TOOLSET=clang
154+
# - CXXSTD=03,11
155+
156+
#################### Jobs to run on pushes to master, develop ###################
157+
158+
# Coverity Scan
159+
- os: linux
160+
if: (branch IN (develop, master)) AND (type IN (cron, push))
161+
env:
162+
- COMMENT="Coverity Scan"
163+
- TOOLSET=gcc
164+
script:
165+
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
166+
- cd libs/$SELF
167+
- ci/coverity.sh
168+
169+
notifications:
170+
email:
171+
false
172+

Jamfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Boost.ProgramOptions Library Jamfile
2+
#
3+
# Copyright (c) 2018 James E. King III
4+
#
5+
# Use, modification, and distribution are subject to the
6+
# Boost Software License, Version 1.0. (See accompanying file
7+
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8+
9+
# please order by name to ease maintenance
10+
build-project example ;
11+
build-project test ;

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Program Options, part of the collection of [Boost C++ Libraries](http://github.com/boostorg), allows for definition and acquisition of (name, value) pairs from the user via conventional methods such as command line and config file. It is roughly analogous to getopt_long, but for use with C++.
2+
3+
### License
4+
5+
Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
6+
7+
### Properties
8+
9+
* C++03
10+
* Requires Linking
11+
12+
### Build Status
13+
(in progress...)
14+
15+
|Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
16+
|:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
17+
|[`master`](https://github.com/boostorg/program_options/tree/master) | [![Build Status](https://travis-ci.org/boostorg/program_options.svg?branch=master)](https://travis-ci.org/boostorg/program_options) | [![Build status](https://ci.appveyor.com/api/projects/status/upf5c528fy09fudk?svg=true)](https://ci.appveyor.com/project/jeking3/date-time-1evbf) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/14908/badge.svg)](https://scan.coverity.com/projects/boostorg-program_options) | [![codecov](https://codecov.io/gh/boostorg/program_options/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/program_options/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/program_options.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/program_options.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/program_options.html)
18+
|[`develop`](https://github.com/boostorg/program_options/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/program_options.svg?branch=develop)](https://travis-ci.org/boostorg/program_options) | [![Build status](https://ci.appveyor.com/api/projects/status/e0quisadwh1v7ok5/branch/develop?svg=true)](https://ci.appveyor.com/project/vprus/program-options/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/14908/badge.svg)](https://scan.coverity.com/projects/boostorg-program_options) | [![codecov](https://codecov.io/gh/boostorg/program_options/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/program_options/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/program_options.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/program_options.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/program_options.html)
19+
20+
### Directories
21+
22+
| Name | Purpose |
23+
| --------- | ------------------------------ |
24+
| `build` | build script for link library |
25+
| `ci` | continuous integration scripts |
26+
| `doc` | documentation |
27+
| `example` | use case examples |
28+
| `include` | headers |
29+
| `src` | source code for link library |
30+
| `test` | unit tests |
31+
32+
### More information
33+
34+
* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-program_options): Be sure to read the documentation first to see if it answers your question.
35+
* [Report bugs](https://github.com/boostorg/program_options/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
36+
* [Submit Pull Requests](https://github.com/boostorg/program_options/pulls) against the **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt). Be sure to include tests proving your changes work properly.
37+
* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[date_time]` tag at the beginning of the subject line.

appveyor.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Copyright 2016, 2017 Peter Dimov
2+
# Copyright (C) 2017, 2018 James E. King III
3+
# Distributed under the Boost Software License, Version 1.0.
4+
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
5+
6+
# When copying this to a new library, be sure to update the name of the library
7+
# in two places (once each at the top of install: and test_script:)
8+
9+
version: 1.0.{build}-{branch}
10+
11+
shallow_clone: true
12+
13+
branches:
14+
only:
15+
- develop
16+
- master
17+
18+
matrix:
19+
allow_failures:
20+
- MAYFAIL: true
21+
22+
environment:
23+
global:
24+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
25+
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
26+
# to use the default for a given environment, comment it out; recommend you build debug and release however..
27+
# on Windows it is important to exercise all the possibilities, especially shared vs static
28+
# B2_ADDRESS_MODEL: address-model=64,32
29+
# B2_LINK: link=shared,static
30+
# B2_THREADING: threading=multi,single
31+
B2_VARIANT: variant=release,debug
32+
CXXSTD: 03
33+
34+
matrix:
35+
- FLAVOR: Visual Studio 2017
36+
TOOLSET: msvc-14.1
37+
B2_ADDRESS_MODEL: address-model=64,32
38+
- FLAVOR: Visual Studio 2013
39+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
40+
TOOLSET: msvc-12.0
41+
- FLAVOR: mingw32
42+
ARCH: i686
43+
B2_ADDRESS_MODEL: address-model=32
44+
SCRIPT: ci\mingw.bat
45+
- FLAVOR: mingw64
46+
ARCH: x86_64
47+
B2_ADDRESS_MODEL: address-model=64
48+
SCRIPT: ci\mingw.bat
49+
- FLAVOR: cygwin (64-bit)
50+
ADDPATH: C:\cygwin64\bin;
51+
B2_ADDRESS_MODEL: address-model=64
52+
TOOLSET: gcc
53+
MAYFAIL: true
54+
- FLAVOR: cygwin (32-bit)
55+
ADDPATH: C:\cygwin\bin;
56+
B2_ADDRESS_MODEL: address-model=32
57+
TOOLSET: gcc
58+
MAYFAIL: true
59+
60+
install:
61+
- set SELF=program_options
62+
- cd ..
63+
- git clone -b %APPVEYOR_REPO_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
64+
- cd boost-root
65+
- git submodule update -q --init tools/boostdep
66+
- git submodule update -q --init tools/build
67+
- git submodule update -q --init tools/inspect
68+
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\%SELF%
69+
- python tools/boostdep/depinst/depinst.py --include example %SELF%
70+
- cmd /c bootstrap
71+
- b2 headers
72+
73+
build: off
74+
75+
test_script:
76+
- set SELF=program_options
77+
- PATH=%ADDPATH%%PATH%
78+
- IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF% toolset=%TOOLSET% cxxstd=%CXXSTD% %CXXFLAGS% %DEFINES% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)

ci/build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#! /bin/bash
2+
#
3+
# Copyright 2017 James E. King III
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# (See accompanying file LICENSE_1_0.txt or copy at
6+
# http://www.boost.org/LICENSE_1_0.txt)
7+
#
8+
# Bash script to run in travis to perform a bjam build
9+
# cwd should be $BOOST_ROOT/libs/$SELF before running
10+
#
11+
12+
set -ex
13+
14+
# default language level: c++03
15+
if [[ -z "$CXXSTD" ]]; then
16+
CXXSTD=03
17+
fi
18+
19+
$BOOST_ROOT/b2 . toolset=$TOOLSET cxxstd=$CXXSTD $CXXFLAGS $DEFINES $LINKFLAGS $TESTFLAGS $B2_ADDRESS_MODEL $B2_LINK $B2_THREADING $B2_VARIANT -j3 $*

ci/codecov.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#! /bin/bash
2+
#
3+
# Copyright 2017, 2018 James E. King III
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# (See accompanying file LICENSE_1_0.txt or copy at
6+
# http://www.boost.org/LICENSE_1_0.txt)
7+
#
8+
# Bash script to run in travis to perform codecov.io integration
9+
#
10+
11+
###
12+
### NOTE: Make sure you grab .codecov.yml
13+
###
14+
15+
# assumes cwd is the top level directory of the boost project
16+
# assumes an environment variable $SELF is the boost project name
17+
18+
set -ex
19+
20+
B2_VARIANT=debug
21+
ci/build.sh cxxflags=-fprofile-arcs cxxflags=-ftest-coverage linkflags=-fprofile-arcs linkflags=-ftest-coverage
22+
23+
# switch back to the original source code directory
24+
cd $TRAVIS_BUILD_DIR
25+
26+
# get the version of lcov
27+
lcov --version
28+
29+
# coverage files are in ../../b2 from this location
30+
lcov --gcov-tool=gcov-7 --rc lcov_branch_coverage=1 --base-directory "$BOOST_ROOT/libs/$SELF" --directory "$BOOST_ROOT" --capture --output-file all.info
31+
32+
# all.info contains all the coverage info for all projects - limit to ours
33+
lcov --gcov-tool=gcov-7 --rc lcov_branch_coverage=1 --extract all.info "*/boost/$SELF/*" "*/libs/$SELF/src/*" --output-file coverage.info
34+
35+
# dump a summary on the console - helps us identify problems in pathing
36+
lcov --gcov-tool=gcov-7 --rc lcov_branch_coverage=1 --list coverage.info
37+
38+
#
39+
# upload to codecov.io
40+
#
41+
curl -s https://codecov.io/bash > .codecov
42+
chmod +x .codecov
43+
./.codecov -f coverage.info -X gcov -x "gcov-7"

0 commit comments

Comments
 (0)