Skip to content

Commit

Permalink
Merge branch 'develop' into as_specpack
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA authored Dec 10, 2024
2 parents 5d70bba + e58fa60 commit 2440287
Show file tree
Hide file tree
Showing 29 changed files with 967 additions and 460 deletions.
80 changes: 72 additions & 8 deletions .github/workflows/developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,41 @@ concurrency:

jobs:
developer:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
CC: gcc
CXX: g++

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

steps:
- name: install-dependencies
run: |
sudo apt-get update
sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev doxygen libopenjp2-7-dev valgrind libaec-dev
sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev libopenjp2-7-dev libaec-dev
- name: install-format-dependencies
if: matrix.config == 'format'
run: |
sudo apt-get install clang-format
- name: install-docs-dependencies
if: matrix.config == 'docs'
run: |
sudo apt-get install doxygen
- name: install-memory-dependencies
if: matrix.config == 'memory'
run: |
sudo apt-get install valgrind
- name: install-code_coverage-dependencies
if: matrix.config == 'code coverage'
run: |
sudo apt-get install clang-format
python3 -m pip install gcovr
- name: "Build dependencies"
Expand All @@ -49,37 +69,81 @@ jobs:
key: data-2

- name: asan
if: matrix.config == 'asan/code coverage'
if: matrix.config == 'asan'
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 -DENABLE_DOCS=On -DPTHREADS=ON -DFTP_TEST_FILES=ON -DFTP_LARGE_TEST_FILES=OFF -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug
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
gcovr --root g2c -v --html-details --exclude g2c/tests --exclude g2c/build/CMakeFiles --print-summary -o test-coverage.html
- 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"
pwd
cd g2c/build
make VERBOSE=1
ctest --verbose --output-on-failure --rerun-failed
gcovr --root .. -v --html-details --exclude tests --exclude CMakeFiles --print-summary -o test-coverage.html
pwd
ls -l
ls -l src
- name: memcheck
if: matrix.config == 'memcheck'
run: |
set -x
export LD_LIBRARY_PATH="/home/runner/jasper/lib:$LD_LIBRARY_PATH"
cmake -S g2c -B g2c/build -DUSE_AEC=ON -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/jasper -DBUILD_G2C=ON -DLOGGING=On -DENABLE_DOCS=On -DPTHREADS=ON -DFTP_TEST_FILES=ON -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug
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 -DTEST_FILE_DIR=/home/runner/data -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-g"
cmake --build g2c/build --parallel 2 --verbose
ctest --test-dir g2c/build
ls -l g2c/build
- name: docs
if: matrix.config == 'docs'
run: |
set -x
export LD_LIBRARY_PATH="/home/runner/jasper/lib:$LD_LIBRARY_PATH"
cmake -S g2c -B g2c/build -DUSE_AEC=ON -DJasper_ROOT=$GITHUB_WORKSPACE/nceplibs/jasper -DBUILD_G2C=ON -DENABLE_DOCS=On -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-g"
cmake --build g2c/build --parallel 2 --verbose
ls -l g2c/build/docs/html
- name: format
if: matrix.config == 'format'
run: |
set -x
cd g2c
clang-format --version
find . -name '*.[ch]'|xargs clang-format -Werror --verbose --dry-run
- name: cache-data
if: steps.cache-data.outputs.cache-hit != 'true'
run: |
mkdir ~/data
cp $GITHUB_WORKSPACE/g2c/build/tests/data/* ~/data
- name: upload-test-coverage
if: matrix.config == 'asan/code coverage'
if: matrix.config == 'code coverage'
uses: actions/upload-artifact@v4
with:
name: g2c-test-coverage
path: |
*.html
*.css
- uses: actions/upload-artifact@v4
if: matrix.config == 'docs'
with:
name: docs
path: |
g2c/build/docs/html
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
mkdir build
cd build
# Windows CI fails when building with shared libs, turn off
cmake -DUSE_OpenJPEG=ON -DUSE_Jasper=OFF -DBUILD_SHARED_LIBS=OFF -DLOGGING=ON -DUSE_AEC=ON ..
cmake -DUSE_OpenJPEG=ON -DUSE_Jasper=OFF -DBUILD_SHARED_LIBS=OFF -DLOGGING=ON -DUSE_AEC=ON ..
cmake --build .
- name: test
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ build/
install/
.vscode/

*.[ao]
*.mod
*.so
*.swp
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ option(FTP_EXTRA_TEST_FILES "Test with more large files fetched via FTP." OFF)
option(LOGGING "Turn on internal logging messages. Only useful to g2c developers." OFF)
option(PTHREADS "Turn on thread-safty with pthreads." OFF)
option(UTILS "Build and install some utility programs." ON)
option(BUILD_G2C "Build the new g2c API, experimental until 2.0.0 release." OFF)
option(BUILD_G2C "Build the g2c file-based API." ON)

# Developers can use this option to specify a local directory which
# holds the test files. They will be copied instead of fetching the
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.0
2.0.0
Loading

0 comments on commit 2440287

Please sign in to comment.