forked from LLNL/units
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add github actions for code coverage * remove circle-ci coverage build * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix circle ci config * try to fix coverage builds * try to fix some of the builds * fix bug with 64 bit unit type, and C++17 or higher with unit string conversions * fix clang-tidy issue Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
296dab0
commit 43d6658
Showing
7 changed files
with
148 additions
and
32 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- v* | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
coverage: | ||
name: Coverage | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
std: ["11", "14", "17", "20"] | ||
unitBase: ["uint64_t", "uint32_t"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get LCov | ||
run: | | ||
wget https://github.com/linux-test-project/lcov/releases/download/v1.16/lcov-1.16.tar.gz | ||
tar -xzf lcov-1.16.tar.gz | ||
cd lcov-1.16 | ||
sudo make install | ||
- name: Configure | ||
run: | | ||
cmake -S . -B build \ | ||
-DCMAKE_CXX_STANDARD=${{matrix.std}} \ | ||
-DUNITS_ENABLE_TESTS=ON \ | ||
-DUNITS_BASE_TYPE=${{matrix.unitBase}} \ | ||
-DCMAKE_BUILD_TYPE=Coverage | ||
- name: Build | ||
run: cmake --build build -j4 | ||
|
||
- name: Test | ||
run: | | ||
cd build | ||
ctest --output-on-failure | ||
- name: Prepare coverage | ||
run: | | ||
lcov --directory . --capture --output-file coverage.info | ||
lcov --remove coverage.info '*/tests/*' '*/examples/*' '*gtest*' '*gmock*' '/usr/*' --output-file coverage.info | ||
lcov --list coverage.info | ||
working-directory: build | ||
|
||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: build/coverage.info | ||
fail_ci_if_error: true | ||
functionalities: fixes | ||
|
||
|
||
|
||
|
||
|
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
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
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
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
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