1 # Test goal: Initial build with close-to-default settings that always needs to pass before follow-up CI stages run
2 # Test intents (should change rarely and conservatively):
3 # OS: Ubuntu oldest supported
8 # Scope: configure, build, unit tests
9 # Test implementation choices (free to change as needed):
13 # Parallelism nt/ntomp: 4/2
16 # Test scope: configure, build, unit tests
23 image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-18.04-llvm-9:release-2021
25 CMAKE: /usr/local/cmake-3.15.7/bin/cmake
26 KUBERNETES_CPU_LIMIT: 8
27 KUBERNETES_CPU_REQUEST: 4
28 KUBERNETES_MEMORY_REQUEST: 8Gi
29 CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=None"
30 CMAKE_MPI_OPTIONS: "-DGMX_THREAD_MPI=ON"
31 CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=OFF"
32 CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug"
33 CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF"
34 CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF"
35 COMPILER_MAJOR_VERSION: 9
36 BUILD_DIR: simple-build
38 - CMAKE=${CMAKE:-$(which cmake)}
39 - echo $CMAKE_COMPILER_SCRIPT
40 - echo $CMAKE_EXTRA_OPTIONS
41 - echo $CMAKE_SIMD_OPTIONS
42 - echo $CMAKE_GPU_OPTIONS
43 - echo $CMAKE_MPI_OPTIONS
44 - echo $CMAKE_PRECISION_OPTIONS
45 - echo $CMAKE_BUILD_TYPE_OPTIONS
46 - echo $CMAKE_GMXAPI_OPTIONS
47 - if [[ -d $BUILD_DIR ]] ; then
48 echo "Cleaning up build directory" ;
49 rm -rf $BUILD_DIR && mkdir $BUILD_DIR ;
51 echo "Preparing new build directory" ;
56 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
57 $CMAKE_COMPILER_SCRIPT
61 $CMAKE_PRECISION_OPTIONS
62 $CMAKE_BUILD_TYPE_OPTIONS
65 -DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR -DGMX_COMPILER_WARNINGS=ON
66 2>&1 | tee cmakeLog.log
67 - awk '/CMake Warning/,/^--|^$/' cmakeLog.log | tee cmakeErrors.log
68 - if [ -s cmakeErrors.log ] ; then echo "Found CMake warning while processing build"; cat cmakeErrors.log ; exit 1; fi
69 - $CMAKE --build . -- -j$KUBERNETES_CPU_LIMIT 2>&1 | tee buildLogFile.log
70 - $CMAKE --build . --target tests -- -j$KUBERNETES_CPU_LIMIT 2>&1 | tee testBuildLogFile.log
71 - awk '/warning/,/warning.*generated|^$/' buildLogFile.log testBuildLogFile.log
72 | grep -v "CMake" | tee buildErrors.log || true
73 - grep "cannot be built" buildLogFile.log testBuildLogFile.log | tee -a buildErrors.log || true
74 - $CMAKE --build . --target install 2>&1 | tee installBuildLogFile.log
75 - if [ -s buildErrors.log ] ; then echo "Found compiler warning during build"; cat buildErrors.log; exit 1; fi
76 - ctest -D ExperimentalTest --output-on-failure | tee ctestLog.log || true
77 - awk '/The following tests FAILED/,/^Errors while running CTest|^$/'
78 ctestLog.log | tee ctestErrors.log
79 - xsltproc $CI_PROJECT_DIR/scripts/CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > JUnitTestResults.xml
80 - if [ -s ctestErrors.log ] ; then
81 echo "Error during running ctest";
87 junit: $BUILD_DIR/JUnitTestResults.xml