* Begin moving to the new CI matrix config conventions.
* Clarify test intentions.
* Add testing for sample_restraint in master branch.
* Use the clang-8 build artifacts instead of gcc-10
for faster gmxapi build.
* Adjust CMake options to get installed headers
needed by consumers of the build artifact.
- local: '/admin/gitlab-ci/global.gitlab-ci.yml'
- local: '/admin/gitlab-ci/rules.gitlab-ci.yml'
# gmxapi Python package.
- - local: '/admin/gitlab-ci/python-gmxapi01.gitlab-ci.yml'
- - local: '/admin/gitlab-ci/python-gmxapi02.gitlab-ci.yml'
- - local: '/admin/gitlab-ci/python-gmxapi03.gitlab-ci.yml'
+ - local: '/admin/gitlab-ci/python-gmxapi.matrix.gitlab-ci.yml'
# Further API validation and usability of sample gmxapi extension package.
- - local: '/admin/gitlab-ci/sample_restraint.gitlab-ci.yml'
- # API regression testing using sample gmxapi extension package.
- - local: '/admin/gitlab-ci/sample_restraint-regression.gitlab-ci.yml'
+ - local: '/admin/gitlab-ci/api-client.matrix.gitlab-ci.yml'
# Build and test GROMACS in a variety of environments and configurations.
# To do: Consider expanding matrix here to improve transparency and reduce file sizes.
# E.g. '/admin/gitlab-ci/matrix/clang-8.gitlab-ci.yml
#!/usr/bin/env bash
#
-# Build, install, and test the gmxapi 0.2 Python package developed with
-# GROMACS 2021.
+# Build, install, and test the gmxapi 0.3 Python package developed with
+# GROMACS 2022.
#
# This script assumes an activated Python venv with the
# gmxapi dependencies already installed, with `python` resolvable by the shell
# Ref: https://redmine.gromacs.org/issues/3273
GMXTOOLCHAINDIR=$INSTALL_DIR/share/cmake/gromacs \
python setup.py sdist
- # TODO: Identify SDIST
+ SDIST=dist/gmxapi*
# Build and install from sdist.
# Note that tool chain may be provided differently in GROMACS 2020 and 2021.
--no-deps \
--no-index \
--no-build-isolation \
- dist/gmxapi*
- # TODO: Build and install from $SDIST instead of wildcard.
+ $SDIST
popd
--- /dev/null
+#!/usr/bin/env bash
+#
+# Build and test the sample_restraint package distributed with GROMACS 2022.
+#
+# This script is intended to support automated GROMACS testing infrastructure,
+# and may be removed without notice.
+#
+# WARNING: This script assumes OpenMPI mpiexec. Syntax for launch wrappers from
+# other implementations will need different syntax, and we should get a
+# MPIRUNNER from the environment, or something.
+
+# Make sure the script errors if any commands error.
+set -e
+
+pushd python_packaging/src
+ # Build and install gmxapi python package from local source.
+ # Note that tool chain may be provided differently across GROMACS versions.
+ if [ "2022" -eq "$GROMACS_MAJOR_VERSION" ]; then
+ GMXTOOLCHAINDIR=$INSTALL_DIR/share/cmake/gromacs \
+ python -m pip install \
+ --no-cache-dir \
+ --no-deps \
+ --no-index \
+ --no-build-isolation \
+ .
+ # TODO: Get sdist artifact for other gmxapi versions.
+# elif [ "2021" -eq "$GROMACS_MAJOR_VERSION" ]; then
+# GMXTOOLCHAINDIR=$INSTALL_DIR/share/cmake/gromacs \
+# python -m pip install \
+# --no-cache-dir \
+# --no-deps \
+# --no-index \
+# --no-build-isolation \
+# dist/gmxapi*
+ else
+ echo "Logic error in GROMACS version handling."
+ exit 1
+ fi
+popd
+
+. $INSTALL_DIR/bin/GMXRC
+pushd python_packaging/sample_restraint
+ mkdir build
+ pushd build
+ # TODO: Update with respect to https://gitlab.com/gromacs/gromacs/-/issues/3133
+ cmake .. \
+ -DDOWNLOAD_GOOGLETEST=ON \
+ -DGMXAPI_EXTENSION_DOWNLOAD_PYBIND=ON
+ make
+
+ make test
+ #TODO: Can we get ctest JUnitXML output here?
+
+ make install
+ popd
+
+ python -m pytest $PWD/tests --junitxml=$PLUGIN_TEST_XML --threads=2
+
+ # Note: Multiple pytest processes getting --junitxml output file argument
+ # may cause problems, so we set the option on only one of the launched processes.
+ # See also Multiple Instruction Multiple Data Model for OpenMPI mpirun:
+ # https://www.open-mpi.org/doc/v3.0/man1/mpiexec.1.php
+ PROGRAM=(`which python` -m mpi4py -m pytest \
+ -p no:cacheprovider \
+ $PWD/tests \
+ --threads=1)
+ # shellcheck disable=SC2068
+ if [ -x `which mpiexec` ]; then
+ PYTHONDONTWRITEBYTECODE=1 \
+ mpiexec --allow-run-as-root \
+ -x OMP_NUM_THREADS=1 \
+ --mca opal_warn_on_missing_libcuda 0 \
+ --mca orte_base_help_aggregate 0 \
+ -n 1 ${PROGRAM[@]} --junitxml=$PLUGIN_MPI_TEST_XML : \
+ -n 1 ${PROGRAM[@]}
+ fi
+popd
--- /dev/null
+# Build and test GROMACS client code to monitor implementation of specified APIs.
+#
+# Job configurations are inside api-client.matrix/ directory.
+
+include:
+ - local: '/admin/gitlab-ci/api-client.matrix/gromacs-master.gitlab-ci.yml'
+# TODO: (https://gitlab.com/gromacs/gromacs/-/issues/3563) Test against MPI builds.
+# - local: '/admin/gitlab-ci/api-client.matrix/gromacs-master-mpi.gitlab-ci.yml'
--- /dev/null
+# Test goal: Continuous integration testing for gmxapi clients development branch.
+# Test intents:
+# OS: Ubuntu oldest supported
+# GPU: unspecified
+# GROMACS: master
+# gmxapi: as per GROMACS master
+# client code: sample_restraint as bundled with GROMACS master
+# Scope: build, install, test
+# Test implementation choices (free to change as needed):
+# GROMACS branch: master
+# gmxapi Python package: 0.3 alpha from GROMACS master
+# compiler: clang-8
+
+
+.sample_restraint:clang-8:gmx2022:
+ extends:
+ - .variables:default
+ - .use-clang:base
+ image: ${CI_REGISTRY_IMAGE}/ci-ubuntu-20.04-llvm-8-cuda-11.0
+ stage: test
+ variables:
+ KUBERNETES_CPU_LIMIT: 2
+ KUBERNETES_CPU_REQUEST: 2
+ KUBERNETES_MEMORY_LIMIT: 2Gi
+ KUBERNETES_MEMORY_REQUEST: 2Gi
+ PLUGIN_TEST_XML: $CI_PROJECT_DIR/py-JUnitTestResults.xml
+ PLUGIN_MPI_TEST_XML: $CI_PROJECT_DIR/py-mpi-JUnitTestResults.xml
+ EXTRA_INSTALLS: "curl libbz2-dev libffi-dev liblzma-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev llvm python-openssl tk-dev zlib1g-dev"
+ GROMACS_MAJOR_VERSION: 2022
+ script:
+ - source $INSTALL_DIR/bin/GMXRC
+ - source $VENVPATH/bin/activate
+ - INSTALL_DIR=$PWD/$INSTALL_DIR OMP_NUM_THREADS=1 bash admin/ci-scripts/build-and-test-sample_restraint-2022.sh
+ artifacts:
+ reports:
+ junit:
+ - $PLUGIN_TEST_XML
+ - $PLUGIN_MPI_TEST_XML
+ when: always
+ expire_in: 1 week
+ tags:
+ - k8s-scilifelab
+ # The dependency means we need to use the same tag restriction as upstream.
+ needs:
+ - job: gromacs:clang-8:build
+ artifacts: true
+
+sample_restraint:clang-8:gmx2022:py-3.7.7:
+ extends:
+ - .sample_restraint:clang-8:gmx2022
+ - .rules:merge-requests
+ variables:
+ VENVPATH: "/root/venv/py3.7"
+ PY_VER: "3.7.7"
+
+sample_restraint:clang-8:gmx2022:py-3.8.2:
+ extends:
+ - .sample_restraint:clang-8:gmx2022
+ - .rules:merge-requests
+ variables:
+ VENVPATH: "/root/venv/py3.8"
+ PY_VER: "3.8.2"
+
+sample_restraint:clang-8:gmx2022:py-3.9.1:
+ extends:
+ - .sample_restraint:clang-8:gmx2022
+ - .rules:merge-requests
+ variables:
+ VENVPATH: "/root/venv/py3.9"
+ PY_VER: "3.9.1"
image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-8-cuda-11.0
variables:
COMPILER_MAJOR_VERSION: 8
+ CMAKE_EXTRA_OPTIONS: -DGMX_INSTALL_LEGACY_API=ON
gromacs:clang-8:build:
extends:
CMAKE: /usr/local/cmake-3.17.2/bin/cmake
COMPILER_MAJOR_VERSION: 9
CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON
- CMAKE_EXTRA_OPTIONS: -DGMX_CYCLE_SUBCOUNTERS=ON
+ CMAKE_EXTRA_OPTIONS: -DGMX_CYCLE_SUBCOUNTERS=ON -DGMX_INSTALL_LEGACY_API=ON
gromacs:clang-9-mpi:build:
# Test using configuration: gromacs:clang-9-mpi:configure
--- /dev/null
+# Build, test, and install Python gmxapi package.
+#
+# Job configurations are inside python-gmxapi.matrix/ directory.
+
+include:
+ - local: '/admin/gitlab-ci/python-gmxapi.matrix/gmxapi-0.3-gromacs-master.gitlab-ci.yml'
+# TODO: (https://gitlab.com/gromacs/gromacs/-/issues/3563) Test against MPI builds.
+# - local: '/admin/gitlab-ci/python-gmxapi.matrix/gmxapi-0.3-gromacs-master-mpi.gitlab-ci.yml'
-#
-# Jobs to test gmxapi client (Python) packages
-#
+# Test goal: Continuous integration testing for gmxapi 0.3 and client Python package.
+# Test intents (should change rarely and conservatively):
+# OS: Ubuntu oldest supported
+# GPU: unspecified
+# GROMACS: newest supported
+# gmxapi: gmxapi 0.3
+# Scope: build, install, test
+# Test implementation choices (free to change as needed):
+# GROMACS branch: master
+# gmxapi Python package: 0.3 alpha from GROMACS master
+# compiler: clang-8
-.gmxapi-0.3:gcc-10:gmx2022:
+
+.gmxapi-0.3:clang-8:gmx2022:
extends:
- .variables:default
- .use-clang:base
- image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10
+ image: ${CI_REGISTRY_IMAGE}/ci-ubuntu-20.04-llvm-8-cuda-11.0
stage: test
variables:
KUBERNETES_CPU_LIMIT: 2
- $PY_MPI_UNIT_TEST_XML
- $PY_ACCEPTANCE_TEST_XML
- $PY_MPI_ACCEPTANCE_TEST_XML
+ paths:
+ - dist/
when: always
expire_in: 1 week
tags:
- k8s-scilifelab
# The dependency means we need to use the same tag restriction as upstream.
needs:
- - job: gromacs:gcc-10:build
+ - job: gromacs:clang-8:build
artifacts: true
-gmxapi-0.3:gcc-10:gmx2022:py-3.7.7:
+gmxapi-0.3:clang-8:gmx2022:py-3.7.7:
extends:
- - .gmxapi-0.3:gcc-10:gmx2022
+ - .gmxapi-0.3:clang-8:gmx2022
- .rules:merge-requests:master
variables:
VENVPATH: "/root/venv/py3.7"
PY_VER: "3.7.7"
-gmxapi-0.3:gcc-10:gmx2022:py-3.8.2:
+gmxapi-0.3:clang-8:gmx2022:py-3.8.2:
extends:
- - .gmxapi-0.3:gcc-10:gmx2022
+ - .gmxapi-0.3:clang-8:gmx2022
- .rules:merge-requests:master
variables:
VENVPATH: "/root/venv/py3.8"
PY_VER: "3.8.2"
+
+gmxapi-0.3:clang-8:gmx2022:py-3.9.1:
+ extends:
+ - .gmxapi-0.3:clang-8:gmx2022
+ - .rules:merge-requests:master
+ variables:
+ VENVPATH: "/root/venv/py3.9"
+ PY_VER: "3.9.1"
CMAKE_MPI_OPTIONS
Provide CMake command line arguments to define GROMACS MPI build options.
+ GROMACS_MAJOR_VERSION
+ Read-only environment variable for CI scripts to check the
+ library API version to expect from the ``build`` job artifacts.
+ Initially, this variable is only defined in
+ :file:`admin/gitlab-ci/api-client.matrix/gromacs-master.gitlab-ci.yml`
+ but could be moved to :file:`admin/gitlab-ci/global.gitlab-ci.yml` if found
+ to be of general utility.
+
GROMACS_RELEASE
Read-only environment variable that can be checked to see if a job is
executing in a pipeline for preparing a tagged release.