Commit 965a9b2e authored by Ben Boeckel's avatar Ben Boeckel

gitlab-ci: refactor to match the new pattern

parent 3d7baf90
Pipeline #182930 passed with stages
in 16 minutes
# CI strategy for SMTK.
#
# Builders:
#
# - Fedora 31
# * ci/docker/fedora31
# - no VTK/ParaView
# - Python 2.7
# * ci/docker/fedora31-vtk
# - VTK only, no ParaView
# - Python 2.7
# * ci/docker/fedora31
# - ParaView
# - Python 2.7
#
# Wanted test sets:
#
# - OS
# - Windows
# - macOS
# - Compilers
# - Ubuntu LTS
# - CentOS
# - Features
# - without Python
# - Python 3 (minimum supported and latest)
# - Documentation
# - Contract testing
# - Perform an installation (from the build stage), make it an artifact, and
# run external projects against it.
# - GUI testing
# - Need to figure out how it works with gitlab-runner.
# - Is offscreen rendering suitable?
.only_settings: &only_settings
- merge_requests
- branches@cmb/smtk
- tags@cmb/smtk
.fedora31: &fedora31
image: "kitware/cmb:ci-smtk-fedora31-20200219"
variables:
GIT_SUBMODULE_STRATEGY: recursive
CMAKE_CONFIGURATION: fedora31_plain
GIT_CLONE_PATH: $CI_BUILDS_DIR/gitlab-kitware-sciviz-ci
.fedora31_vtk: &fedora31_vtk
extends: .fedora31
image: "kitware/cmb:ci-smtk-fedora31-vtk-20200602"
variables:
CMAKE_CONFIGURATION: fedora31_vtk
.fedora31_paraview: &fedora31_paraview
extends: .fedora31_vtk
image: "kitware/cmb:ci-smtk-fedora31-paraview-20200219"
variables:
CMAKE_CONFIGURATION: fedora31_paraview
.fedora31_tidy: &fedora31_tidy
extends: .fedora31_paraview
variables:
CMAKE_CONFIGURATION: fedora31_tidy
CTEST_NO_WARNINGS_ALLOWED: 1
.fedora31_vtk_python2: &fedora31_vtk_python2
extends: .fedora31
image: "kitware/cmb:ci-smtk-fedora31-vtk-python2-20200602"
variables:
CMAKE_CONFIGURATION: fedora31_vtk_python2
.fedora31_memcheck: &fedora31_memcheck
extends: .fedora31_paraview
variables:
CMAKE_BUILD_TYPE: RelWithDebInfo
.fedora31_asan: &fedora31_asan
extends: .fedora31_memcheck
variables:
CMAKE_CONFIGURATION: fedora31_asan
CTEST_MEMORYCHECK_TYPE: AddressSanitizer
# Disable LeakSanitizer for now. It's catching all kinds of errors that
# need investigated or suppressed.
CTEST_MEMORYCHECK_SANITIZER_OPTIONS: detect_leaks=0
.fedora31_ubsan: &fedora31_ubsan
extends: .fedora31_memcheck
variables:
CMAKE_CONFIGURATION: fedora31_ubsan
CTEST_MEMORYCHECK_TYPE: UndefinedBehaviorSanitizer
.fedora31_coverage: &fedora31_coverage
extends: .fedora31_paraview
variables:
CMAKE_BUILD_TYPE: Debug
CMAKE_CONFIGURATION: fedora31_coverage
CTEST_COVERAGE: 1
CMAKE_GENERATOR: Unix Makefiles
.fedora31_nodata: &fedora31_nodata
extends: .fedora31_paraview
variables:
CMAKE_CONFIGURATION: fedora31_nodata
GIT_STRATEGY: clone
GIT_LFS_SKIP_SMUDGE: 1
before_script:
- .gitlab/ci/cmake.sh
- .gitlab/ci/ninja.sh
- export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
- cmake --version
- ninja --version
.cmake_build_unix: &cmake_build_unix
stage: build
only: *only_settings
tags:
- build
- cmb
- docker
- linux
script:
- .gitlab/ci/sccache.sh
- sccache --start-server
- sccache --show-stats
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
- sccache --show-stats
include:
# Metadata shared my many jobs
- local: .gitlab/rules.yml
- local: .gitlab/artifacts.yml
artifacts:
expire_in: 1d
paths:
# The artifacts of the build.
- build/bin/
- build/include/
- build/lib/
- build/smtkConfig.cmake
- build/smtkConfigVersion.cmake
# Generated headers.
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/smtk/*.h
- build/smtk/*/*.h
- build/smtk/*/*/*.h
- build/smtk/*/*/*/*.h
- build/smtk/*/*/*/*/*.h
- build/smtk/*/*/*/*/*/*.h
# CTest files.
- build/PluginTests/
- build/smtk/extension/paraview/*/testing/python/*.py
- build/CTestCustom*.cmake
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/CTestTestfile.cmake
- build/*/CTestTestfile.cmake
- build/*/*/CTestTestfile.cmake
- build/*/*/*/CTestTestfile.cmake
- build/*/*/*/*/CTestTestfile.cmake
- build/*/*/*/*/*/CTestTestfile.cmake
- build/*/*/*/*/*/*/CTestTestfile.cmake
- build/Testing/
# CTest coverage files.
- build/CMakeFiles/TargetDirectories.txt
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/*/*/*/*.gcno
- build/*/*/*/*/*.gcno
- build/*/*/*/*/*/*.gcno
- build/*/*/*/*/*/*/*.gcno
- build/*/*/*/*/*/*/*/*.gcno
- build/*/*/*/*/*/*/*/*/*.gcno
- build/smtk/*/*/*.cxx
- build/smtk/*/*/*/*.cxx
- build/smtk/*/*/*/*/*.cxx
- build/smtk/*/*/*/*/*/*.cpp
- build/smtk/*/*/*/*/*/*.cxx
- build/smtk/*/*/*/*/*/*/*.cpp
- build/smtk/*/*/*/*/*/*/*.h
- build/smtk/extension/*/CMakeFiles/*.cxx
# CDash files.
- build/DartConfiguration.tcl
interruptible: true
.cmake_test_unix: &cmake_test_unix
stage: test
only: *only_settings
tags:
- build
- cmb
- docker
- linux
script:
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_test.cmake"
interruptible: true
.cmake_test_unix_x11: &cmake_test_unix_x11
<<: *cmake_test_unix
tags:
- cmb
- docker
- linux
- x11
.cmake_memcheck_unix: &cmake_memcheck_unix
stage: test
only: *only_settings
tags:
- build
- cmb
- docker
- linux
script:
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_memcheck.cmake"
interruptible: true
.cmake_memcheck_unix_x11: &cmake_memcheck_unix_x11
<<: *cmake_memcheck_unix
tags:
- cmb
- docker
- linux
- x11
.cmake_memcheck_unix_x11_priv: &cmake_memcheck_unix_x11_priv
<<: *cmake_memcheck_unix
tags:
- cmb
- docker
- linux
- privileged
- x11
.cmake_coverage: &cmake_coverage
stage: analyze
only: *only_settings
tags:
- build
- cmb
- docker
- linux
script:
- "$LAUNCHER ctest -V -S .gitlab/ci/ctest_coverage.cmake"
coverage: '/Percentage Coverage: \d+.\d+%/'
interruptible: true
# OS builds.
- local: .gitlab/os-linux.yml
stages:
- build
- test
- analyze
################################################################################
# Job declarations
#
# Each job must pull in each of the following keys:
#
# - a "base image"
# - a build script
# - tags for the jobs
# - rules for when to run the job
#
# Additionally, jobs may also contain:
#
# - artifacts
# - dependency/needs jobs for required jobs
################################################################################
# Linux
## Build and test
build:fedora31:
<<:
- *fedora31
- *cmake_build_unix
extends:
- .fedora31
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:fedora31:
<<:
- *fedora31
- *cmake_test_unix_x11
extends:
- .fedora31
- .cmake_test_linux
- .linux_test_tags
- .run_automatically
dependencies:
- build:fedora31
needs:
- build:fedora31
build:fedora31-vtk:
<<:
- *fedora31_vtk
- *cmake_build_unix
extends:
- .fedora31_vtk
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:fedora31-vtk:
<<:
- *fedora31_vtk
- *cmake_test_unix_x11
extends:
- .fedora31_vtk
- .cmake_test_linux
- .linux_test_tags
- .run_automatically
dependencies:
- build:fedora31-vtk
needs:
- build:fedora31-vtk
build:fedora31-paraview:
<<:
- *fedora31_paraview
- *cmake_build_unix
extends:
- .fedora31_paraview
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:fedora31-paraview:
<<:
- *fedora31_paraview
- *cmake_test_unix_x11
extends:
- .fedora31_paraview
- .cmake_test_linux
- .linux_test_tags
- .run_automatically
dependencies:
- build:fedora31-paraview
needs:
- build:fedora31-paraview
build:fedora31-nodata:
<<:
- *fedora31_nodata
- *cmake_build_unix
extends:
- .fedora31_nodata
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:fedora31-nodata:
<<:
- *fedora31_nodata
- *cmake_test_unix_x11
extends:
- .fedora31_nodata
- .cmake_test_linux
- .linux_test_tags
- .run_automatically
dependencies:
- build:fedora31-nodata
needs:
- build:fedora31-nodata
build:fedora31-vtk-python2:
<<:
- *fedora31_vtk_python2
- *cmake_build_unix
extends:
- .fedora31_vtk_python2
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:fedora31-vtk-python2:
<<:
- *fedora31_vtk_python2
- *cmake_test_unix_x11
extends:
- .fedora31_vtk_python2
- .cmake_test_linux
- .linux_test_tags
- .run_automatically
dependencies:
- build:fedora31-vtk-python2
needs:
- build:fedora31-vtk-python2
## Lint builds
build:fedora31-asan:
<<:
- *fedora31_asan
- *cmake_build_unix
extends:
- .fedora31_asan
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:fedora31-asan:
<<:
- *fedora31_asan
- *cmake_memcheck_unix_x11_priv
extends:
- .fedora31_asan
- .cmake_memcheck_linux
- .linux_test_priv_tags
- .run_automatically
dependencies:
- build:fedora31-asan
needs:
- build:fedora31-asan
build:fedora31-ubsan:
<<:
- *fedora31_ubsan
- *cmake_build_unix
extends:
- .fedora31_ubsan
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:fedora31-ubsan:
<<:
- *fedora31_ubsan
- *cmake_memcheck_unix_x11
extends:
- .fedora31_ubsan
- .cmake_memcheck_linux
- .linux_test_priv_tags
- .run_automatically
dependencies:
- build:fedora31-ubsan
needs:
- build:fedora31-ubsan
build:fedora31-tidy:
<<:
- *fedora31_tidy
stage: build
only: *only_settings
tags:
- build
- cmb
- docker
- linux
script:
- dnf install -y --setopt=install_weak_deps=False clang-tools-extra
- .gitlab/ci/sccache.sh
- sccache --start-server
- sccache --show-stats
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
- sccache --show-stats
interruptible: true
extends:
- .fedora31_tidy
- .cmake_build_linux_tidy
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
build:fedora31-coverage:
<<:
- *fedora31_coverage
- *cmake_build_unix
extends:
- .fedora31_coverage
- .cmake_build_linux
- .cmake_build_artifacts
- .linux_builder_tags
- .run_automatically
test:fedora31-coverage:
<<:
- *fedora31_coverage
- *cmake_test_unix_x11
artifacts:
expire_in: 1d
paths:
# Generated headers.
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/smtk/*.h
- build/smtk/*/*.h
- build/smtk/*/*/*.h
- build/smtk/*/*/*/*.h
- build/smtk/*/*/*/*/*.h
- build/smtk/*/*/*/*/*/*.h
# CTest files.
- build/CTestCustom*.cmake
- build/Testing/
# CTest coverage files.
- build/CMakeFiles/TargetDirectories.txt
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/*/*/*/*.gcno
- build/*/*/*/*/*.gcno
- build/*/*/*/*/*/*.gcno
- build/*/*/*/*/*/*/*.gcno
- build/*/*/*/*/*/*/*/*.gcno
- build/*/*/*/*/*/*/*/*/*.gcno
- build/*/*/*/*.gcda
- build/*/*/*/*/*.gcda
- build/*/*/*/*/*/*.gcda
- build/*/*/*/*/*/*/*.gcda
- build/*/*/*/*/*/*/*/*.gcda
- build/*/*/*/*/*/*/*/*/*.gcda
- build/smtk/*/*/*.cxx
- build/smtk/*/*/*/*.cxx
- build/smtk/*/*/*/*/*.cxx
- build/smtk/*/*/*/*/*/*.cpp
- build/smtk/*/*/*/*/*/*.cxx
- build/smtk/*/*/*/*/*/*/*.cpp
- build/smtk/*/*/*/*/*/*/*.h
- build/smtk/extension/*/CMakeFiles/*.cxx
# CDash files.
- build/DartConfiguration.tcl
extends:
- .fedora31_coverage
- .cmake_test_linux
- .linux_test_tags
- .cmake_coverage_artifacts
- .run_automatically
dependencies:
- build:fedora31-coverage
needs:
- build:fedora31-coverage
analyze:fedora31-coverage:
<<:
- *fedora31_coverage
- *cmake_coverage
extends:
- .fedora31_coverage
- .cmake_coverage_linux
- .linux_builder_tags
- .run_automatically
dependencies:
- test:fedora31-coverage
needs:
......
# Lists of paths for artifacts of various stages.
.cmake_build_artifacts:
artifacts:
expire_in: 1d
paths:
# The artifacts of the build.
- build/bin/
- build/include/
- build/lib/
- build/smtkConfig.cmake
- build/smtkConfigVersion.cmake
# Generated headers.
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/smtk/*.h
- build/smtk/*/*.h
- build/smtk/*/*/*.h
- build/smtk/*/*/*/*.h
- build/smtk/*/*/*/*/*.h
- build/smtk/*/*/*/*/*/*.h
# CTest files.
- build/PluginTests/
- build/smtk/extension/paraview/*/testing/python/*.py
- build/CTestCustom*.cmake
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/CTestTestfile.cmake
- build/*/CTestTestfile.cmake
- build/*/*/CTestTestfile.cmake
- build/*/*/*/CTestTestfile.cmake
- build/*/*/*/*/CTestTestfile.cmake
- build/*/*/*/*/*/CTestTestfile.cmake
- build/*/*/*/*/*/*/CTestTestfile.cmake
- build/Testing/
# CTest coverage files.
- build/CMakeFiles/TargetDirectories.txt
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/*/*/*/*.gcno
- build/*/*/*/*/*.gcno
- build/*/*/*/*/*/*.gcno
- build/*/*/*/*/*/*/*.gcno
- build/*/*/*/*/*/*/*/*.gcno
- build/*/*/*/*/*/*/*/*/*.gcno
- build/smtk/*/*/*.cxx
- build/smtk/*/*/*/*.cxx
- build/smtk/*/*/*/*/*.cxx
- build/smtk/*/*/*/*/*/*.cpp
- build/smtk/*/*/*/*/*/*.cxx
- build/smtk/*/*/*/*/*/*/*.cpp
- build/smtk/*/*/*/*/*/*/*.h
- build/smtk/extension/*/CMakeFiles/*.cxx
# CDash files.
- build/DartConfiguration.tcl
.cmake_coverage_artifacts:
artifacts:
expire_in: 1d
paths:
# Generated headers.
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
- build/smtk/*.h
- build/smtk/*/*.h