Commit 407b72d8 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

gitlab-ci: restructure into the "new" pattern

Changes:

  - boilerplate stuff is off in included files
  - the top-level is just the jobs which are built up from common
    building blocks
  - build names are no longer prefixes of each other (to avoid CDash not
    reliably distinguishing between builds with common substrings)
  - packages are forwarded from the test steps for future uploading
parent 3064dc1d
# CI strategy for ParaView-Superbuild
#
# Builders:
#
# - CentOS 7
# * .gitlab/ci/docker/centos7
# - "Full" superbuild
# - GLX
# - devtoolset-7
# * .gitlab/ci/docker/centos7
# - "Full" superbuild
# - EGL, no GLX
# - devtoolset-7
# * .gitlab/ci/docker/centos7
# - OSMesa superbuild
# - devtoolset-7
.only_settings: &only_settings
- merge_requests
- branches@paraview/paraview-superbuild
- tags@paraview/paraview-superbuild
.script_setup_tools: &script_setup_tools
- .gitlab/ci/sccache.sh
- .gitlab/ci/cmake.sh
- .gitlab/ci/ninja.sh
- export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
- "cmake --version"
- "ninja --version"
- export GIT_CEILING_DIRECTORIES=$PWD
- export CC=$PWD/.gitlab/shortcuts/gcc
- export CXX=$PWD/.gitlab/shortcuts/g++
.script_submodule_update: &script_submodule_update
- git submodule foreach --recursive cmake -Dusername:STRING="$CI_PROJECT_NAMESPACE" -Durl_prefix:STRING="https://$CI_SERVER_HOST" -P $PWD/.gitlab/ci/fetch_submodule.cmake
- git submodule sync --recursive
- git submodule update --init --recursive
.script_checkout_paraview: &script_checkout_paraview
- .gitlab/ci/checkout_paraview.sh
- export PARAVIEW_COMMIT_SHA=`git -C $CI_BUILDS_DIR/source-paraview rev-parse HEAD`
- export PARAVIEW_COMMIT_SHORT_SHA=`git -C $CI_BUILDS_DIR/source-paraview rev-parse --short HEAD`
.linux: &linux
variables:
GIT_CLONE_PATH: "$CI_BUILDS_DIR/gitlab-kitware-sciviz-ci"
GIT_SUBMODULE_STRATEGY: none
before_script:
- *script_setup_tools
- *script_submodule_update
- sccache --start-server
- sccache --show-stats
.centos7: &centos7
image: "kitware/paraview:ci-superbuild-centos7-20200210"
variables:
LAUNCHER: "scl enable devtoolset-7 --"
.fedora31: &fedora31
image: "kitware/paraview:ci-superbuild-fedora31-20200218"
.cmake_build_unix: &cmake_build_unix
stage: build
only: *only_settings
tags:
- build
- paraview
- docker
- linux
timeout: 3 hours
interruptible: true
script:
- *script_checkout_paraview
- "$LAUNCHER ctest -V -S .gitlab/ci/ctest_configure.cmake"
- "$LAUNCHER ctest -V -S .gitlab/ci/ctest_build.cmake"
- "$LAUNCHER ctest -V -S .gitlab/ci/ctest_package.cmake"
- sccache --show-stats
cache:
key: linux
paths:
# Cache downloaded tarballs
- build/downloads/
artifacts:
expire_in: 24 hours
when: always
paths:
# The artifacts for debugging
- build/CMakeCache.txt
- build/superbuild/*.cmake
# logs for suppressed outputs
- build/superbuild/numpy/stamp/numpy-*.log
- build/superbuild/paraview/stamp/paraview-*.log
- build/superbuild/python3/stamp/python3-*.log
- build/superbuild/pythonzope/stamp/pythonzope-*.log
- build/superbuild/pythonzopeinterface/stamp/pythonzopeinterface-*.log
- build/superbuild/qt5/stamp/qt5-*.log
- build/superbuild/scipy/stamp/scipy-*.log
# tarballs
- build/*.tar.*
# Files requires for packaging test.
- build/superbuild/CMakeFiles/cmake/
- build/superbuild/superbuild_testing_trampoline.cmake
# Files required for other tests.
- build/tests
# CTest files.
- build/CTestCustom*.cmake
- build/CTestTestfile.cmake
- build/superbuild/CTestTestfile.cmake
- build/Testing/
# CDash files.
- build/DartConfiguration.tcl
.cmake_test_tags: &cmake_test_tags
tags:
- paraview
- docker
- linux
.cmake_test_x11_tags: &cmake_test_x11_tags
tags:
- paraview
- docker
- linux
- x11
.cmake_test_unix: &cmake_test_unix
stage: test
only: *only_settings
interruptible: true
script:
- *script_checkout_paraview
- "$LAUNCHER ctest -V -S .gitlab/ci/ctest_test.cmake"
artifacts:
expire_in: 24 hours
# Tests failing should still upload the artifact for further testing.
when: always
paths:
# Debugging logs
- build/Testing/Temporary/Last*.log
include:
# Metadata shared my many jobs
- local: .gitlab/rules.yml
- local: .gitlab/artifacts.yml
# OS builds.
- local: .gitlab/os-linux.yml
stages:
- build
- test
build:linux:
################################################################################
# Job declarations
#
# Each job must pull in each of the following keys:
#
# - a "base image"
# - a build script
# - tags for the jobs
# - already provided for upload and CI update jobs
# - rules for when to run the job
#
# Additionally, jobs may also contain:
#
# - artifacts
# - dependency/needs jobs for required jobs
################################################################################
# Linux
## Normal build
build:linux-plain:
extends:
- .linux
- .centos7
- .cmake_build_unix
variables:
CMAKE_CONFIGURATION: linux
- .centos7_plain
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:linux:
test:linux-plain:
extends:
- .linux
- .fedora31
- .cmake_test_unix
- .cmake_test_x11_tags
variables:
CMAKE_CONFIGURATION: linux
- .fedora31_plain
- .cmake_test_linux
- .cmake_package_artifacts
- .linux_test_tags
- .run_automatically
dependencies:
- build:linux
- build:linux-plain
needs:
- build:linux
- build:linux-plain
## EGL build
build:linux_egl:
build:linux-egl:
extends:
- .linux
- .centos7
- .cmake_build_unix
variables:
CMAKE_CONFIGURATION: linux_egl
- .centos7_egl
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:linux_egl:
test:linux-egl:
extends:
- .linux
- .fedora31
- .cmake_test_unix
- .cmake_test_x11_tags
variables:
CMAKE_CONFIGURATION: linux_egl
# Required to get EGL support in the container.
- .fedora31_egl
- .cmake_test_linux
- .cmake_package_artifacts
- .linux_test_tags
- .run_automatically
dependencies:
- build:linux_egl
- build:linux-egl
needs:
- build:linux_egl
- build:linux-egl
build:linux_osmesa:
## OSMesa shared build
build:linux-osmesa-shared:
extends:
- .linux
- .centos7
- .cmake_build_unix
variables:
CMAKE_CONFIGURATION: linux_osmesa
- .centos7_osmesa_shared
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:linux_osmesa:
test:linux-osmesa-shared:
extends:
- .linux
- .centos7
- .cmake_test_unix
- .cmake_test_tags
variables:
CMAKE_CONFIGURATION: linux_osmesa
- .centos7_osmesa_shared
- .cmake_test_linux
- .cmake_package_artifacts
- .linux_test_tags
- .run_automatically
dependencies:
- build:linux_osmesa
- build:linux-osmesa-shared
needs:
- build:linux_osmesa
- build:linux-osmesa-shared
## OSMesa static build
#
# This builds ParaView statically while keeping the other dependencies as
# shared.
# this builds ParaView statically while keeping the other dependencies
# as shared.
build:linux_osmesa_static:
build:linux-osmesa-static:
extends:
- .linux
- .centos7
- .cmake_build_unix
variables:
CMAKE_CONFIGURATION: linux_osmesa_static
- .centos7_osmesa_static
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:linux_osmesa_static:
test:linux-osmesa-static:
extends:
- .linux
- .centos7
- .cmake_test_unix
- .cmake_test_tags
variables:
CMAKE_CONFIGURATION: linux_osmesa_static
- .centos7_osmesa_static
- .cmake_test_linux
- .cmake_package_artifacts
- .linux_test_tags
- .run_automatically
dependencies:
- build:linux_osmesa_static
- build:linux-osmesa-static
needs:
- build:linux_osmesa_static
- build:linux-osmesa-static
# Lists of paths for artifacts of various stages.
.cmake_build_artifacts:
artifacts:
expire_in: 1d
when: always
paths:
# The artifacts for debugging
- build/CMakeCache.txt
- build/superbuild/*.cmake
# logs for suppressed outputs
- build/superbuild/*/stamp/*.log
# Packages
- build/ParaView-*.tar.*
- build/ParaView-*.dmg
- build/ParaView-*.zip
# Files requires for packaging test.
- build/superbuild/CMakeFiles/cmake/
- build/superbuild/superbuild_testing_trampoline.cmake
# Files required for other tests.
- build/tests/
# CTest files.
- build/CTestCustom*.cmake
- build/CTestTestfile.cmake
- build/superbuild/CTestTestfile.cmake
- build/Testing/
# CDash files.
- build/DartConfiguration.tcl
.cmake_test_artifacts:
artifacts:
expire_in: 1d
# Tests failing should still upload the artifact for further testing.
when: always
paths:
# Debugging logs
- build/Testing/Temporary/Last*.log
.cmake_package_artifacts:
artifacts:
expire_in: 4d
# Tests failing should still upload the artifact for further testing.
when: always
paths:
- build/ParaView-*.tar.*
- build/ParaView-*.dmg
- build/ParaView-*.zip
set(BUILD_SHARED_LIBS_paraview "OFF" CACHE STRING "")
include("${CMAKE_CURRENT_LIST_DIR}/configure_linux_osmesa.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/configure_linux_osmesa_shared.cmake")
# Linux-specific builder configurations and build commands
## Base images
### CentOS
#
# CentOS 7 is the primary deployment platform. This gains us maximum
# compatibility with many Linux distros while also providing easy ways to get
# newer compilers.
.centos7:
image: "kitware/paraview:ci-superbuild-centos7-20200210"
variables:
GIT_SUBMODULE_STRATEGY: none
LAUNCHER: "scl enable devtoolset-7 --"
GIT_CLONE_PATH: $CI_BUILDS_DIR/gitlab-kitware-sciviz-ci
.centos7_plain:
extends: .centos7
variables:
CMAKE_CONFIGURATION: linux_plain
.centos7_egl:
extends: .centos7
variables:
CMAKE_CONFIGURATION: linux_egl
.centos7_osmesa_shared:
extends: .centos7
variables:
CMAKE_CONFIGURATION: linux_osmesa_shared
.centos7_osmesa_static:
extends: .centos7
variables:
CMAKE_CONFIGURATION: linux_osmesa_static
.fedora31:
image: "kitware/paraview:ci-superbuild-fedora31-20200218"
variables:
GIT_SUBMODULE_STRATEGY: none
GIT_CLONE_PATH: $CI_BUILDS_DIR/gitlab-kitware-sciviz-ci
.fedora31_plain:
extends: .fedora31
variables:
CMAKE_CONFIGURATION: linux_plain
.fedora31_egl:
extends: .fedora31
variables:
CMAKE_CONFIGURATION: linux_egl
## Tags
.linux_builder_tags:
tags:
- build
- docker
- linux
- paraview
.linux_test_tags:
tags:
- docker
- linux
- paraview
- x11
## Linux-specific scripts
.before_script_linux: &before_script_linux
- .gitlab/ci/cmake.sh
- .gitlab/ci/ninja.sh
- export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
- cmake --version
- ninja --version
- "git submodule update --init --recursive || :"
- git submodule foreach --recursive cmake "-Dusername:STRING=$CI_PROJECT_NAMESPACE" "-Durl_prefix:STRING=https://$CI_SERVER_HOST" -P "$PWD/.gitlab/ci/fetch_submodule.cmake"
- git submodule sync --recursive
- git submodule update --init --recursive
.before_script_linux_paraview: &before_script_linux_paraview
- .gitlab/ci/checkout_paraview.sh
- export PARAVIEW_COMMIT_SHA=`git -C $CI_BUILDS_DIR/source-paraview rev-parse HEAD`
- export PARAVIEW_COMMIT_SHORT_SHA=`git -C $CI_BUILDS_DIR/source-paraview rev-parse --short HEAD`
.cmake_build_linux:
stage: build
script:
- *before_script_linux
- *before_script_linux_paraview
- export GIT_CEILING_DIRECTORIES=$PWD
- .gitlab/ci/sccache.sh
- export CC=$PWD/.gitlab/shortcuts/gcc
- export CXX=$PWD/.gitlab/shortcuts/g++
- sccache --start-server
- sccache --show-stats
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
- "$LAUNCHER ctest -V --output-on-failure -S .gitlab/ci/ctest_package.cmake"
- sccache --show-stats
cache:
key: linux
paths:
# Cache downloaded tarballs.
- build/downloads/
interruptible: true
.cmake_test_linux:
stage: test
script:
- *before_script_linux
- "$LAUNCHER ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake"
interruptible: true
# Rules for where jobs can run
.run_automatically:
rules:
- if: '$CI_PROJECT_PATH == "paraview/paraview-superbuild"'
when: always
- if: '$CI_MERGE_REQUEST_ID'
when: always
- when: never
.run_manually:
rules:
- if: '$CI_PROJECT_PATH == "paraview/paraview-superbuild"'
when: delayed
start_in: 30 minutes
- if: '$CI_MERGE_REQUEST_ID'
when: manual
- when: never
.merged_only:
rules:
- if: '$CI_PROJECT_PATH == "paraview/paraview-superbuild"'
when: always
- when: never
.upload_only:
rules:
- if: '$GIRDER_UPLOAD_ENABLE == "true"'
when: always
- when: never
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment