Skip to content

Commit

Permalink
Merge pull request #402 from DrylandEcology/feature_compile_lib
Browse files Browse the repository at this point in the history
Feature compile as library and overhauled scripts for testing

* test compilation of SOILWAT2 as library for STEPWAT2 and rSOILWAT2
* simplified compilation as library (sw_sources is no longer needed)
* overhauled scripts for comprehensive testing and checks
* new script for extra checks and figures
* updated readme and new separate contributing page
  • Loading branch information
dschlaep authored May 22, 2024
2 parents 36cb14e + c5f29c2 commit 9ee8094
Show file tree
Hide file tree
Showing 30 changed files with 1,228 additions and 906 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ jobs:
if: ${{ runner.os != 'macOS' }}
run: make clean test_sanitizer

- name: Compile as library for STEPWAT2
run: CPPFLAGS='-DSTEPWAT' make clean lib

- name: Compile as library for rSOILWAT2
# Rmock/ provides bare-bones headers of R C-API functions required by SOILWAT2
run: CPPFLAGS='-DRSOILWAT' CFLAGS='-Iexternal/Rmock' make clean libr


build_ncSW2:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/main_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ jobs:

- name: Unit tests (shuffle and repeat 3x)
run: make clean test_rep3rnd

- name: Compile as library for STEPWAT2
run: CPPFLAGS='-DSTEPWAT' sw_sources='SW_Output_outarray.c SW_Output_outtext.c' make clean lib

- name: Compile as library for rSOILWAT2
run: CPPFLAGS='-DRSOILWAT' CFLAGS='-Iexternal/Rmock' sw_sources='SW_Output_outarray.c' make clean libr
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
# Figures created by scripts in tools/
/tools/Fig*
/tools/*.pdf
/tools/figures/
/tools/figures*

# Google unit test output
gtest-*.o
Expand Down
Loading

0 comments on commit 9ee8094

Please sign in to comment.