-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [#407] Added Sample coverage singular test * [#407] Added on-push trigger for testing * [#407] Remove make debug from sample CI * [#407] Source Env Vars from Makefile * [#407] Added make coverage-sample * [#407] Initial gcov test * [#407] Run update to install lcov * [#407] Remove sudo call * [#407] Add lcov coverage report generation and upload * [#407] remove genhtml install * [#407] Add make coverage * [#407] Modify lcov commands * [#407] Missing separator fix * [#407] Remove coverage from makefile * [#407] Read coverage for whole directory * [#407] Switch lcov directory to sample * [#407] Try build * [#407] Alternative coverage flags * [#407] Add coverage flags to build-test make command * [#407] Modify Cmake flags * [#407] Modify coverage report path * [#407] Modify coverage report path * [#407] Modify upload-artifact to v4 * [#407] Modify coverage test file regex * [#407] Attempt uploading report to codecov * [#407] Use cFE code coverage workflow * [#407] Rerun CI * [#407] Exclude io_lib * [#407] Exclude io_lib 2 * [#407] Exclude io_lib 3 * [#407] Exclude io_lib 4 * [#407] Exclude io_lib 5 * [#407] Exclude io_lib 6 * [#407] Cleanup makefile and removed extra flags from component settings; * [#407] Changed CI to run on push only and removed a number of unit tests from SC due to segfault (to address in another issue); * [#407] Attempt to set additional ITC_C_FLAGS during coverage CI runs to create .,gcda files; * [#407] Combine make coverage and gcov * [#407] Updates to new container 20241219, hwlib to include gcov, io_lib to remove old artifacts, and make gcov to simplify CI; * [#407] Update Workflow For Coverage * [#407] Fix Coverage Flags * Update coverage badges * [#407] Update Build Tests Step * [#407] Ignore Parse Errors GCov * Update coverage badges * [#407] Updates for Badges * [#407] Update Artifact Action to v4 * [#407] Update to submodules after code reviews and merge requests; * [#407] Change to run CI only on pull request; --------- Co-authored-by: Donnie-Ice <[email protected]> Co-authored-by: NDC\rjbrown6 <[email protected]> Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
246a693
commit 3c61261
Showing
12 changed files
with
80 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ jobs: | |
fsw: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ivvitc/nos3-64:20241010 | ||
image: ivvitc/nos3-64:20241219 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -26,7 +26,7 @@ jobs: | |
sim: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ivvitc/nos3-64:20241010 | ||
image: ivvitc/nos3-64:20241219 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -36,3 +36,59 @@ jobs: | |
run: make config | ||
- name: build | ||
run: make build-sim | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ivvitc/nos3-64:20241219 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
submodules: recursive | ||
- name: Configure Safe Directory | ||
run: git config --global --add safe.directory $GITHUB_WORKSPACE | ||
- name: Update | ||
run: apt-get update | ||
- name: install dependencies | ||
run: apt-get install -y gcc lcov gcovr bc | ||
- name: config | ||
run: make config | ||
- name: build-test | ||
run: | | ||
export CFLAGS="-fprofile-arcs -ftest-coverage -g" | ||
make build-test | ||
make test-fsw | ||
# - name: Generate Coverage Report | ||
# run: make gcov | ||
- name: Generate Coverage Report and Badges | ||
run: | | ||
mkdir -p docs/coverage | ||
gcovr --gcov-ignore-parse-errors --branches --xml-pretty --exclude-unreachable-branches -o docs/coverage/coverage_report.xml | ||
gcovr --gcov-ignore-parse-errors --branches --html --html-details -o docs/coverage/coverage_report.html | ||
LINE_COVERAGE=$(grep -oP '(?<=<coverage line-rate=")[0-9.]+(?=")' docs/coverage/coverage_report.xml | head -n 1) | ||
BRANCH_COVERAGE=$(grep -oP '(?<=branch-rate=")[0-9.]+(?=")' docs/coverage/coverage_report.xml | head -n 1) | ||
LINE_COVERAGE_PERCENT=$(printf "%.0f" $(echo "$LINE_COVERAGE * 100" | bc)) | ||
BRANCH_COVERAGE_PERCENT=$(printf "%.0f" $(echo "$BRANCH_COVERAGE * 100" | bc)) | ||
if [ "$LINE_COVERAGE_PERCENT" -ge 80 ]; then LINE_COLOR="brightgreen"; elif [ "$LINE_COVERAGE_PERCENT" -ge 50 ]; then LINE_COLOR="yellow"; else LINE_COLOR="red"; fi | ||
if [ "$BRANCH_COVERAGE_PERCENT" -ge 80 ]; then BRANCH_COLOR="brightgreen"; elif [ "$BRANCH_COVERAGE_PERCENT" -ge 50 ]; then BRANCH_COLOR="yellow"; else BRANCH_COLOR="red"; fi | ||
curl -o docs/coverage/line-coverage-badge.svg "https://img.shields.io/badge/line%20coverage-${LINE_COVERAGE_PERCENT}%25-${LINE_COLOR}" | ||
curl -o docs/coverage/branch-coverage-badge.svg "https://img.shields.io/badge/branch%20coverage-${BRANCH_COVERAGE_PERCENT}%25-${BRANCH_COLOR}" | ||
- name: Commit Coverage Badges | ||
run: | | ||
git config user.name "github-actions" | ||
git config user.email "[email protected]" | ||
git add docs/coverage/line-coverage-badge.svg | ||
git add docs/coverage/branch-coverage-badge.svg | ||
git commit -m "Update coverage badges" || echo "No changes to commit" | ||
git push origin HEAD | ||
- name: Archive Coverage Directory | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-artifacts | ||
path: docs/coverage | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
token: 040717d0-b624-470e-be41-d08720135088 |
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
Submodule generic_fss
updated
10 files
+16 −0 | .gitignore | |
+3 −1 | fsw/cfs/CMakeLists.txt | |
+0 −185 | fsw/cfs/src/generic_fss_device.c | |
+0 −32 | fsw/fprime/src/generic_fss_device.h | |
+7 −22 | fsw/shared/generic_fss_device.c | |
+47 −32 | fsw/shared/generic_fss_device.h | |
+65 −0 | fsw/standalone/CMakeLists.txt | |
+20 −0 | fsw/standalone/device_cfg.h | |
+216 −0 | fsw/standalone/generic_fss_checkout.c | |
+67 −0 | fsw/standalone/generic_fss_checkout.h |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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