File: coveralls.yml

package info (click to toggle)
quantlib 1.41-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,480 kB
  • sloc: cpp: 400,885; makefile: 6,547; python: 214; sh: 150; lisp: 86
file content (42 lines) | stat: -rw-r--r-- 1,408 bytes parent folder | download
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
name: Coverage report
on:
  push:
    branches:
      - master
  pull_request:
  workflow_dispatch:
jobs:
  coverage:
    runs-on: ubuntu-22.04
    steps:
    - uses: actions/checkout@v6
    - name: Setup
      run: |
        sudo rm /etc/apt/sources.list.d/microsoft-prod.list
        sudo apt update
        sudo apt install -y lcov libboost-dev
    - name: Compile
      run: |
        ./autogen.sh
        ./configure --disable-shared CXXFLAGS='-O1 -fprofile-arcs -ftest-coverage' LDFLAGS='-lgcov'
        make -j 4
    - name: Capture baseline
      run: |
        mkdir -p coverage tmp
        lcov --no-external --capture --initial --directory . --output-file ./tmp/lcov_base.info
    - name: Run tests
      run: |
        ./test-suite/quantlib-test-suite --log_level=message
    - name: Run examples
      run: |
        make -C Examples check-examples
    - name: Capture coverage
      run: |
        lcov --no-external --capture --directory . --output-file ./tmp/lcov_run.info
        lcov --add-tracefile ./tmp/lcov_base.info --add-tracefile ./tmp/lcov_run.info --output-file ./tmp/lcov_total.info
        lcov --remove ./tmp/lcov_total.info "$PWD/Examples/*" "$PWD/test-suite/*" --output-file ./coverage/lcov.info
    - name: Upload coverage to Coveralls
      uses: coverallsapp/github-action@v2
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        file: ./coverage/lcov.info