File: coverage.yml

package info (click to toggle)
boost1.90 1.90.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 593,156 kB
  • sloc: cpp: 4,190,642; xml: 196,648; python: 34,618; ansic: 23,145; asm: 5,468; sh: 3,776; makefile: 1,161; perl: 1,020; sql: 728; ruby: 676; yacc: 478; java: 77; lisp: 24; csh: 6
file content (54 lines) | stat: -rw-r--r-- 1,671 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Code Coverage

on:
  pull_request:
  push:
    branches:
      - master
      - develop

env:
  LIBRARY: gil
  UBSAN_OPTIONS: print_stacktrace=1

jobs:
  coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: install packages
        run: |
          sudo apt update
          sudo apt install g++ libpng-dev libjpeg-dev libtiff5-dev libraw-dev lcov python-is-python3 -y

      - 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
          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 -d0 headers

      - name: Create user-config.jam
        run: |
          echo "using gcc : : g++ ;" > ~/user-config.jam
        
      - name: Run tests
        run: |
          cd ../boost-root
          ./b2 -j3 libs/$LIBRARY/test coverage=on toolset=gcc cxxstd=14 variant=debug
          lcov --directory bin.v2 --capture --no-external --directory $(pwd) --output-file coverage.info > /dev/null 2>&1
          lcov --extract coverage.info $(pwd)'/boost/gil/*' --output-file coverage.info > /dev/null
          lcov --list coverage.info

      - name: Upload to Codecov
        uses: codecov/codecov-action@v1.2.1
        with:
          files: ../boost-root/coverage.info