Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Jan 11, 2021
2 parents 15a2623 + 8281e57 commit ed6939a
Show file tree
Hide file tree
Showing 16 changed files with 463 additions and 195 deletions.
57 changes: 57 additions & 0 deletions .github/codecov.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#! /bin/bash
#
# Copyright 2017 - 2019 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 on Github Actions to perform codecov.io integration
#

# assumes an environment variable $LIBRARY set to the boost project name
# and BOOST_ROOT to be set

set -eux

if [[ "$1" == "setup" ]]; then
echo "B2_VARIANT=debug" >> "$GITHUB_ENV"
echo "B2_FLAGS=cxxflags=--coverage linkflags=--coverage" >> "$GITHUB_ENV"
else
ver=7 # default
if [ "${B2_COMPILER%%-*}" == "g++" ]; then
if [[ "$B2_COMPILER" =~ g\+\+- ]]; then
ver="${B2_COMPILER##*g++-}"
fi
fi
GCOV=gcov-${ver}

# install the latest lcov we know works
rm -rf /tmp/lcov
pushd /tmp
git clone -b v1.14 https://github.com/linux-test-project/lcov.git
export PATH=/tmp/lcov/bin:$PATH
command -v lcov
lcov --version
popd

# switch back to the original source code directory
cd "$GITHUB_WORKSPACE"
: "${LCOV_BRANCH_COVERAGE:=1}" # Set default

lcov --gcov-tool="$GCOV" --rc lcov_branch_coverage=${LCOV_BRANCH_COVERAGE} --base-directory "$BOOST_ROOT/libs/$LIBRARY" --directory "$BOOST_ROOT" --capture --output-file all.info

