- Clone the repository
git clone https://gitlab.com/CAS-eResearch/GWDC/code/adacs_job_controller_client.git - Init all submodules
git submodule update --init --recursive - Initialise the boost installation
cd src/third_party && bash prepare_boost.sh - Initialise the elfutils installation
cd src/third_party && bash prepare_elfutils.sh
The project can now be built. There are two primary targets: Boost_Tests_run, and adacs_job_client. You'll likely only want to bother building Boost_Tests_run and using this to test the functionality of the job client.
- Make a build directory
cd src && mkdir build - Change in to the build directory and run the cmake configure:
- Basic build:
cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug .. - With clang-tidy:
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_CLANG_TIDY=ON ..
- Basic build:
- Build the target
ninja Boost_Tests_run
Optional cmake flags:
-DENABLE_CLANG_TIDY=ON: Enable clang-tidy static analysis during build-DCMAKE_BUILD_TYPE=Debug: Build in debug mode (default)-DCMAKE_BUILD_TYPE=Release: Build in release mode with optimizations
NB. To run the full test suite, it may be possible that a db.sqlite3 database is required with prepopulated tables. To do this, cd src/Lib/schema && . venv/bin/activate && python manage.py migrate then copy the db.sqlite3 database to wherever the Boost_Tests_run binary is.
Since a primary objective of this project is to statically link a binary that doesn't rely on any system libraries (Except core libc/libdl etc) and that can run on ancient glibc versions, we use a docker build using centos 7 to build the production binary. There is a convenience script for this.
bash scripts/build.sh
This will generate a directory out which contains the executable adacs_job_client which can be shipped and deployed.