Use CMake to propagate versions and hashes to gitlab jobs
[alexxy/gromacs.git] / admin / gitlab-ci / documentation.gitlab-ci.yml
index cb717d2c0d97b5331a3d4eb6a3e8ff4ec28f6b91..5018fdfc450b8d3c293a693ad951254f8f295d9e 100644 (file)
@@ -47,8 +47,6 @@
     # without additional hinting. Once CMakeCache.txt exists, the later stages
     # should work fine without reactivating the venv.
     - source /root/venv/py3.7/bin/activate
-    # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
-    - /root/venv/py3.7/bin/pip install pybind11
     - cmake ..
       -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
       $CMAKE_COMPILER_SCRIPT
     - echo $CMAKE_BUILD_TYPE_OPTIONS
     - echo $CMAKE_GMXAPI_OPTIONS
     - echo $REL_OPTION
-    - VERSION=`cat version.json |
-      python3 -c "import json,sys; print(json.load(sys.stdin)['version'])"`
+    - VERSION=`sed -n -e '/GMX_VERSION_STRING\b/ s/.*"\(.*\)")/\1/p' VersionInfo-partial.cmake.cmakein`
     - if [[ $GROMACS_RELEASE != "true" ]] ; then
       VERSION=$VERSION-dev ;
       fi
-    - REGTEST_COMPARE=`cat version.json |
-      python3 -c "import json,sys; print(json.load(sys.stdin)['regressiontest-md5sum'])"`
+    - REGTEST_COMPARE=`sed -n -e '/REGRESSIONTEST_MD5SUM/ s/.*"\(.*\)")/\1/p' VersionInfo-partial.cmake.cmakein`
     - SOURCENAME=gromacs-$VERSION
     - SOURCETARBALL=$SOURCENAME.tar.gz
     - REGTESTNAME=regressiontests-$VERSION
       fi
     - cd $RELEASE_BUILD_DIR
     - source /root/venv/py3.7/bin/activate
-    # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
-    - /root/venv/py3.7/bin/pip install pybind11
     - cmake ../$RELEASE_SOURCE/
       -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
       $CMAKE_COMPILER_SCRIPT
@@ -195,8 +189,6 @@ docs:configure:
   image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
   script:
     - cd $BUILD_DIR
-    # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
-    - /root/venv/py3.7/bin/pip install pybind11
     - cmake --build . --target gmx -- -j8
     - cd ..
   artifacts:
@@ -244,8 +236,6 @@ docs:build:
     - cd $BUILD_DIR
     - cmake --build . --target manual -- -j4 | tee docs/manual/all-output.log
       | grep -i "warning" | grep -v "TeX" | grep -v "Package" || true
-    # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
-    - /root/venv/py3.7/bin/pip install pybind11
     - cmake --build . --target webpage -- -j4
     - grep "WARNING:" docs/manual/all-output.log | tee pythonErrors.log || true
     - grep -i "error" docs/sphinx-*.log | tee sphinxDiagnostics.log || true