Skip to content

Commit

Permalink
re-add check for warnings (#536)
Browse files Browse the repository at this point in the history
* splitting code coverage

* fixed flags

* debugging code coverage

* debugging code coverage

* debugging code coverage

* debugging code coverage

* check code format in ci

* check code format in ci

* reformatted code files

* reformatted code files

* fixing ci format

* fixing ci format

* fixing ci format

* fixing ci format

* more fixes

* more fixes

* more fixes

* added .clang-format

* added .clang-format

* added .clang-format

* added .clang-format

* changing runner for developer workflow

* changing runner for developer workflow

* another fix

* updated doxyfile.in

* fixed docs

* warning checking

* fixed warning

* fixed warning

* fixed warning

* fixed warning

* fixed warning
  • Loading branch information
edwardhartnett authored Oct 29, 2024
1 parent da8e6f1 commit 168504b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: true
matrix:
config: ["asan", "code coverage", "memcheck", "docs", "format"]
config: ["asan", "code coverage", "memcheck", "docs", "format", "warning"]

steps:
- name: install-dependencies
Expand Down Expand Up @@ -73,16 +73,24 @@ jobs:
run: |
set -x
export CC=gcc
cmake -S g2c -B g2c/build -DUSE_AEC=ON -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/jasper -DBUILD_G2C=ON -DLOGGING=On -DPTHREADS=ON -DFTP_TEST_FILES=ON -DFTP_LARGE_TEST_FILES=OFF -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug-DCMAKE_C_FLAGS="-Werror -g -O0 -fsanitize=address -fno-omit-frame-pointer"
cmake -S g2c -B g2c/build -DUSE_AEC=ON -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/jasper -DBUILD_G2C=ON -DLOGGING=On -DPTHREADS=ON -DFTP_TEST_FILES=ON -DFTP_LARGE_TEST_FILES=OFF -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror -g -O0 -fsanitize=address -fno-omit-frame-pointer"
cmake --build g2c/build --parallel 2 --verbose
ctest --test-dir g2c/build --verbose --output-on-failure --rerun-failed
- name: warning
if: matrix.config == 'warning'
run: |
set -x
export CC=gcc
cmake -S g2c -B g2c/build -DUSE_AEC=ON -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/jasper -DBUILD_G2C=ON -DLOGGING=On -DPTHREADS=ON -DFTP_TEST_FILES=ON -DFTP_LARGE_TEST_FILES=OFF -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Wall -Werror"
cmake --build g2c/build --verbose
- name: code_coverage
if: matrix.config == 'code coverage'
run: |
set -x
export CC=gcc
cmake -S g2c -B g2c/build -DUSE_AEC=ON -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/jasper -DBUILD_G2C=ON -DLOGGING=On -DPTHREADS=ON -DFTP_TEST_FILES=ON -DFTP_LARGE_TEST_FILES=OFF -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug-DCMAKE_C_FLAGS="-g -fprofile-arcs -ftest-coverage -fprofile-abs-path -O0"
cmake -S g2c -B g2c/build -DUSE_AEC=ON -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/jasper -DBUILD_G2C=ON -DLOGGING=On -DPTHREADS=ON -DFTP_TEST_FILES=ON -DFTP_LARGE_TEST_FILES=OFF -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-g -fprofile-arcs -ftest-coverage -fprofile-abs-path -O0"
pwd
cd g2c/build
make VERBOSE=1
Expand Down
19 changes: 10 additions & 9 deletions tests/tst_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ main()
/* /\* Create max number of files. *\/ */
/* for (i = 0; i < G2C_MAX_FILES; i++) */
/* if ((ret = g2c_create(FILE_NAME, G2C_CLOBBER, &g2cid[i]))) */
/* return ret; */
/* return ret; */

/* /\* Try to create one more. *\/ */
/* if (g2c_create(FILE_NAME, G2C_CLOBBER, &g2cid2) != G2C_ETOOMANYFILES) */
/* return G2C_ERROR; */

/* /\* Close all open files. *\/ */
/* /\* Close all open files. *\/ */
/* for (i = 0; i < G2C_MAX_FILES; i++) */
/* if ((ret = g2c_close(g2cid[i]))) */
/* return ret; */
/* return ret; */
/* } */
/* printf("ok!\n"); */
printf("Testing g2c_find_msg2 on file %s...", WAVE_FILE);
Expand Down Expand Up @@ -280,9 +280,10 @@ main()
}

{
int pds_template_len, pds_template[G2C_MAX_PDS_TEMPLATE_MAPLEN];
int gds_template_len, gds_template[G2C_MAX_GDS_TEMPLATE_MAPLEN];
int drs_template_len, drs_template[G2C_MAX_DRS_TEMPLATE_MAPLEN];
int pds_template_len, gds_template_len, drs_template_len;
long long int pds_template[G2C_MAX_PDS_TEMPLATE_MAPLEN];
long long int gds_template[G2C_MAX_GDS_TEMPLATE_MAPLEN];
long long int drs_template[G2C_MAX_DRS_TEMPLATE_MAPLEN];
int t;

if ((ret = g2c_inq_prod(g2cid, m, 0, &pds_template_len, pds_template,
Expand All @@ -295,15 +296,15 @@ main()
return G2C_ERROR;
printf("pds_template {");
for (t = 0; t < pds_template_len; t++)
printf("%d, ", pds_template[t]);
printf("%lld, ", pds_template[t]);
printf("}\n");
printf("gds_template {");
for (t = 0; t < gds_template_len; t++)
printf("%d, ", gds_template[t]);
printf("%lld, ", gds_template[t]);
printf("}\n");
printf("drs_template {");
for (t = 0; t < drs_template_len; t++)
printf("%d, ", drs_template[t]);
printf("%lld, ", drs_template[t]);
printf("}\n");
}
}
Expand Down

0 comments on commit 168504b

Please sign in to comment.