A Unix-like workstation (e.g. Linux, MacOS) can be used in general as a CDash CI client by using a crontab schedule for periodic runs e.g. daily. These results are published to the public GemCI CDash. Implicit in running the CDash CTest client commands in this document are that some system details like compiler version are pushed to the public internet.
To do a quick CDash CI run from a computer (takes 2 hours on a 64-core workstation) do like:
ctest -S ci.cmake -V
Options one may wish to use include:
-Dgemini3d_tag=
: set to Gemini3D Git branch, tag, or commit hash (default "main" branch)
Print the current crontab by:
crontab -l
Edit the current crontab by:
crontab -e
The crontab environment has virtually nothing specified by default. Crontab environment variables are specified at the top of the crontab. Crontab environment variable must specify fully resolved absolute paths. "~" or "$HOME" do NOT work in crontab environment variables in general.
Note: if you prefer to edit crontab (and other terminal operations) with "nano", set in ~/.bash_profile or similar
export EDITOR=nano
A typical CI system uses:
- Python with PyGemini installed
- Gemini3D and external libraries install-prefix ~/lib_gcc
Specify CONDA_PREFIX as auto-enabled "conda activate" doesn't propagate to crontab. We use example home directory "/home/ci".
These examples use multiple daily runs spaced far enough apart in time so that the cron jobs shouldn't run simultaneously.
These example crontab were created by examining the user PATH echo $PATH
and including other key environment variables at the top of crontab.
- CMake Snap under /var/lib/snapd/snap/bin
- seperate big hard drive for CI data at path /mnt/raid/ci
- C++ test starts at 00:10 local time, Fortran test starts at 04:10 local time (each run takes about 2.5 hours on this 32-core Xeon machine)
PATH=/home/ci/miniconda3/bin:/home/ci/miniconda3/condabin:/var/lib/snapd/snap/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
CONDA_PREFIX=/home/ci/miniconda3
MPI_ROOT=/usr/lib64/openmpi
GEMINI_CIROOT=/mnt/raid/ci_data
CMAKE_PREFIX_PATH=/home/ci/lib_gcc
CI=true
CTEST_SITE=LinuxCI
10 00 * * * ctest -Dgemini3d_tag=fclaw_prep3_geogdneu -DCTEST_MODEL=Nightly -S $HOME/code/gemci/ci.cmake -V
- Homebrew Gfortran + AppleClang C/C++ compilers
- C++ test starts at 00:10 local time, Fortran test starts at 08:10 local time (each run takes about 5 hours on Apple Silicon M1)
PATH=/opt/homebrew/sbin:/opt/homebrew/bin:/Users/ci/miniconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
CONDA_PREFIX=/Users/ci/miniconda3
GEMINI_CIROOT=/Users/ci/ci_data
CMAKE_PREFIX_PATH=/Users/ci/lib_gcc
CI=true
CTEST_SITE=MacCI
10 00 * * * ctest -Dgemini3d_tag=fclaw_prep3_geogdneu -DCTEST_MODEL=Nightly -S $HOME/code/gemci/ci.cmake -V