# all.info contains all the coverage info for all projects - limit to ours
# first we extract the interesting headers for our project then we use that list to extract the right things
for f in $(for f2 in include/boost/*; do echo "$f2"; done | cut -f2- -d/); do echo "*/$f*"; done > /tmp/interesting
echo headers that matter:
cat /tmp/interesting
xargs -L 999999 -a /tmp/interesting lcov --gcov-tool="$GCOV" --rc lcov_branch_coverage=${LCOV_BRANCH_COVERAGE} --extract all.info {} "*/libs/$LIBRARY/src/*" --output-file coverage.info

# dump a summary on the console - helps us identify problems in pathing
lcov --gcov-tool="$GCOV" --rc lcov_branch_coverage=${LCOV_BRANCH_COVERAGE} --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"
fi
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Set BOOST_ROOT
if: matrix.standalone == 'Boost'
shell: bash
run: echo "::set-env name=BOOST_ROOT::${DEP_DIR//\\/\/}/boost_${BOOST_VERSION//./_}"
run: echo "BOOST_ROOT=${DEP_DIR//\\/\/}/boost_${BOOST_VERSION//./_}" >> $GITHUB_ENV
# Install Boost
- uses: actions/checkout@v2
if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true'
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: POSIX

on:
pull_request:
push:
branches:
- master
- develop
- feature/**

env:
UBSAN_OPTIONS: print_stacktrace=1
B2_VARIANT: debug,release
B2_LINK: shared,static

jobs:
CI:
strategy:
fail-fast: false
matrix:
include:
- { compiler: g++-4.4, cxxstd: '98,0x', os: ubuntu-16.04, install: yes }
- { compiler: g++-5, cxxstd: '03,11,14', os: ubuntu-16.04, install: yes }
- { compiler: g++-6, cxxstd: '03,11,14,17', os: ubuntu-16.04, install: yes }
- { compiler: g++-7, cxxstd: '03,11,14,17', os: ubuntu-20.04, install: yes }
- { compiler: g++-8, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04, install: yes }
- { compiler: g++-9, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04, install: yes }
- { compiler: g++-10, cxxstd: '03,11,14,17,2a', sanitize: yes, os: ubuntu-20.04, install: yes, linkflags: -fuse-ld=gold }
- { compiler: clang++-3.5, cxxstd: '03,11', os: ubuntu-16.04, install: yes }
- { compiler: clang++-6.0, cxxstd: '03,11', os: ubuntu-16.04, install: yes }
- { compiler: clang++-7, cxxstd: '03,11', os: ubuntu-18.04, install: yes }
- { compiler: clang++-8, cxxstd: '03,11,14', os: ubuntu-18.04, install: yes }
- { compiler: clang++-9, cxxstd: '03,11,14', os: ubuntu-18.04, install: yes }
- { compiler: clang++-10, cxxstd: '03,11,14,17,2a', sanitize: yes, os: ubuntu-20.04, install: yes }
- { compiler: clang++-libc++, cxxstd: '03,11,14', os: ubuntu-18.04, install: 'libc++-dev libc++-helpers' }
- { compiler: clang++, cxxstd: '03,11,14,1z', sanitize: yes, os: macos-10.15 }
# Codecov
- { compiler: g++-8, cxxstd: '03,11', coverage: yes, os: ubuntu-20.04, install: yes }

runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v2

- name: Install packages
if: matrix.install
run: |
if [[ "${{matrix.install}}" == "yes" ]]; then
pkgs="${{matrix.compiler}}"
pkgs="${pkgs/clang++-/clang-}"
else
pkgs="${{matrix.install}}"
fi
sudo apt install $pkgs
- name: Setup config vars
run: |
echo "LIBRARY=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
echo "B2_COMPILER=${{matrix.compiler}}" >> $GITHUB_ENV
${{matrix.compiler}} --version
if [[ "${{matrix.compiler}}" =~ clang ]]; then
B2_TOOLSET=clang
elif [[ "${{matrix.compiler}}" =~ g\+\+ ]]; then
B2_TOOLSET=gcc
else
echo "Unknown compiler: ${{matrix.compiler}}" >&2
false
fi
echo "using $B2_TOOLSET : : ${{matrix.compiler}} ;" > ~/user-config.jam
echo "B2_TOOLSET=$B2_TOOLSET" >> $GITHUB_ENV
echo "B2_CXXSTD=${{matrix.cxxstd}}" >> $GITHUB_ENV
if [[ "${{matrix.sanitize}}" == "yes" ]]; then
echo "B2_ASAN=address-sanitizer=norecover" >> $GITHUB_ENV
echo "B2_UBSAN=undefined-sanitizer=norecover" >> $GITHUB_ENV
fi
[[ "${{matrix.linkflags}}" == "" ]] || echo "B2_LINKFLAGS=linkflags=${{matrix.linkflags}}" >> $GITHUB_ENV
- name: Setup Boost
run: |
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
echo "BOOST_ROOT=$PWD" >> $GITHUB_ENV
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
./bootstrap.sh
./b2 headers
- name: Setup coverage
if: matrix.coverage
run: .github/codecov.sh setup

- name: Run tests
working-directory: ${{env.BOOST_ROOT}}
run: ./b2 -j3 libs/$LIBRARY/test toolset=$B2_TOOLSET cxxstd=$B2_CXXSTD variant=$B2_VARIANT link=$B2_LINK $B2_ASAN $B2_UBSAN $B2_LINKFLAGS $B2_FLAGS

- name: Collect coverage
if: matrix.coverage
run: ${{github.workspace}}/.github/codecov.sh collect
151 changes: 0 additions & 151 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

cmake_minimum_required(VERSION 3.9)
# Version number starts at 10 to avoid conflicts with Boost version
set(_version 11.0.0)
set(_version 11.1.0)
if(BOOST_SUPERPROJECT_SOURCE_DIR)
set(_version ${BOOST_SUPERPROJECT_VERSION})
endif()
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Boost.Nowide

Branch | Travis | Appveyor | Github | codecov.io | Documentation
------------|--------|----------|--------|------------|--------------
[master](https://github.com/boostorg/nowide/tree/master) | [![Build Status](https://travis-ci.com/boostorg/nowide.svg?branch=master)](https://travis-ci.com/boostorg/nowide) | [![Build status](https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/master?svg=true)](https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/master) | ![](https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=master) | [![codecov](https://codecov.io/gh/boostorg/nowide/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/nowide/branch/master) | [![Documentation](https://img.shields.io/badge/documentation-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/nowide/index.html)
[develop](https://github.com/boostorg/nowide/tree/develop) | [![Build Status](https://travis-ci.com/boostorg/nowide.svg?branch=develop)](https://travis-ci.com/boostorg/nowide) | [![Build status](https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/develop?svg=true)](https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/develop) | ![](https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=develop) | [![codecov](https://codecov.io/gh/boostorg/nowide/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/nowide/branch/develop) | [![Documentation](https://img.shields.io/badge/documentation-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/nowide/index.html)
Branch | Appveyor | Github | codecov.io | Documentation
------------|----------|--------|------------|--------------
[master](https://github.com/boostorg/nowide/tree/master) | [![Build status](https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/master?svg=true)](https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/master) | ![](https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=master) ![](https://github.com/boostorg/nowide/workflows/POSIX/badge.svg?branch=master) | [![codecov](https://codecov.io/gh/boostorg/nowide/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/nowide/branch/master) | [![Documentation](https://img.shields.io/badge/documentation-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/nowide/index.html)
[develop](https://github.com/boostorg/nowide/tree/develop) | [![Build status](https://ci.appveyor.com/api/projects/status/w5sywrekwd66say4/branch/develop?svg=true)](https://ci.appveyor.com/project/Flamefire/nowide-fr98b/branch/develop) | ![](https://github.com/boostorg/nowide/workflows/CI%20Tests/badge.svg?branch=develop) ![](https://github.com/boostorg/nowide/workflows/POSIX/badge.svg?branch=develop) | [![codecov](https://codecov.io/gh/boostorg/nowide/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/nowide/branch/develop) | [![Documentation](https://img.shields.io/badge/documentation-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/nowide/index.html)

Coverity Scan: [![Coverity Scan Build Status](https://scan.coverity.com/projects/20464/badge.svg)](https://scan.coverity.com/projects/boostorg-nowide)

Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ FILE_PATTERNS = *.cpp *.hpp *.md *.dox
# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.

RECURSIVE = NO
RECURSIVE = YES

# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
Expand Down
Loading

0 comments on commit ed6939a

Please sign in to comment.