Skip to content

Merge branch 'work' into tests #191

Merge branch 'work' into tests

Merge branch 'work' into tests #191

Workflow file for this run

name: Coverage report
on:
push:
branches: [ tests ]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
COMPILER: gcc
LINKER: gcc
CPP_COMPILER: g++
LIBRARY_PATH: $LIBRARY_PATH
BUILD_LIB_SCRIPT: build_lib.sh
BUILD_SCRIPT: build_tests.sh
RUN_SCRIPT: run_tests.sh
SETUP_SCRIPT: |
cd ./stdex
chmod a+rwx ./build_lib.sh
cd ..
chmod a+rwx ./build_tests.sh
chmod a+rwx ./run_tests.sh
env:
OS: ${{ matrix.os }}
PYTHON: '3.7'
steps:
- uses: actions/checkout@master
- name: setup enviroment
run: ${{matrix.SETUP_SCRIPT}}
- name: build lib
env:
COMPILER: ${{ matrix.CPP_COMPILER }}
LIBRARY_PATH: ${{ matrix.LIBRARY_PATH }}
CODE_COVERAGE_FLAGS: -fprofile-arcs -ftest-coverage
CODE_COVERAGE_LIBS: -lgcov
run: |
cd ./stdex
./${{ matrix.BUILD_LIB_SCRIPT }}
cd ..
- name: build tests
env:
COMPILER: ${{ matrix.CPP_COMPILER }}
LIBRARY_PATH: ${{ matrix.LIBRARY_PATH }}
CODE_COVERAGE_FLAGS: -fprofile-arcs -ftest-coverage
CODE_COVERAGE_LIBS: -lgcov
run: |
./${{ matrix.BUILD_SCRIPT }}
- name: run tests
run: |
./${{ matrix.RUN_SCRIPT }}
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.7
- name: Generate coverage report
run: |
chmod +x ./get_code_cov.sh
./get_code_cov.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
root_dir: ./
env_vars: OS,PYTHON
fail_ci_if_error: true
verbose: true