Skip to content

Fail CI on failure to upload coverage #468

Fail CI on failure to upload coverage

Fail CI on failure to upload coverage #468

Workflow file for this run

# Copyright 2020-2021 Peter Dimov
# Copyright 2021 Andrey Semashev
# Copyright 2021 Alexander Grund
#
# 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)
name: Compatibility CI
on:
pull_request:
push:
branches:
- master
- develop
- feature/**
concurrency:
group: ${{format('compat-{0}:{1}', github.repository, github.ref)}}
cancel-in-progress: true
jobs:
posix:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- name: Old var usage
env:
B2_TOOLSET: gcc-8
B2_ADDRESS_MODEL: address-model=64
B2_LINK: link=shared,static
B2_THREADING: threading=multi,single
B2_VARIANT: variant=release
# Possible (ab)usage
B2_CXXFLAGS: define=norecover
B2_DEFINES: define=BOOST_NO_STRESS_TEST=1
B2_LINKFLAGS: linkflags=-fuse-ld=gold
os: ubuntu-20.04
install: g++-8
- name: Old var usage, multiple values per key
env:
B2_TOOLSET: gcc-8
B2_ADDRESS_MODEL: address-model=64
B2_LINK: link=shared,static
B2_THREADING: threading=multi,single
B2_VARIANT: variant=release
# Possible (ab)usage
B2_CXXFLAGS: define=norecover
B2_DEFINES: define=BOOST_NO_STRESS_TEST=1 define=BOOST_IMPORTANT=1
B2_LINKFLAGS: linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=all linkflags=-fuse-ld=gold
os: ubuntu-20.04
install: g++-8
- name: New var usage, multiple values per key
env:
B2_CI_VERSION: 1
B2_TOOLSET: gcc-8
B2_ADDRESS_MODEL: 64
B2_LINK: shared,static
B2_THREADING: threading=multi,single
B2_VARIANT: release
B2_DEFINES: BOOST_NO_STRESS_TEST=1 BOOST_IMPORTANT=1 BOOST_ALSO_IMPORTANT="with space"
B2_LINKFLAGS: -fsanitize=undefined -fno-sanitize-recover=all -fuse-ld=gold
B2_FLAGS: define=BOOST_CI_TEST_DEFINES=1
os: ubuntu-20.04
install: g++-8
- name: Travis-like coverage collection
coverage: yes
env:
B2_TOOLSET: gcc-8
B2_CXXSTD: 03,11
B2_DEFINES: define=BOOST_NO_STRESS_TEST=1
os: ubuntu-20.04
install: g++-8
- name: Travis-like coverage collection with set CXX/LINK-flags
coverage: yes
env:
B2_TOOLSET: gcc-8
B2_CXXSTD: 03,11
B2_CXXFLAGS: cxxflags=-g0
B2_LINKFLAGS: linkflags=-fuse-ld=gold
os: ubuntu-20.04
install: g++-8
- name: Coverage LCOV v2.0
coverage: yes
os: ubuntu-22.04
install: 'libcapture-tiny-perl libdatetime-perl'
address-model: '32,64'
env:
B2_TOOLSET: gcc-12
B2_CXXSTD: 14,17
B2_DEFINES: define=BOOST_NO_STRESS_TEST=1
LCOV_VERSION: 'v2.0'
name: ${{matrix.name}}
timeout-minutes: 120
runs-on: ${{matrix.os}}
env: ${{matrix.env}}
steps:
- name: Setup environment
run: |
[ ! -f "/etc/debian_version" ] || echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
git config --global pack.threads 0
- uses: actions/checkout@v4
if: '!matrix.coverage'
- uses: actions/checkout@v4
if: 'matrix.coverage'
with: { fetch-depth: 0 }
- name: Install packages
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y ${{matrix.install}}
- name: Setup Boost
run: source ci/github/install.sh
- name: Run tests
if: '!matrix.coverage'
run: ci/build.sh
- name: Collect and upload coverage (old way)
if: matrix.coverage
run: ci/travis/codecov.sh
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}