Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ctest -T memcheck to developer workflow so valgrind is run on all tests and must pass #480

Merged
merged 27 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2b46a03
removed IF (ASSOCIATED(CBUF)) because CBUF is undefined
edhartnett Jul 8, 2023
8530133
fix associated() check on undefind pointer in ixgb2()
edhartnett Jul 8, 2023
1202b34
fixing some memory problems
edhartnett Jul 8, 2023
6e68397
fixing some memory problems
edhartnett Jul 8, 2023
60d080a
whitespace cleanup
edhartnett Jul 8, 2023
06fe84c
turn off printing in test that causes memory problems
edhartnett Jul 8, 2023
e778543
initialized local variable to solve memory issue
edhartnett Jul 8, 2023
0934b46
fixed memory leak in test_files
edhartnett Jul 8, 2023
1b6412e
initialized array in gdt2gds() to solve memory problems
edhartnett Jul 8, 2023
55a0555
Merge branch 'develop' into ejh_mem8
edwardhartnett Jul 10, 2023
aaf0740
fixed uninitialized memory in test_g2_encode
edhartnett Jul 10, 2023
dbab9ef
fixed memory problem in test code
edhartnett Jul 10, 2023
d100e88
add memory checking to developer workflow
edhartnett Jul 10, 2023
2b072c9
add memory checking to developer workflow
edhartnett Jul 10, 2023
b7023a4
Merge branch 'develop' into ejh_memcheck
edwardhartnett Jul 10, 2023
04c7e16
Merge branch 'develop' into ejh_memcheck
edwardhartnett Jul 10, 2023
03a670e
trying a matrix
edhartnett Jul 10, 2023
9bc849c
trying a matrix
edhartnett Jul 10, 2023
7d289a7
trying a matrix
edhartnett Jul 10, 2023
eb48e16
better job names
edhartnett Jul 10, 2023
f1cd8db
better job names
edhartnett Jul 10, 2023
a4020ff
better job names
edhartnett Jul 10, 2023
5a82ef8
better job names
edhartnett Jul 10, 2023
fcb5ff4
better job names
edhartnett Jul 10, 2023
7d69245
better job names
edhartnett Jul 10, 2023
918258a
better job names
edhartnett Jul 10, 2023
7b9190c
new cache key for data cache
edhartnett Jul 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Linux_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/data
key: data-1
key: data-2

- name: build
run: |
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ jobs:

strategy:
fail-fast: true
matrix:
config: ["asan/code coverage", "memcheck"]

steps:

- name: install-dependencies
run: |
sudo apt-get update
sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev doxygen gcovr
sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev doxygen gcovr valgrind

- name: checkout-bacio
uses: actions/checkout@v3
Expand Down Expand Up @@ -96,7 +98,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/data
key: data-1
key: data-2

- name: build
run: |
Expand All @@ -105,14 +107,22 @@ jobs:
mkdir build
doxygen --version
cd build
cmake .. -DENABLE_DOCS=On -DJasper_ROOT=~/Jasper -DCMAKE_PREFIX_PATH="~/bacio;~/w3emc" -DCMAKE_Fortran_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -Wall -fno-omit-frame-pointer -fsanitize=address" -DCMAKE_C_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -Wall -fno-omit-frame-pointer -fsanitize=address" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug
if [ ${{ matrix.config }} == "asan/code coverage" ]; then
cmake .. -DENABLE_DOCS=On -DJasper_ROOT=~/Jasper -DCMAKE_PREFIX_PATH="~/bacio;~/w3emc" -DCMAKE_Fortran_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -Wall -fno-omit-frame-pointer -fsanitize=address" -DCMAKE_C_FLAGS="-g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -Wall -fno-omit-frame-pointer -fsanitize=address" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug
else
cmake .. -DENABLE_DOCS=On -DJasper_ROOT=~/Jasper -DCMAKE_PREFIX_PATH="~/bacio;~/w3emc" -DCMAKE_Fortran_FLAGS="-g -O0" -DCMAKE_C_FLAGS="-g -O0" -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug
fi
make -j2 VERBOSE=1

- name: test
run: |
cd $GITHUB_WORKSPACE/g2/build
ctest --verbose --output-on-failure --rerun-failed
gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html &> /dev/null
if [ ${{ matrix.config }} == "asan/code coverage" ]; then
ctest --verbose --output-on-failure --rerun-failed
gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html &> /dev/null
else
ctest -T memcheck
fi

- name: cache-data
if: steps.cache-data.outputs.cache-hit != 'true'
Expand All @@ -121,6 +131,7 @@ jobs:
cp $GITHUB_WORKSPACE/g2/build/tests/data/* ~/data

- name: upload-test-coverage
if: ${{ matrix.config }} == "asan/code coverage"
uses: actions/upload-artifact@v3
with:
name: g2-test-coverage
Expand Down