mirror of
https://github.com/boostorg/pool.git
synced 2026-07-21 13:33:29 +00:00
Added CI framework
- travis with valgrind, cppcheck, ubsan, codecov, covscan (future) - appveyor with MSVC 2010 through 2017, cygwin 32/64, mingw 32/64 - README, LICENSE, etc.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
fixes:
|
||||
- home/travis/build/*/boost-root/boost/::include/boost/
|
||||
- home/travis/build/*/boost-root/libs/*/src/::src/
|
||||
+144
-67
@@ -1,97 +1,174 @@
|
||||
# Copyright 2016, 2017 Peter Dimov
|
||||
# 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)
|
||||
|
||||
language: cpp
|
||||
#
|
||||
# Generic Travis CI build script for boostorg repositories
|
||||
#
|
||||
# Instructions for customizing this script for your library:
|
||||
#
|
||||
# 1. Copy the ci/ directory from the same source into your project:
|
||||
# ci/build.sh runs the build
|
||||
# ci/codecov.sh is used to run a profiling build and upload results to codecov.io
|
||||
# ci/coverity.sh is used to run a coverity build and upload results to coverity scan
|
||||
# 2. Customize the compilers and language levels you want. Default is C++03.
|
||||
# 3. Update the global B2 environment settings to your liking.
|
||||
# 4. If you have more than include/, src/, and test/ directories then
|
||||
# add them to the depinst.py line as "--include tools" for tools/ (you
|
||||
# can put multiple --include on the command line).
|
||||
# 5. 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.
|
||||
# 6. Enable pull request builds in your boostorg/<library> account.
|
||||
# 7. Change the default C++ version in ci/*.sh (search for CXXSTD)
|
||||
#
|
||||
# That's it - the scripts will do everything else for you.
|
||||
|
||||
sudo: false
|
||||
|
||||
python: "2.7"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
dist: trusty
|
||||
language: cpp
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- BOGUS_JOB=true
|
||||
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
|
||||
|
||||
matrix:
|
||||
install:
|
||||
- export SELF=`basename $TRAVIS_BUILD_DIR`
|
||||
- cd ..
|
||||
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
- cd boost-root
|
||||
- git submodule update -q --init tools/boostdep
|
||||
- git submodule update -q --init tools/build
|
||||
- git submodule update -q --init tools/inspect
|
||||
- cp -r $TRAVIS_BUILD_DIR/* libs/$SELF
|
||||
- export BOOST_ROOT="`pwd`"
|
||||
- export PATH="`pwd`":$PATH
|
||||
- python tools/boostdep/depinst/depinst.py $SELF
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
|
||||
exclude:
|
||||
- env: BOGUS_JOB=true
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- binutils-gold
|
||||
- gdb
|
||||
- libc6-dbg
|
||||
|
||||
branches:
|
||||
only:
|
||||
- develop
|
||||
- master
|
||||
|
||||
script:
|
||||
- cd libs/$SELF
|
||||
- ci/build.sh
|
||||
|
||||
jobs:
|
||||
include:
|
||||
#################### Jobs to run on every pull request ####################
|
||||
- os: linux
|
||||
compiler: g++
|
||||
env: TOOLSET=gcc CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
compiler: g++-5
|
||||
env: TOOLSET=gcc-5 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-5
|
||||
- valgrind
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-6
|
||||
env: TOOLSET=gcc-6 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-6
|
||||
- valgrind
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-7
|
||||
env: TOOLSET=gcc-7 CXXSTD=03,11,14,17
|
||||
env:
|
||||
- COMMENT="C++03"
|
||||
- TOOLSET=gcc,gcc-7,clang
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
- valgrind
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
||||
env:
|
||||
- COMMENT="C++11"
|
||||
- TOOLSET=gcc,gcc-7,clang
|
||||
- CXXSTD=11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libstdc++-4.9-dev
|
||||
- valgrind
|
||||
- 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: osx
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang CXXSTD=03,11,14,1z
|
||||
- os: linux
|
||||
env:
|
||||
- COMMENT=cppcheck
|
||||
script:
|
||||
- libs/$SELF/ci/cppcheck.sh
|
||||
|
||||
install:
|
||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
- cd ..
|
||||
- git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root
|
||||
- cd boost-root
|
||||
- git submodule update --init tools/build
|
||||
- git submodule update --init libs/config
|
||||
- git submodule update --init tools/boostdep
|
||||
- cp -r $TRAVIS_BUILD_DIR/* libs/pool
|
||||
- python tools/boostdep/depinst/depinst.py pool
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
# issue-19
|
||||
# - 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
|
||||
|
||||
script:
|
||||
- ./b2 -j 3 libs/pool/test toolset=$TOOLSET cxxstd=$CXXSTD
|
||||
- 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 libs/$SELF
|
||||
- ci/codecov.sh
|
||||
|
||||
# osx was disabled because it is very slow to start (can delay builds by 30 minutes)
|
||||
# - os: osx
|
||||
# osx_image: xcode9
|
||||
# env:
|
||||
# - TOOLSET=clang
|
||||
# - CXXSTD=03,11
|
||||
|
||||
#################### Jobs to run on pushes to master, develop ###################
|
||||
|
||||
# Coverity Scan
|
||||
- os: linux
|
||||
if: (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 libs/$SELF
|
||||
- ci/coverity.sh
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: always
|
||||
false
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Boost.Pool 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 ;
|
||||
@@ -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.
|
||||
@@ -0,0 +1,35 @@
|
||||
Pool, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), provides an efficient way to handle memory suballocation for fixed-size items.
|
||||
|
||||
### License
|
||||
|
||||
Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
### Properties
|
||||
|
||||
* C++03
|
||||
* Requires linking against Boost.Thread, Boost.System if BOOST_POOL_NO_MT is defined, otherwise header-only (see [trac-7085](https://svn.boost.org/trac10/ticket/7085))
|
||||
|
||||
### Build Status
|
||||
|
||||
Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
|
||||
:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
|
||||
[`master`](https://github.com/boostorg/pool/tree/master) | [](https://travis-ci.org/boostorg/pool) | [](https://ci.appveyor.com/project/maintainer/pool-xyzzy/branch/master) | [](https://scan.coverity.com/projects/boostorg-pool) | [](https://codecov.io/gh/boostorg/pool/branch/master)| [](https://pdimov.github.io/boostdep-report/master/pool.html) | [](http://www.boost.org/doc/libs/master/doc/html/pool.html) | [](http://www.boost.org/development/tests/master/developer/pool.html)
|
||||
[`develop`](https://github.com/boostorg/pool/tree/develop) | [](https://travis-ci.org/boostorg/pool) | [](https://ci.appveyor.com/project/maintainer/pool-xyzzy/branch/develop) | [](https://scan.coverity.com/projects/boostorg-pool) | [](https://codecov.io/gh/boostorg/pool/branch/develop) | [](https://pdimov.github.io/boostdep-report/develop/pool.html) | [](http://www.boost.org/doc/libs/develop/doc/html/pool.html) | [](http://www.boost.org/development/tests/develop/developer/pool.html)
|
||||
|
||||
### Directories
|
||||
|
||||
| Name | Purpose |
|
||||
| ----------- | ------------------------------ |
|
||||
| `ci` | continuous integration scripts |
|
||||
| `doc` | documentation |
|
||||
| `example` | examples |
|
||||
| `include` | headers |
|
||||
| `test` | unit tests |
|
||||
|
||||
### More information
|
||||
|
||||
* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-pool)
|
||||
* [Report bugs](https://github.com/boostorg/pool/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.
|
||||
* Submit your patches as pull requests against **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).
|
||||
* 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 `[pool]` tag at the beginning of the subject line.
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
# 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
|
||||
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
|
||||
TOOLSET: gcc
|
||||
- FLAVOR: mingw32
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARCH: i686
|
||||
B2_ADDRESS_MODEL: address-model=32
|
||||
SCRIPT: ci\mingw.bat
|
||||
- FLAVOR: mingw64
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARCH: x86_64
|
||||
B2_ADDRESS_MODEL: address-model=64
|
||||
SCRIPT: ci\mingw.bat
|
||||
|
||||
install:
|
||||
- set SELF=%APPVEYOR_PROJECT_SLUG:-=_%
|
||||
- cd ..
|
||||
- git clone -b %APPVEYOR_REPO_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
- cd boost-root
|
||||
- git submodule update -q --init tools/boostdep
|
||||
- git submodule update -q --init tools/build
|
||||
- git submodule update -q --init tools/inspect
|
||||
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\%SELF%
|
||||
- python tools/boostdep/depinst/depinst.py --include example --include tools %SELF%
|
||||
- cmd /c bootstrap
|
||||
- b2 headers
|
||||
|
||||
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% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# Copyright 2017 James E. King III
|
||||
# Distributed under 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)
|
||||
#
|
||||
# Bash script to run in travis to perform a bjam build
|
||||
# cwd should be $BOOST_ROOT/libs/$SELF before running
|
||||
#
|
||||
|
||||
set -ex
|
||||
|
||||
# default language level: c++03
|
||||
if [[ -z "$CXXSTD" ]]; then
|
||||
CXXSTD=03
|
||||
fi
|
||||
|
||||
$BOOST_ROOT/b2 . toolset=$TOOLSET cxxstd=$CXXSTD $CXXFLAGS $DEFINES $LINKFLAGS $TESTFLAGS $B2_ADDRESS_MODEL $B2_LINK $B2_THREADING $B2_VARIANT -j3 $*
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# 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://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
# Bash script to run in travis to perform codecov.io integration
|
||||
#
|
||||
|
||||
###
|
||||
### NOTE: Make sure you grab .codecov.yml
|
||||
###
|
||||
|
||||
# assumes cwd is the top level directory of the boost project
|
||||
# assumes an environment variable $SELF is the boost project name
|
||||
|
||||
set -ex
|
||||
|
||||
B2_VARIANT=debug
|
||||
ci/build.sh cxxflags=-fprofile-arcs cxxflags=-ftest-coverage linkflags=-fprofile-arcs linkflags=-ftest-coverage
|
||||
|
||||
# switch back to the original source code directory
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
|
||||
# get the version of lcov
|
||||
lcov --version
|
||||
|
||||
# coverage files are in ../../b2 from this location
|
||||
lcov --gcov-tool=gcov-7 --rc lcov_branch_coverage=1 --base-directory "$BOOST_ROOT/libs/$SELF" --directory "$BOOST_ROOT" --capture --output-file all.info
|
||||
|
||||
# all.info contains all the coverage info for all projects - limit to ours
|
||||
lcov --gcov-tool=gcov-7 --rc lcov_branch_coverage=1 --extract all.info "*/boost/$SELF/*" "*/libs/$SELF/src/*" --output-file coverage.info
|
||||
|
||||
# dump a summary on the console - helps us identify problems in pathing
|
||||
lcov --gcov-tool=gcov-7 --rc lcov_branch_coverage=1 --list coverage.info
|
||||
|
||||
#
|
||||
# upload to codecov.io
|
||||
#
|
||||
curl -s https://codecov.io/bash > .codecov
|
||||
chmod +x .codecov
|
||||
./.codecov -f coverage.info -X gcov -x "gcov-7"
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# Copyright 2017 James E. King III
|
||||
# Distributed under 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)
|
||||
#
|
||||
# Bash script to run in travis to perform a Coverity Scan build
|
||||
# To skip the coverity integration download (which is huge) if
|
||||
# you already have it from a previous run, add --skipdownload
|
||||
#
|
||||
|
||||
#
|
||||
# Environment Variables
|
||||
#
|
||||
# COVERITY_SCAN_NOTIFICATION_EMAIL - email address to notify
|
||||
# COVERITY_SCAN_TOKEN - the Coverity Scan token (should be secure)
|
||||
# SELF - the boost libs directory name
|
||||
|
||||
set -ex
|
||||
|
||||
pushd /tmp
|
||||
if [[ "$1" != "--skipdownload" ]]; then
|
||||
rm -rf coverity_tool.tgz cov-analysis*
|
||||
wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=boostorg/$SELF" -O coverity_tool.tgz
|
||||
tar xzf coverity_tool.tgz
|
||||
fi
|
||||
COVBIN=$(echo $(pwd)/cov-analysis*/bin)
|
||||
export PATH=$COVBIN:$PATH
|
||||
popd
|
||||
|
||||
ci/build.sh clean
|
||||
rm -rf cov-int/
|
||||
cov-build --dir cov-int ci/build.sh
|
||||
tar cJf cov-int.tar.xz cov-int/
|
||||
curl --form token="$COVERITY_SCAN_TOKEN" \
|
||||
--form email="$COVERITY_SCAN_NOTIFICATION_EMAIL" \
|
||||
--form file=@cov-int.tar.xz \
|
||||
--form version="$(git describe --tags)" \
|
||||
--form description="boostorg/$SELF" \
|
||||
https://scan.coverity.com/builds?project="boostorg/$SELF"
|
||||
|
||||
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# Copyright 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://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
# Bash script to run in travis to perform a cppcheck
|
||||
# cwd should be $BOOST_ROOT before running
|
||||
#
|
||||
|
||||
set -ex
|
||||
|
||||
# default language level: c++03
|
||||
if [[ -z "$CXXSTD" ]]; then
|
||||
CXXSTD=03
|
||||
fi
|
||||
|
||||
# Travis' ubuntu-trusty comes with cppcheck 1.62 which is pretty old
|
||||
# default cppcheck version: 1.82
|
||||
if [[ -z "$CPPCHKVER" ]]; then
|
||||
CPPCHKVER=1.82
|
||||
fi
|
||||
|
||||
pushd ~
|
||||
wget https://github.com/danmar/cppcheck/archive/$CPPCHKVER.tar.gz
|
||||
tar xzf $CPPCHKVER.tar.gz
|
||||
mkdir cppcheck-build
|
||||
cd cppcheck-build
|
||||
cmake ../cppcheck-$CPPCHKVER -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=~/cppcheck
|
||||
make -j3 install
|
||||
popd
|
||||
|
||||
~/cppcheck/bin/cppcheck -I. --std=c++$CXXSTD --enable=all --error-exitcode=1 \
|
||||
--force --check-config --suppress=*:boost/preprocessor/tuple/size.hpp \
|
||||
-UBOOST_USER_CONFIG -UBOOST_COMPILER_CONFIG -UBOOST_STDLIB_CONFIG -UBOOST_PLATFORM_CONFIG \
|
||||
libs/$SELF 2>&1 | grep -v 'Cppcheck does not need standard library headers'
|
||||
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
::
|
||||
:: MinGW Build Script for Appveyor, leveraging the MSYS2 installation
|
||||
:: Copyright (C) 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)
|
||||
::
|
||||
|
||||
@ECHO ON
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
:: Set up the toolset
|
||||
echo using gcc : %FLAVOR% : %ARCH%-w64-mingw32-g++.exe ; > %USERPROFILE%\user-config.jam
|
||||
SET UPPERFLAVOR=%FLAVOR%
|
||||
CALL :TOUPPER UPPERFLAVOR
|
||||
|
||||
:: Install packages needed to build boost
|
||||
:: Optional: comment out ones this library does not need,
|
||||
:: so people can copy this script to another library.
|
||||
|
||||
FOR %%a IN ("gcc" "icu" "libiconv" "openssl" "xz" "zlib") DO (
|
||||
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
|
||||
"pacman --sync --needed --noconfirm %FLAVOR%/mingw-w64-%ARCH%-%%a" || EXIT /B
|
||||
)
|
||||
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
|
||||
"pacman --sync --needed --noconfirm python3" || EXIT /B
|
||||
|
||||
::
|
||||
:: Now build things...
|
||||
::
|
||||
|
||||
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
|
||||
"cd %CD:\=/% && ./bootstrap.sh --with-toolset=gcc" || EXIT /B
|
||||
|
||||
c:\msys64\usr\bin\env MSYSTEM=%UPPERFLAVOR% c:\msys64\usr\bin\bash -l -c ^
|
||||
"cd %CD:\=/% && ./b2 libs/%SELF% toolset=gcc-%FLAVOR% cxxstd=%CXXSTD% %CXXFLAGS% %DEFINES% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3" || EXIT /B
|
||||
|
||||
EXIT /B 0
|
||||
|
||||
::
|
||||
:: Function to uppercase a variable
|
||||
:: from: https://stackoverflow.com/questions/34713621/batch-converting-variable-to-uppercase
|
||||
::
|
||||
|
||||
:TOUPPER <variable>
|
||||
@ECHO OFF
|
||||
FOR %%a IN ("a=A" "b=B" "c=C" "d=D" "e=E" "f=F" "g=G" "h=H" "i=I"
|
||||
"j=J" "k=K" "l=L" "m=M" "n=N" "o=O" "p=P" "q=Q" "r=R"
|
||||
"s=S" "t=T" "u=U" "v=V" "w=W" "x=X" "y=Y" "z=Z" ) DO ( CALL SET %~1=%%%~1:%%~a%% )
|
||||
@ECHO ON
|
||||
GOTO :EOF
|
||||
@@ -0,0 +1,24 @@
|
||||
# Boost.Pool 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 os ;
|
||||
import testing ;
|
||||
|
||||
project
|
||||
: requirements
|
||||
<library>/boost/system//boost_system
|
||||
<define>BOOST_ALL_NO_LIB=1
|
||||
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
||||
;
|
||||
|
||||
if ! [ os.environ VALGRIND_OPTS ]
|
||||
{
|
||||
test-suite "pool-examples"
|
||||
: [ run time_pool_alloc.cpp ]
|
||||
;
|
||||
}
|
||||
|
||||
+26
-62
@@ -1,4 +1,5 @@
|
||||
#~ Copyright Rene Rivera 2008
|
||||
#~ Copyright James E. King III 2018
|
||||
#~ Distributed under 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)
|
||||
|
||||
@@ -8,78 +9,41 @@ project
|
||||
<library>/boost/system//boost_system
|
||||
<define>BOOST_ALL_NO_LIB=1
|
||||
<warnings>all
|
||||
<toolset>clang:<cxxflags>-Wextra
|
||||
<toolset>clang:<cxxflags>-Wno-variadic-macros
|
||||
<toolset>gcc:<cxxflags>-Wextra
|
||||
<toolset>gcc:<cxxflags>-Wshadow
|
||||
# <toolset>gcc:<warnings-as-errors>on
|
||||
<toolset>gcc:<cxxflags>-Wno-long-long
|
||||
<toolset>pathscale:<cxxflags>-Wno-long-long
|
||||
<toolset>gcc:<cxxflags>-Wcast-align
|
||||
# <toolset>msvc:<warnings-as-errors>on
|
||||
<toolset>gcc:<cxxflags>-Wno-variadic-macros
|
||||
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
|
||||
;
|
||||
|
||||
import common ;
|
||||
import os ;
|
||||
import testing ;
|
||||
|
||||
obj valgrind_config_check : valgrind_config_check.cpp ;
|
||||
explicit valgrind_config_check ;
|
||||
|
||||
local VALGRIND = [ common.find-tool valgrind ] ;
|
||||
|
||||
local use-valgrind = <build>no ;
|
||||
if $(VALGRIND)
|
||||
{
|
||||
use-valgrind = [ check-target-builds valgrind_config_check "valgrind"
|
||||
: <testing.launcher>"$(VALGRIND) --error-exitcode=1"
|
||||
: <build>no ] ;
|
||||
}
|
||||
|
||||
local Werr = <toolset>gcc:<warnings-as-errors>on <toolset>msvc:<warnings-as-errors>on ;
|
||||
|
||||
test-suite pool :
|
||||
[ run test_simple_seg_storage.cpp : : : $(Werr) <toolset>msvc:<cxxflags>-wd4267 ]
|
||||
[ run test_pool_alloc.cpp : : : $(Werr) ]
|
||||
[ run pool_msvc_compiler_bug_test.cpp : : : $(Werr) <toolset>msvc:<cxxflags>-wd4512 ]
|
||||
[ run test_msvc_mem_leak_detect.cpp : : : $(Werr) ]
|
||||
[ run test_bug_3349.cpp : : : $(Werr) ]
|
||||
[ run test_bug_4960.cpp : : : $(Werr) ]
|
||||
[ run test_bug_1252.cpp : : : $(Werr) ]
|
||||
[ run test_bug_2696.cpp : : : $(Werr) ]
|
||||
[ run test_bug_5526.cpp : : : $(Werr) ]
|
||||
[ run test_simple_seg_storage.cpp : : : <toolset>msvc:<cxxflags>-wd4267 ]
|
||||
[ run test_pool_alloc.cpp ]
|
||||
[ run pool_msvc_compiler_bug_test.cpp : : : <toolset>msvc:<cxxflags>-wd4512 ]
|
||||
[ run test_msvc_mem_leak_detect.cpp ]
|
||||
[ run test_bug_3349.cpp ]
|
||||
[ run test_bug_4960.cpp ]
|
||||
[ run test_bug_1252.cpp : : :
|
||||
<toolset>clang:<cxxflags>-Wno-c++11-long-long
|
||||
<toolset>gcc:<cxxflags>-Wno-long-long
|
||||
<toolset>pathscale:<cxxflags>-Wno-long-long ]
|
||||
[ run test_bug_2696.cpp ]
|
||||
[ run test_bug_5526.cpp ]
|
||||
[ run test_threading.cpp : : : <threading>multi <library>/boost/thread//boost_thread ]
|
||||
[ run ../example/time_pool_alloc.cpp : : : $(Werr) ]
|
||||
[ compile test_poisoned_macros.cpp : $(Werr) ]
|
||||
|
||||
#
|
||||
# The following tests test Boost.Pool's code with valgrind only if it's available:
|
||||
#
|
||||
[ run test_simple_seg_storage.cpp : : : $(use-valgrind) : test_simple_seg_storage_valgrind ]
|
||||
[ run test_pool_alloc.cpp : : : $(use-valgrind) : test_pool_alloc_valgrind ]
|
||||
[ run pool_msvc_compiler_bug_test.cpp : : : $(use-valgrind) : pool_msvc_compiler_bug_test_valgrind ]
|
||||
[ run test_msvc_mem_leak_detect.cpp : : : $(use-valgrind) : test_msvc_mem_leak_detect_valgrind ]
|
||||
[ run test_bug_3349.cpp : : : $(use-valgrind) : test_bug_3349_valgrind ]
|
||||
[ run test_bug_4960.cpp : : : $(use-valgrind) : test_bug_4960_valgrind ]
|
||||
[ run test_bug_1252.cpp : : : $(use-valgrind) : test_bug_1252_valgrind ]
|
||||
[ run test_bug_2696.cpp : : : $(use-valgrind) : test_bug_2696_valgrind ]
|
||||
[ run test_bug_5526.cpp : : : $(use-valgrind) : test_bug_5526_valgrind ]
|
||||
[ run test_threading.cpp : : : <threading>multi <library>/boost/thread//boost_thread <toolset>gcc:<cxxflags>-Wno-attributes <toolset>gcc:<cxxflags>-Wno-missing-field-initializers $(use-valgrind) : test_threading_valgrind ]
|
||||
|
||||
#
|
||||
# The following tests test Boost.Pool's code with valgrind if it's available, and in any case with BOOST_POOL_VALGRIND defined
|
||||
# which has the effect of disabling any actual memory pooling:
|
||||
#
|
||||
[ run test_simple_seg_storage.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) : test_simple_seg_storage_valgrind_2 ]
|
||||
[ run test_pool_alloc.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) : test_pool_alloc_valgrind_2 ]
|
||||
[ run pool_msvc_compiler_bug_test.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) : pool_msvc_compiler_bug_test_valgrind_2 ]
|
||||
[ run test_msvc_mem_leak_detect.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) : test_msvc_mem_leak_detect_valgrind_2 ]
|
||||
[ run test_bug_3349.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) : test_bug_3349_valgrind_2 ]
|
||||
[ run test_bug_4960.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) : test_bug_4960_valgrind_2 ]
|
||||
[ run test_bug_1252.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) : test_bug_1252_valgrind_2 ]
|
||||
[ run test_bug_2696.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) : test_bug_2696_valgrind_2 ]
|
||||
[ run test_bug_5526.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) : test_bug_5526_valgrind_2 ]
|
||||
[ run test_threading.cpp : : : <threading>multi <library>/boost/thread//boost_thread <define>BOOST_POOL_VALGRIND=1 <toolset>gcc:<cxxflags>-Wno-attributes <toolset>gcc:<cxxflags>-Wno-missing-field-initializers $(use-valgrind) : test_threading_valgrind_2 ]
|
||||
[ run-fail test_valgrind_fail_1.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) ]
|
||||
[ run-fail test_valgrind_fail_2.cpp : : : <define>BOOST_POOL_VALGRIND=1 $(use-valgrind) ]
|
||||
[ compile test_poisoned_macros.cpp ]
|
||||
;
|
||||
|
||||
if [ os.environ VALGRIND_OPTS ]
|
||||
{
|
||||
test-suite pool-valgrind :
|
||||
[ run test_pool_alloc.cpp : : : <define>BOOST_POOL_VALGRIND=1 : test_pool_alloc_valgrind ]
|
||||
[ run-fail test_valgrind_fail_1.cpp : : : <define>BOOST_POOL_VALGRIND=1 ]
|
||||
[ run-fail test_valgrind_fail_2.cpp : : : <define>BOOST_POOL_VALGRIND=1 ]
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user