.gitlab-ci.yml 3.15 KB
Newer Older
James Sutherland's avatar
James Sutherland committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
#----------------------------------------------------------
# to help get the yaml right, see:
#  https://software.crsim.utah.edu:8443/ci/lint
#  http://yaml-online-parser.appspot.com/
#----------------------------------------------------------

#----------------------------------------------------------
# Prerequisites & assumptions:
#  - CMake and CTest are installed on all of the runners
#  - modern C++ compilers are available
#  - boost (and possibly cuda) installations are present
#  - doxygen is installed
#----------------------------------------------------------

# define a few "stages" for the build.  Things within a stage can happen concurrently, but we synchronize between stages.
stages:
  - build_test
  - docs
  
#-----------------------------------------------------------
#------------------------- BUILD & TEST --------------------
# define some CMAKE flags that will help reduce duplication below
.conf-opt    : &conf_opt        cmake .. -DTabProps_UTILS=ON -DTabProps_PREPROCESSOR=ON -DTabProps_ENABLE_TESTING=ON -DCMAKE_BUILD_TYPE=Release
.conf-dbg    : &conf_dbg        cmake .. -DTabProps_UTILS=ON -DTabProps_PREPROCESSOR=ON -DTabProps_ENABLE_TESTING=ON -DCMAKE_BUILD_TYPE=Debug  
.conf-gpu-opt: &conf_gpu_opt    cmake .. -DTabProps_UTILS=ON -DTabProps_PREPROCESSOR=ON -DTabProps_ENABLE_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=ON
.conf-gpu-dbg: &conf_gpu_dbg    cmake .. -DTabProps_UTILS=ON -DTabProps_PREPROCESSOR=ON -DTabProps_ENABLE_TESTING=ON -DCMAKE_BUILD_TYPE=Debug   -DENABLE_CUDA=ON
.build_cmd   : &build_cmd make -j8
.test_cmd    : &test_cmd ctest -j4

.build:linux: &build_linux
  stage: build_test
  tags:
    - linux
  artifacts:
    name     : "BuildResults_$CI_BUILD_REF_NAME$"
    when     : on_failure
    expire_in: 10 days
    paths    :
    - build/Testing
    
.build:mac: &build_mac
  <<: *build_linux
  tags:
    - mac

# define all of the unique builds that we will run
build:linux:opt:
  <<: *build_linux
  script: 
    - mkdir build; cd build; 
    - *conf_opt
    - *build_cmd
    - *test_cmd
    
build:linux:dbg:
  <<: *build_linux
  script: 
    - mkdir build; cd build
    - *conf_dbg
    - *build_cmd
    - *test_cmd

build:linux:gpu:opt:
  <<: *build_linux
  tags:
    - gpu
  script:
    - mkdir build; cd build
    - *conf_gpu_opt
    - *build_cmd
    - *test_cmd

build:linux:gpu:dbg:
  <<: *build_linux
  tags:
    - gpu
  script:
    - mkdir build; cd build
    - *conf_gpu_dbg
    - *build_cmd
    - *test_cmd

build:mac:opt:
  <<: *build_mac
  script: 
    - mkdir build; cd build; 
    - *conf_opt
    - *build_cmd
    - *test_cmd
    
build:mac:dbg:
  <<: *build_mac
  script: 
    - mkdir build; cd build
    - *conf_dbg
    - *build_cmd
    - *test_cmd
#------------------------- BUILD & TEST --------------------
#-----------------------------------------------------------


#-----------------------------------------------------------
#------------------------- DOXYGEN -------------------------
docs:
  stage     : docs
  script    : doxygen Doxyfile
  artifacts :
    expire_in: 10 days
    paths:
      - doc/html
#------------------------- DOXYGEN -------------------------
#-----------------------------------------------------------