Skip to content
Snippets Groups Projects
Unverified Commit e427c8e7 authored by thorstenhater's avatar thorstenhater Committed by GitHub
Browse files

Run C++ examples in CI (#1432)

- Add _running_ C++ examples to standard CI runs (compiling has been in since the start).
- Fix `bench.cpp` to set return value to 1 if exceptions are caught.
parent 2af8ced3
No related branches found
No related tags found
No related merge requests found
...@@ -154,6 +154,30 @@ jobs: ...@@ -154,6 +154,30 @@ jobs:
- if: ${{ matrix.config.mpi == 'ON' }} - if: ${{ matrix.config.mpi == 'ON' }}
name: Run MPI tests name: Run MPI tests
run: mpirun -n 4 -oversubscribe build/bin/unit-mpi run: mpirun -n 4 -oversubscribe build/bin/unit-mpi
- if: ${{ matrix.config.mpi == 'OFF' }}
name: Run examples
run: |
build/bin/bench
build/bin/brunel
build/bin/dryrun
build/bin/gap_junctions
build/bin/generators
build/bin/lfp
build/bin/probe-demo v
build/bin/ring
build/bin/single-cell
- if: ${{ matrix.config.mpi == 'ON' }}
name: Run examples with MPI
run: |
mpirun -n 4 -oversubscribe build/bin/bench
mpirun -n 4 -oversubscribe build/bin/brunel
mpirun -n 4 -oversubscribe build/bin/dryrun
mpirun -n 4 -oversubscribe build/bin/gap_junctions
mpirun -n 4 -oversubscribe build/bin/generators
mpirun -n 4 -oversubscribe build/bin/lfp
mpirun -n 4 -oversubscribe build/bin/probe-demo v
mpirun -n 4 -oversubscribe build/bin/ring
mpirun -n 4 -oversubscribe build/bin/single-cell
- name: Run python tests - name: Run python tests
run: python python/test/unit/runner.py run: python python/test/unit/runner.py
- if: ${{ matrix.config.mpi == 'ON' }} - if: ${{ matrix.config.mpi == 'ON' }}
......
...@@ -213,6 +213,7 @@ int main(int argc, char** argv) { ...@@ -213,6 +213,7 @@ int main(int argc, char** argv) {
} }
catch (std::exception& e) { catch (std::exception& e) {
std::cerr << "exception caught running benchmark miniapp:\n" << e.what() << std::endl; std::cerr << "exception caught running benchmark miniapp:\n" << e.what() << std::endl;
return 1;
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment