Skip to content

Commit 20a5c45

Browse files
committed
Unify READMEs and travis
1 parent 3c5d5af commit 20a5c45

File tree

5 files changed

+36
-9
lines changed

5 files changed

+36
-9
lines changed

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ before_install:
4949
fi;
5050
echo "CXX_COMPILER=${MYCXX}" >> config.sh;
5151
echo "CXX_FLAGS=\"-O0 -g -Wall -Wno-unused-function ${configopt}\"" >> config.sh;
52-
if [[ "$USE_GCOV" == "TRUE" ]]; then echo "USE_COVERAGE=1" >> config.sh;
52+
if [[ "$USE_GCOV" == "TRUE" ]];
53+
then echo "USE_COVERAGE=1" >> config.sh;
5354
else
5455
echo "USE_COVERAGE=0" >> config.sh;
5556
fi;
@@ -64,15 +65,15 @@ script:
6465
- |
6566
if [[ "$USE_DOCKER" == "TRUE" ]]; then
6667
if [[ "$USE_GCOV" == "TRUE" ]]; then
67-
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/test && ./run.sh";
68+
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/build && make test";
6869
docker run -e TRAVIS=$TRAVIS -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "pip install cpp-coveralls && cd /root/repo/build && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp'";
6970
else
7071
docker run -it -v $(pwd):/root/repo nnvmc/base /bin/bash -c "cd /root/repo/test && ./run.sh";
7172
fi;
7273
else
7374
if [[ "$USE_GCOV" == "TRUE" ]]; then
74-
cd build && make test && cd .. ;
75-
pip install --user cpp-coveralls && cd build && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp';
75+
cd build && make test;
76+
sudo pip install cpp-coveralls && coveralls --verbose -b ./ -r ../ -i include -i src -x .cpp -x .hpp --gcov-options '\-lp' && cd .. ;
7677
else
7778
cd test && ./run.sh && cd .. ;
7879
fi;

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,37 @@
77

88
C++ Library for minimising noisy functions, such as integrals computed with the Monte Carlo method.
99

10-
In `doc/` there is a user manual in pdf.
10+
In `doc/` there is a user manual in pdf and a config for doxygen.
1111

12-
In `examples/` there are several examples.
12+
In `examples/` and `test/` there are examples and tests for the library.
1313

1414

15+
Some subdirectories come with an own `README.md` file which provides further information.
16+
17+
18+
# Supported Systems
19+
20+
Currently, we automatically test the library on Arch Linux (GCC 8) and MacOS (with clang as well as brewed GCC 8).
21+
However, in principle any system with C++11 supporting compiler should work.
22+
23+
24+
# Requirements
25+
26+
- CMake, to use our build process
27+
- (optional) valgrind, to run `./run.sh` in `test/`
28+
- (optional) pdflatex, to compile the tex file in `doc/`
29+
- (optional) doxygen, to generate doxygen documentation in `doc/doxygen`
30+
1531

1632
# Build the library
1733

18-
We use the CMake build system, so you need to have it on your system to build the library out of the box.
19-
Then copy the file `config_template.sh` to `config.sh`, edit it to your liking and then simply execute the command
34+
Copy the file `config_template.sh` to `config.sh`, edit it to your liking and then simply execute the command
2035

2136
`./build.sh`
2237

2338
Note that we build out-of-tree, so the compiled library and executable files can be found in the directories under `./build/`.
39+
40+
41+
# First steps
42+
43+
You may want to read `doc/user_manual.pdf` to get a quick overview of the libraries functionality. However, it is not guaranteed to be perfectly up-to-date and accurate. Therefore, the best way to get your own code started is by studying the examples in `examples/`. See `examples/README.md` for further guidance.

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
mkdir -p build && cd build
55
cmake -DCMAKE_CXX_COMPILER="${CXX_COMPILER}" -DUSER_CXX_FLAGS="${CXX_FLAGS}" -DUSE_COVERAGE="${USE_COVERAGE}" ..
66

7-
if [ "$1" == "" ]; then
7+
if [ "$1" = "" ]; then
88
make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
99
else
1010
make -j$1

examples/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# LEGEND OF THE EXAMPLES
22

3+
Make sure the examples are compiled, by running `./build.sh` in the project root folder.
4+
Execute an example by switching into one of the example folders and running `./run.sh`.
5+
Note that the actual example executables reside inside the `build/examples/` folder under the project's root.
36

47

58
## Example 1

test/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# LEGEND OF THE UNIT TESTS
22

3+
Use `./run.sh` inside the test directory to run the check program and unit tests
4+
with valgrind or use `make test` inside the build directory, to run unit tests without valgrind.
35

46

57
## Unit Test 1
@@ -25,6 +27,7 @@
2527
`ut4/`: check the minimisation method DynamicDescent
2628

2729

30+
2831
## Unit Test 5
2932

3033
`ut5/`: check the minimisation method Adam

0 commit comments

Comments
 (0)