##=============================================================================
##
##  Copyright (c) Kitware, Inc.
##  All rights reserved.
##  See LICENSE.txt for details.
##
##  This software is distributed WITHOUT ANY WARRANTY; without even
##  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
##  PURPOSE.  See the above copyright notice for more information.
##
##=============================================================================

# Build on centos8 with serial and test on centos8
# Uses gcc 8.2.1
build:centos8_sanitizer:
  tags:
    - build
    - vtkm
    - docker
    - linux-x86_64
  extends:
    - .centos8
    - .cmake_build_linux
    - .run_automatically
  variables:
    CMAKE_BUILD_TYPE: RelWithDebInfo
    CMAKE_GENERATOR: "Unix Makefiles"
    VTKM_SETTINGS: "serial+shared+openmp+asan+leak"

test:centos8_sanitizer:
  tags:
    - test
    - vtkm
    - docker
    - linux-x86_64
    - privileged
  extends:
    - .centos8
    - .cmake_memcheck_linux
    - .run_automatically
  variables:
    OMP_NUM_THREADS: 4
    CTEST_MEMORYCHECK_TYPE: LeakSanitizer
    CTEST_EXCLUSIONS: >-
      smoke_test_cmake_built_against_test_install
      smoke_test_make_built_against_test_install
      smoke_test_pkgconfig_make_built_against_test_install
  dependencies:
    - build:centos8_sanitizer
  needs:
    - build:centos8_sanitizer


# Build on centos8 without tests
# Uses gcc 8.2.1
build:centos8:
  tags:
    - build
    - vtkm
    - docker
    - linux-x86_64
  extends:
    - .centos8
    - .cmake_build_linux
    - .run_automatically
  variables:
    CMAKE_BUILD_TYPE: RelWithDebInfo
    CMAKE_GENERATOR: "Unix Makefiles"
    VTKM_SETTINGS: "serial+no_testing+min_build"
