quest-rs 0.2.8

Safe Rust wrapper around the Quantum Exact Simulation Toolkit (QuEST)
name: coverage

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

jobs:

  build-and-test:
    name: Coverage on Ubuntu 18.04
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1

      - name: install dependencies
        run: sudo apt install lcov

      - name: make build directory
        run: mkdir build_dir

      - name: cmake configure
        run: cmake .. -DTESTING:BOOL=ON -DPRECISION:STRING=2 -DQUEST_ENABLE_COVERAGE:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=Debug
        working-directory: build_dir

      - name: cmake build
        run: cmake --build . --parallel 2 --target tests
        working-directory: build_dir

      - name: cmake test
        run: ctest -j2 --output-on-failure --timeout 5000
        working-directory: build_dir

      - name: upload coverage results
        run: |
          lcov --directory . --capture --output-file coverage.info
          lcov --remove coverage.info '/usr/*' '*/tests/*' --output-file coverage.info
          lcov --list coverage.info
          bash <(curl https://codecov.io/bash) -f coverage.info -t 4f2a3b14-8095-447e-a58d-863c2538b35b
        working-directory: build_dir