Also moves a few jobs between files as seems appropriate.
Eliminates some trivially inherited jobs.
Change-Id: Ib8e989ef560cc14387d14eb0083b5d678ee28651
# Special job to package regressiontest files and have them available for testing
# Runs during pre-build
# Set up to only fetch the files and prepare everything for merge requests
-prepare-regressiontests:
+regressiontests:prepare:
extends:
- .variables:default
cache: {}
paths:
- gmx-regressiontests.tar.gz
-package-regressiontests-release:
+regressiontests:package:
extends:
- .variables:default
cache: {}
paths:
- regressiontests-*.tar.gz
-configure-archive-nightly:
+archive:configure:nightly:
stage: nightly-configure
only:
- web
variables:
- $GROMACS_RELEASE
extends:
- - .configure-docs
+ - .docs:configure
variables:
BUILD_DIR: build-package
CMAKE_SIMD_OPTIONS: -DGMX_SIMD=None
CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_USE_RDTSCP=OFF
CMAKE_MPI_OPTIONS: -DGMX_THREAD_MPI=OFF -DGMX_OPENMP=OFF
-configure-archive-release:
+archive:configure:release:
only:
refs:
- web
variables:
- $GROMACS_RELEASE
extends:
- - .configure-docs
+ - .docs:configure
variables:
BUILD_DIR: build-package
CMAKE_SIMD_OPTIONS: -DGMX_SIMD=None
# the custom build directory due to https://gitlab.com/gitlab-org/gitlab-runner/issues/4203
# As soon as this is resolved we should use the separate build directories instead of
# manually hacking things. TODO: #3361
-.build-archive:
+.archive:build:
extends:
- .gromacs:base:build
- .use-ccache
- .variables:default
- - .documentation-before-script-template
- - .build-docs-binary-template
+ - .before_script:default
+ - .docs:build
# Dockerfiles are from dockerhub, user eriklindahl
image: gromacs/ci-docs-clang:master
only:
- $BUILD_DIR/*log
- gromacs*tar.gz
-build-archive-nightly:
+archive:build:
extends:
- - .build-archive
+ - .archive:build
stage: nightly-build
needs:
- job: simple-build
artifacts: false
- - job: configure-archive-nightly
+ - job: archive:configure:nightly
artifacts: true
only:
- web
variables:
BUILD_DIR: build-package
-package-archive-release:
+archive:package:
extends:
- - .build-archive
+ - .archive:build
stage: release-package
needs:
- - job: configure-archive-release
+ - job: archive:configure:release
artifacts: true
only:
refs:
exit 1;
fi
dependencies:
- - package-archive-release
- - package-regressiontests-release
+ - archive:package
+ - regressiontests:package
- prepare-release-version
-webpage-archive-release:
+archive:nightly-webpage:
extends:
- - .build-docs-webpage
+ - .webpage:build
+ stage: nightly-deploy
+ only:
+ - web
+ - triggers
+ - schedules
+ except:
+ variables:
+ - $GROMACS_RELEASE
+ needs:
+ - job: simple-build
+ artifacts: false
+ - job: linkchecker
+ artifacts: false
+ - job: webpage:build
+ artifacts: true
+ variables:
+ BUILD_DIR: build-docs
+ script:
+ - tar czf webpage.tar.gz $BUILD_DIR/docs/html/
+ artifacts:
+ when: always
+ paths:
+ - webpage.tar.gz
+
+archive:full-release:
+ extends:
+ - .webpage:build
stage: release-deploy
only:
refs:
variables:
- $GROMACS_RELEASE
dependencies:
- - webpage-build-release
- - package-archive-release
- - package-regressiontests-release
+ - webpage:build:release
+ - archive:package
+ - regressiontests:package
variables:
BUILD_DIR: release-doc-builds
script:
# Build documentation and web page.
-.documentation-before-script-template:
- before_script:
- - echo $EXTRA_INSTALLS
- - time apt-get -qq update
- - time apt-get -qqy --no-install-suggests --no-install-recommends install
- $EXTRA_INSTALLS
- - mkdir -p ccache
- - export CCACHE_BASEDIR=${PWD}
- - export CCACHE_DIR=${PWD}/ccache
-.configure-docs-template:
+.docs:configure:
# Built by admin/dockerfiles/ci-docs-clang
# TODO this should be organized more like the current documentation.py script
image: gromacs/ci-docs-clang:master
stage: configure-build
extends:
+ - .gromacs:base:configure
- .variables:default
+ - .before_script:default
only:
refs:
- web
paths:
- $BUILD_DIR
-.configure-docs-release-template:
+.docs:configure:release:
# Built by admin/dockerfiles/ci-docs-clang
# TODO this should be organized more like the current documentation.py script
image: gromacs/ci-docs-clang:master
stage: release-configure
extends:
+ - .gromacs:base:configure
- .variables:default
+ - .before_script:default
+ cache: {}
variables:
KUBERNETES_CPU_LIMIT: 1
KUBERNETES_CPU_REQUEST: 1
- $RELEASE_REGRESSIONTESTS
- $RELEASE_SOURCE
-.configure-docs:
- extends:
- - .gromacs:base:configure
- - .configure-docs-template
- - .documentation-before-script-template
-
-.configure-docs-release:
+docs:configure:
extends:
- - .gromacs:base:configure
- - .configure-docs-release-template
- - .documentation-before-script-template
- cache: {}
-
-configure-docs:
- extends:
- - .configure-docs
+ - .docs:configure
needs:
- job: simple-build
artifacts: false
variables:
- $GROMACS_RELEASE
-.build-docs-binary-template:
+.docs:build:
# Built by admin/dockerfiles/ci-docs-clang
# TODO this should be organized more like the current documentation.py script
image: gromacs/ci-docs-clang:master
paths:
- $BUILD_DIR
-.build-docs-webpage-template:
+docs:build:
+ extends:
+ - .gromacs:base:build
+ - .variables:default
+ - .use-ccache
+ - .docs:build
+ - .before_script:default
+ stage: documentation
+ needs:
+ - job: simple-build
+ artifacts: false
+ - job: docs:configure
+ artifacts: true
+ variables:
+ BUILD_DIR: build-docs
+ except:
+ variables:
+ - $GROMACS_RELEASE
+
+# The manual build is built separately so that errors in converting
+# Sphinx to LaTeX and compiling can always be found in the
+# all-output.txt file, while avoiding many thousands of lines of spam
+# from pdflatex for normal builds. This does reduce the available
+# parallel utilization, and so increases the build time.
+#
+# TODO why are the doxygen and sphinx log files disappearing
+# TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
+.webpage:build:
+ extends:
+ - .gromacs:base:build
+ - .variables:default
+ - .before_script:default
# Built by admin/dockerfiles/ci-docs-clang
# TODO this should be organized more like the current documentation.py script
image: gromacs/ci-docs-clang:master
- $BUILD_DIR/docs/doxygen/doxygen-full.log
- $BUILD_DIR/docs/sphinx-html.log
-.build-docs-binary:
- extends:
- - .gromacs:base:build
- - .use-ccache
- - .variables:default
- - .use-ccache
- - .build-docs-binary-template
- - .documentation-before-script-template
-
-.build-docs-webpage:
- extends:
- - .gromacs:base:build
- - .variables:default
- - .build-docs-webpage-template
- - .documentation-before-script-template
-
-build-docs:
+webpage:build:
extends:
- - .build-docs-binary
- stage: documentation
- needs:
- - job: simple-build
- artifacts: false
- - job: configure-docs
- artifacts: true
- variables:
- BUILD_DIR: build-docs
- except:
- variables:
- - $GROMACS_RELEASE
-
-# The manual build is built separately so that errors in converting
-# Sphinx to LaTeX and compiling can always be found in the
-# all-output.txt file, while avoiding many thousands of lines of spam
-# from pdflatex for normal builds. This does reduce the available
-# parallel utilization, and so increases the build time.
-#
-# TODO why are the doxygen and sphinx log files disappearing
-# TODO use a feature from gitlab runner instead of using pipefail to get timings for the job
-webpage:
- extends:
- - .build-docs-webpage
+ - .webpage:build
stage: post-test
needs:
- - job: build-docs
+ - job: docs:build
artifacts: true
- - job: run-check-source
+ - job: check-source
artifacts: false
variables:
BUILD_DIR: build-docs
variables:
- $GROMACS_RELEASE
-webpage-nightly:
+webpage:configure:
extends:
- - .build-docs-webpage
- stage: nightly-deploy
- only:
- - web
- - triggers
- - schedules
- except:
- variables:
- - $GROMACS_RELEASE
- needs:
- - job: simple-build
- artifacts: false
- - job: linkchecker
- artifacts: false
- - job: webpage
- artifacts: true
- variables:
- BUILD_DIR: build-docs
- script:
- - tar czf webpage.tar.gz $BUILD_DIR/docs/html/
- artifacts:
- when: always
- paths:
- - webpage.tar.gz
-
-webpage-configure-release:
- extends:
- - .configure-docs-release
+ - .docs:configure:release
cache: {}
only:
refs:
variables:
- $GROMACS_RELEASE
dependencies:
- - package-archive-release
- - package-regressiontests-release
+ - archive:package
+ - regressiontests:package
- prepare-release-version
variables:
CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on
-webpage-binary-release:
+webpage:dependencies:
extends:
- - .build-docs-binary
+ - .gromacs:base:build
+ - .variables:default
+ - .use-ccache
+ - .docs:build
+ - .before_script:default
stage: release-build
needs:
- - job: webpage-configure-release
+ - job: webpage:configure
artifacts: true
variables:
BUILD_DIR: release-doc-builds
variables:
- $GROMACS_RELEASE
-webpage-build-release:
+webpage:build:release:
extends:
- - .build-docs-webpage
+ - .webpage:build
dependencies:
- - webpage-binary-release
- - webpage-configure-release
+ - webpage:dependencies
+ - webpage:configure
stage: release-prepare-deploy
only:
refs:
EXTRA_INSTALLS: "python3-dev python3-setuptools python3-pip python3-pytest"
# TODO: Get these from updated Docker images.
+# Our generic before_script to install dependencies and prepare the ccache directory.
+.before_script:default:
+ before_script:
+ - echo $EXTRA_INSTALLS
+ - time apt-get -qq update
+ - time apt-get -qqy --no-install-suggests --no-install-recommends install
+ $EXTRA_INSTALLS
+ - mkdir -p ccache
+ - export CCACHE_BASEDIR=${PWD}
+ - export CCACHE_DIR=${PWD}/ccache
+
# Behavioral templates
# Use a persistent compiler cache to speed up rebuilds for a single job.
variables:
- $GROMACS_RELEASE
dependencies:
- - package-archive-release
- - package-regressiontests-release
+ - archive:package
+ - regressiontests:package
- prepare-release-version
gromacs:gcc-7-simd-sse41:configure:
variables:
- $GROMACS_RELEASE
dependencies:
- - package-archive-release
- - package-regressiontests-release
+ - archive:package
+ - regressiontests:package
- prepare-release-version
gromacs:gcc-8:configure:
variables:
- $GROMACS_RELEASE
dependencies:
- - package-archive-release
- - package-regressiontests-release
+ - archive:package
+ - regressiontests:package
- prepare-release-version
gromacs:gcc-8-cuda-10.2:configure:
variables:
- $GROMACS_RELEASE
dependencies:
- - package-archive-release
- - package-regressiontests-release
+ - archive:package
+ - regressiontests:package
- prepare-release-version
gromacs:clang-8:configure:
variables:
- $GROMACS_RELEASE
dependencies:
- - package-archive-release
- - package-regressiontests-release
+ - archive:package
+ - regressiontests:package
- prepare-release-version
# Jobs running during build stage
- job: simple-build
artifacts: false
- job: gromacs:gcc-7:build
- - job: prepare-regressiontests
+ - job: regressiontests:prepare
except:
variables:
- $GROMACS_RELEASE
- job: simple-build
artifacts: false
- job: gromacs:gcc-7-simd-sse41:build
- - job: prepare-regressiontests
+ - job: regressiontests:prepare
except:
variables:
- $GROMACS_RELEASE
- job: simple-build
artifacts: false
- job: gromacs:gcc-7-double:build
- - job: prepare-regressiontests
+ - job: regressiontests:prepare
except:
variables:
- $GROMACS_RELEASE
- job: simple-build
artifacts: false
- job: gromacs:gcc-8:build
- - job: prepare-regressiontests
+ - job: regressiontests:prepare
except:
variables:
- $GROMACS_RELEASE
- job: simple-build
artifacts: false
- job: gromacs:gcc-8-cuda-10.2:build
- - job: prepare-regressiontests
+ - job: regressiontests:prepare
except:
variables:
- $GROMACS_RELEASE
- job: simple-build
artifacts: false
- job: gromacs:clang-6:build
- - job: prepare-regressiontests
+ - job: regressiontests:prepare
except:
variables:
- $GROMACS_RELEASE
- job: simple-build
artifacts: false
- job: gromacs:clang-7:build
- - job: prepare-regressiontests
+ - job: regressiontests:prepare
except:
variables:
- $GROMACS_RELEASE
- job: simple-build
artifacts: false
- job: gromacs:clang-8:build
- - job: prepare-regressiontests
+ - job: regressiontests:prepare
except:
variables:
- $GROMACS_RELEASE
# Repository cleanliness. Source tidiness, linting, and policy compliance.
-configure-clang-tidy:
+clang-tidy:configure:
extends:
- .gromacs:base:configure
- .use-clang7
variables:
- $GROMACS_RELEASE
-build-clang-tidy:
+clang-tidy:build:
extends:
- .gromacs:base:build
- .use-ccache
needs:
- job: simple-build
artifacts: false
- - job: configure-clang-tidy
+ - job: clang-tidy:configure
artifacts: true
variables:
BUILD_DIR: build-clang-tidy
variables:
- $GROMACS_RELEASE
-run-clang-format:
+clang-format:
extends:
- .gromacs:base:build
- .variables:default
- clang-format.log
- formatting.txt
-run-copyright-check:
+copyright-check:
extends:
- .gromacs:base:build
- .variables:default
- years.log
- headers.log
-run-check-source:
+check-source:
extends:
- .variables:default
- - .build-docs-binary-template
- - .documentation-before-script-template
+ - .docs:build
+ - .before_script:default
cache: {}
stage: source-check
needs:
- job: simple-build
artifacts: false
- - job: build-docs
+ - job: docs:build
artifacts: true
variables:
KUBERNETES_CPU_LIMIT: 1
linkchecker:
extends:
- - .build-docs-webpage
+ - .webpage:build
stage: nightly-build
dependencies:
- - webpage
+ - webpage:build
only:
- web
- schedules