Minimal support for threads partitioning #943
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Code Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the Repository | |
uses: actions/checkout@v2 | |
- name: Install CUDA | |
uses: Jimver/[email protected] | |
with: | |
method: network | |
use-github-cache: false | |
use-local-cache: false | |
- name: Install OpenMPI | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install libopenmpi-dev -y --no-install-recommends | |
- name: Generate the coverage data | |
run: | | |
cargo clean | |
cargo \ | |
--config "target.'cfg(all())'.rustflags=['-Cinstrument-coverage']" \ | |
test --workspace --all-targets | |
env: | |
CARGO_INCREMENTAL: 0 | |
RUSTDOCFLAGS: -Cinstrument-coverage | |
LLVM_PROFILE_FILE: coverage/coverage-%p-%m.profraw | |
- name: Download grcov | |
run: | | |
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - | |
chmod +x ./grcov | |
- name: Generate the coverage reports | |
run: | | |
./grcov . -s . --binary-path ./target/debug/deps \ | |
-t lcov -o coverage.lcov --branch \ | |
--keep-only "necsim/*" \ | |
--keep-only "rustcoalescence/*" \ | |
--ignore-not-existing \ | |
--excl-line GRCOV_EXCL_LINE \ | |
--excl-start GRCOV_EXCL_START \ | |
--excl-stop GRCOV_EXCL_STOP | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.lcov | |
fail_ci_if_error: true |