-include:
- - local: '/admin/ci-templates/.include-template.yml'
-
-.build-extends-template:
- extends:
- - .build-template
- - .build-cache-template
- - .variables-template
- - .tags-template
-
-.test-extends-template:
- extends:
- - .test-base-template
- - .test-cache-template
- - .test-script-template
- - .variables-template
- - .tags-template
-
-.regressiontests-extends-template:
- extends:
- - .build-cache-template
- - .variables-template
- - .tags-template
- - .regressiontests-template
-
-before_script:
- - mkdir -p ccache
- - export CCACHE_BASEDIR=${PWD}
- - export CCACHE_DIR=${PWD}/ccache
-
-# CI is organized into stages so that if early stages fail
+# Declare and sequence the stages to which jobs may be assigned.
+# The pipeline is organized into stages so that if early stages fail
# the later ones are not run.
stages:
- # Preparation for building and testing (getting regressiontest repo right now)
+ # Initial test build for checking simple compilation and getting regressiontest repo
- pre-build
+ # Configuration for building and testing
+ - configure-build
# Build GROMACS in multiple configurations
- build
- # Test each configuration, perhaps in multiple ways
+ # Unit test each configuration, perhaps in multiple ways
- test
# Generate documentation files
- documentation
- source-check
# Linting, docs, static analysis, coverage, code analysis...
- post-test
- # Release work for packaging code and verifying webpage
- - release
-
-.build-gcc:
- extends:
- - .build-extends-template
- - .gcc-before-script-template
- - .build-gcc-template
-
-.test-gcc:
- extends:
- - .test-extends-template
- - .gcc-before-script-template
- - .test-gcc-template
-
-.build-gcc-mpi:
- extends:
- - .build-gcc
- - .build-mpi-template
-
-.build-clang:
- extends:
- - .build-extends-template
- - .clang-before-script-template
- - .build-clang-template
-
-.test-clang:
- extends:
- - .test-extends-template
- - .clang-before-script-template
- - .test-clang-template
-
-.build-docs-binary:
- extends:
- - .build-extends-template
- - .build-docs-binary-template
- - .clang-before-script-template
- - .build-clang-template
-
-.build-docs-webpage:
- extends:
- - .build-extends-template
- - .build-docs-webpage-template
- - .clang-before-script-template
- - .build-clang-template
-
-.build-cuda-gcc:
- extends:
- - .build-gcc
- - .build-cuda-template
-
-prepare-regressiontests:
- extends: .regressiontests-extends-template
-
-
-build-gcc-7:
- extends: .build-gcc
-
- variables:
- COMPILER_MAJOR_VERSION: 7
-
-test-gcc-7:
- extends: .test-gcc
-
- variables:
- COMPILER_MAJOR_VERSION: 7
-
- dependencies:
- - build-gcc-7
- - prepare-regressiontests
-
-##build-gcc-7-mpi:
-## extends: .build-gcc-mpi
-##
-## variables:
-## COMPILER_MAJOR_VERSION: 7
-##
-build-gcc-7-double:
- extends: .build-gcc
-
- variables:
- COMPILER_MAJOR_VERSION: 7
- CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON
-
-test-gcc-7-double:
- extends: .test-gcc
-
- variables:
- COMPILER_MAJOR_VERSION: 7
-
- dependencies:
- - build-gcc-7-double
- - prepare-regressiontests
-
-
-build-gcc-8:
- extends: .build-gcc
-
- variables:
- COMPILER_MAJOR_VERSION: 8
-
-test-gcc-8:
- extends: .test-gcc
-
- variables:
- COMPILER_MAJOR_VERSION: 8
-
-
- dependencies:
- - build-gcc-8
- - prepare-regressiontests
-
-build-gcc-7-simd-sse41:
- extends: .build-gcc
- variables:
- COMPILER_MAJOR_VERSION: 7
- CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=SSE4.1"
-
-test-gcc-7-simd-sse41:
- extends: .test-gcc
-
- variables:
- COMPILER_MAJOR_VERSION: 7
-
- dependencies:
- - build-gcc-7-simd-sse41
- - prepare-regressiontests
-
-##build-gcc-8-cuda-10:
-## extends: .build-cuda-gcc
-##
-## variables:
-## COMPILER_MAJOR_VERSION: 8
-## CUDA_BASE_VERSION: "10.1"
-
-build-clang-7:
- extends: .build-clang
-
- variables:
- COMPILER_MAJOR_VERSION: 7
-
-test-clang-7:
- extends: .test-clang
-
- variables:
- COMPILER_MAJOR_VERSION: 7
-
- dependencies:
- - build-clang-7
- - prepare-regressiontests
-
-build-clang-8:
- extends: .build-clang
-
- variables:
- COMPILER_MAJOR_VERSION: 8
-
-test-clang-8:
- extends: .test-clang
-
- variables:
- COMPILER_MAJOR_VERSION: 8
-
- dependencies:
- - build-clang-8
- - prepare-regressiontests
-
-# For version of clang before 7, we need to always provide the full version
-# Use something like this instead in the download script:
-# APT_COMPILER_VERSION=$(($COMPILER_MAJOR_VERSION < 7 ? "${COMPILER_MAJOR_VERSION}.0" : $COMPILER_MAJOR_VERSION))
-build-clang-6:
- extends: .build-clang
-
- variables:
- COMPILER_MAJOR_VERSION: "6.0"
-
-test-clang-6:
- extends: .test-clang
-
- variables:
- COMPILER_MAJOR_VERSION: "6.0"
-
- dependencies:
- - build-clang-6
- - prepare-regressiontests
-
-# TODO turn on openmp when updating master head
-build-clang-tidy:
- extends: .build-clang
- stage: source-check
- needs:
- - job: prepare-regressiontests
- variables:
- BUILD_DIR: build-clang-tidy
- COMPILER_MAJOR_VERSION: 7
- CMAKE_BUILD_TYPE_OPTIONS: -DCMAKE_BUILD_TYPE=Debug
- CMAKE_EXTRA_OPTIONS: -DCLANG_TIDY=clang-tidy-$COMPILER_MAJOR_VERSION -DGMX_CLANG_TIDY=ON -DGMX_COMPILER_WARNINGS=ON -DGMX_OPENMP=off
-
-run-clang-format:
- extends: .build-clang
- stage: source-check
- when: always
- needs:
- - job: prepare-regressiontests
- variables:
- COMPILER_MAJOR_VERSION: 7
- script:
- - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
- - admin/clang-format.sh check --rev=HEAD^ --warnings=clang-format.log
- - grep -iq "needs formatting" clang-format.log | tee formatting.txt || true
- - if [ -s formatting.txt ] ; then echo "clang-format.sh found issues"; exit 1; fi
- artifacts:
- when: on_failure
- paths:
- - clang-format.log
- - formatting.txt
-
-update-with-clang-format:
- extends: .build-clang
- stage: source-check
- when: manual
- allow_failure: true
- dependencies: []
- variables:
- COMPILER_MAJOR_VERSION: 7
- script:
- - export CLANG_FORMAT=clang-format-$COMPILER_MAJOR_VERSION
- - admin/clang-format.sh update --rev=HEAD^ --warnings=clang-format.log
- - grep -iq "clang-format performed" clang-format.log | tee formatting.txt || true
- - if [ -s formatting.txt ] ; then echo "clang-format.sh updated files"; exit 1; fi
- artifacts:
- when: always
- paths:
- - clang-format.log
- - formatting.txt
-
-build-docs:
- when: always
- extends: .build-docs-binary
- stage: documentation
- needs:
- - job: prepare-regressiontests
- variables:
- BUILD_DIR: build-docs
- COMPILER_MAJOR_VERSION: 7
- CMAKE_EXTRA_OPTIONS: -DGMX_BUILD_HELP=on -DGMX_BUILD_MANUAL=on -DGMX_SIMD=None -DGMX_GPU=off
-
-run-check-source:
- when: always
- extends: .build-docs-binary
- stage: source-check
- needs:
- - job: build-docs
- artifacts: true
- variables:
- BUILD_DIR: build-docs
- COMPILER_MAJOR_VERSION: 7
- script:
- - cd $BUILD_DIR
- - cmake --build . --target check-source
- - grep -qi "error" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee doxygenError.txt || true
- - grep -qi "warning" docs/doxygen/doxygen*log docs/doxygen/check-source.log | tee -a doxygenError.txt || true
- - if [ -s doxygenError.txt ] ; then echo "Found errors while running doxygen"; exit 1; fi
- artifacts:
- name: docs-artifacts-$CI_COMMIT_REF_SLUG
- when: always
- expire_in: 1 week
- paths:
- - $BUILD_DIR/docs/doxygen/doxygen-xml.log
- - $BUILD_DIR/docs/doxygen/check-source.log
-
-# 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
- when: always
- stage: post-test
- needs:
- - job: build-docs
- artifacts: true
- - job: run-check-source
- artifacts: true
- variables:
- BUILD_DIR: build-docs
- COMPILER_MAJOR_VERSION: 7
- script:
- - cd $BUILD_DIR
- - set -o pipefail && cmake --build . --target manual 2>&1 > docs/manual/all-output.txt | ts "%Y/%m/%d %H:%M:%S"
- - set -o pipefail && cmake --build . --target webpage | ts "%Y/%m/%d %H:%M:%S"
- - grep -qi "error" docs/sphinx-*.log | tee sphinxDiagnostics.txt || true
- - grep -qi "warning" docs/sphinx-*.log | tee -a sphinxDiagnostics.txt || true
- - if [ -s sphinxDiagnostics.txt ] ; then echo "Found errors during Sphinx documentation build"; cat sphinxDiagnostics.txt; exit 1; fi
- - cd ..
- artifacts:
- name: docs-artifacts-$CI_COMMIT_REF_SLUG
- when: always
- expire_in: 1 week
- paths:
- - $BUILD_DIR/docs/html
- - $BUILD_DIR/docs/manual/gromacs.log
- - $BUILD_DIR/docs/manual/all-output.txt
- - $BUILD_DIR/docs/doxygen/doxygen-user.log
- - $BUILD_DIR/docs/doxygen/doxygen-lib.log
- - $BUILD_DIR/docs/doxygen/doxygen-full.log
- - $BUILD_DIR/docs/sphinx-html.log
-
-linkchecker:
- extends: .build-docs-webpage
- stage: release
- when: manual
- needs:
- - job: webpage
- artifacts: true
- variables:
- BUILD_DIR: build-docs
- script:
- - cd $BUILD_DIR
- - linkchecker docs/html/index.html -f ../docs/linkcheckerrc -Fxml --ignore-url html-full --ignore-url html-user --ignore-url html-lib --ignore-url .tar.gz --ignore-url _sources
- artifacts:
- reports:
- junit: $BUILD_DIR/linkchecker-out.xml
+ # Nightly work to configure builds
+ - nightly-configure
+ # Nightly build stage
+ - nightly-build
+ # Nightly deploy stage
+ - nightly-deploy
+ # Release work for packaging code
+ - release-package
+ # Configure code for release builds
+ - release-configure
+ # Release work for packaging code
+ - release-build
+ # Tests for release code
+ - release-tests
+ # Release checksum verification
+ - release-verify
+ # Prepare for deploying artifacts
+ - release-prepare-deploy
+ # Deploy stage for release builds
+ - release-deploy
+include:
+ # Mix-in helper job definitions of general utility.
+ - local: '/admin/gitlab-ci/global.gitlab-ci.yml'
+ - local: '/admin/gitlab-ci/rules.gitlab-ci.yml'
+ # gmxapi Python package.
+ - local: '/admin/gitlab-ci/python-gmxapi.matrix.gitlab-ci.yml'
+ # Further API validation and usability of sample gmxapi extension package.
+ - 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
+ - local: '/admin/gitlab-ci/gromacs.gitlab-ci.yml'
+ - local: '/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml'
+ # Repository cleanliness. Source tidiness, linting, and policy compliance.
+ - local: '/admin/gitlab-ci/lint.gitlab-ci.yml'
+ # Web page and manual.
+ - local: '/admin/gitlab-ci/documentation.gitlab-ci.yml'
+ # Prepare release archives.
+ - local: '/admin/gitlab-ci/archive.gitlab-ci.yml'