Skip to content

Commit

Permalink
Re-organize repository (part 3)
Browse files Browse the repository at this point in the history
- address #89

- update makefiles, scripts, and continuous integration setup

(see previous commit 90b1741 "Re-organize repository (part 1)"
(see previous commit dc521a4 "Re-organize repository (part 2)"
  • Loading branch information
dschlaep committed Dec 22, 2022
1 parent dc521a4 commit 2b5c7d7
Show file tree
Hide file tree
Showing 12 changed files with 414 additions and 248 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
sudo apt-get install doxygen doxygen-latex graphviz
- name: Build documentation and check for warnings
run: make clean doc
run: make clean clean_doc doc
12 changes: 6 additions & 6 deletions .github/workflows/main_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ jobs:

- name: Run binary
run: |
make clean bin bint_run
make clean bin_debug_severe bint_run
make clean bin_run
make clean bin_debug_severe
- name: Unit tests
run: make clean test test_run
run: make clean test_run

- name: Severe unit tests (without sanitizers)
if: ${{ runner.os == 'macOS' }}
run: make clean test_severe test_run
run: make clean test_severe

- name: Severe unit tests (with sanitizers)
# Apple clang does not support "AddressSanitizer: detect_leaks" (at least as of clang-1200.0.32.29)
if: ${{ runner.os != 'macOS' }}
run: ASAN_OPTIONS=detect_leaks=1:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1 LSAN_OPTIONS=suppressions=.LSAN_suppr.txt make clean test_severe test_run
run: make clean test_leaks


check_code_coverage:
Expand All @@ -55,7 +55,7 @@ jobs:
submodules: recursive

- name: Generate coverage report
run: make clean cov cov_run
run: CC=gcc CXX=g++ GCOV=gcov make clean clean_cov cov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

# AddressSanitizer and LeakSanitizer not available on cygwin
- name: Run binary
run: make clean bin bint_run
run: make clean bin_run

- name: Unit tests
run: make clean test test_run
run: make clean test_run
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ A full code documentation may be built, see [here](#get_documentation).
- for unit tests (using `googletest`), additionally,
- `g++ >= v5.0` or `clang++ >= v5.0` compliant with `C++11`
- `POSIX API`
- POSIX- or GNU-compliant `make`
- GNU-compliant `make`
- On Windows OS: an installation of `cygwin`

* Clone the repository
Expand Down Expand Up @@ -244,7 +244,7 @@ for one generic location
(it is a relatively wet and cool site in the sagebrush steppe).

```{.sh}
make bin bint_run
make bin_run
```

The simulated output is stored at `tests/example/Output/`.
Expand All @@ -262,12 +262,12 @@ The following steps provide a starting point for such comparisons:
```{.sh}
# Simulate on refernce branch and copy output to "Output_ref"
git checkout master
make bin bint_run
make bin_run
cp -r tests/example/Output tests/example/Output_ref
# Switch to development branch <branch_xxx> and run the same simulation
git checkout <branch_xxx>
make bin bint_run
make bin_run
# Compare the two sets of outputs
# * Lists all output files and determine if they are exactly they same
Expand All @@ -289,17 +289,17 @@ Currently, the following is implemented:
and some slope/aspect/day of year combinations

```{.sh}
CPPFLAGS=-DSW2_SolarPosition_Test__hourangles_by_lat_and_doy make test test_run
CPPFLAGS=-DSW2_SolarPosition_Test__hourangles_by_lat_and_doy make test_run
Rscript tools/plot__SW2_SolarPosition_Test__hourangles_by_lat_and_doy.R
CPPFLAGS=-DSW2_SolarPosition_Test__hourangles_by_lats make test test_run
CPPFLAGS=-DSW2_SolarPosition_Test__hourangles_by_lats make test_run
Rscript tools/plot__SW2_SolarPosition_Test__hourangles_by_lats.R
```

- PET plots as function of radiation, relative humidity, wind speed, and cover

```{.sh}
CPPFLAGS=-DSW2_PET_Test__petfunc_by_temps make test test_run
CPPFLAGS=-DSW2_PET_Test__petfunc_by_temps make test_run
Rscript tools/plot__SW2_PET_Test__petfunc_by_temps.R
```

Expand Down
Loading

0 comments on commit 2b5c7d7

Please sign in to comment.