Continuous integration
======================

Continuous integration (CI) is a combination of unit tests and regression tests that ensures no mistakes are introduced
in the source code while writing new code on several branches and merging back into the master branch. 
The CI consists of 

* build-intel: standard build, including PLUMED
* build-python: python interface build
* unittest: unit tests run with pFunit
* non_regression: subset of tests suite run with debugging flags
* non_regression-long: subset of tests suite run with optimization flags
* python_test: python interface tests

Specific CI instructions are given in the file ./.gitlab-ci.yml
The tests are run at each new commit pushed to the gitlab on a machine called 'runner'. A list of available runners can
be found on the gitlab project page *Settings>CI/CD>Runners*. The actual runner is hosted on a local cluster at the 
PHENIX laboratory, called Obelixdev.

Setup the runner on Obelixdev
-----------------------------

The cluster Obelixdev runs on Intel Skylake processors.

### Load minimal compilation environment and pFunit

```bash
module purge
module load Libraries/impi/2019 
module load Libraries/mkl/2019 
module load Libraries/plumed/Intel/2.5.1/2019 
module load Libraries/pFUnit/3.2.9
module load Libraries/IntelPython/2019
```

#### Compile and test mw
```bash
ln -s computers/CI/config-intel.mk ./config.mk
plumed patch -e mw2 -p --shared
make clean
make
make check
make python
cd tests
python regression_tests.py -r
python regression_tests.py -s long
python regression_tests.py -s python_interface
```

