stages:
  - build
  - deploy

gcc-c++11:
  stage: build
  script: "CI/ci-linux.sh gcc C++11"
  tags:
    - Linux

clang-c++11:
  stage: build
  script: "CI/ci-linux.sh clang C++11"
  tags:
    - Linux

gcc-c++14:
  stage: build
  script: "CI/ci-linux.sh gcc C++14"
  tags:
    - Linux

clang-c++14:
  stage: build
  script: "CI/ci-linux.sh clang C++14"
  tags: 
    - Linux

macos-c++11:
  stage: build
  script: "CI/ci-mac.sh C++11"
  tags:
    - Apple
  artifacts:
    paths:
      - build-release-cpp11/*.dmg
      - build-release-cpp11/*.tar.gz

macos-c++98:
  stage: build
  script: "CI/ci-mac.sh C++14"
  tags:
    - Apple
  artifacts:
    paths:
      - build-release-cpp14/*.dmg
      - build-release-cpp14/*.tar.gz

cppcheck:
  stage: build
  script: "CI/ci-cppcheck.sh"
  tags:
    - Linux
  artifacts:
    paths:
      - cppcheck.log
      
VS2017-64-bit-shared-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2017"
    ARCHITECTURE:   "x64"
    SHARED:         "TRUE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2017
    - Qt5101
  artifacts:
    paths:
      - build-release/*.exe      
      
VS2017-64-bit-static-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2017"
    ARCHITECTURE:   "x64"
    SHARED:         "FALSE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2017
    - Qt5101    
  artifacts:
    paths:
      - build-release/*.exe

      
VS2017-64-bit-shared-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2017"
    ARCHITECTURE:   "x64"
    SHARED:         "TRUE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2017
  artifacts:
    paths:
      - build-release/*.exe


VS2017-32-bit-shared-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2017"
    ARCHITECTURE:   "x32"
    SHARED:         "TRUE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2017
  artifacts:
    paths:
      - build-release/*.exe
      

VS2017-64-bit-static-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2017"
    ARCHITECTURE:   "x64"
    SHARED:         "FALSE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2017
  artifacts:
    paths:
      - build-release/*.exe


VS2017-32-bit-static-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2017"
    ARCHITECTURE:   "x32"
    SHARED:         "FALSE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2017
  artifacts:
    paths:
      - build-release/*.exe

VS2015-64-bit-shared-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2015"
    ARCHITECTURE:   "x64"
    SHARED:         "TRUE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2015
  artifacts:
    paths:
      - build-release/*.exe
      
      
VS2015-64-bit-shared-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2015"
    ARCHITECTURE:   "x64"
    SHARED:         "TRUE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2015
  artifacts:
    paths:
      - build-release/*.exe

VS2015-32-bit-shared-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2015"
    ARCHITECTURE:   "x32"
    SHARED:         "TRUE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2015
  artifacts:
    paths:
      - build-release/*.exe

VS2015-32-bit-shared-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2015"
    ARCHITECTURE:   "x32"
    SHARED:         "TRUE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2015
  artifacts:
    paths:
      - build-release/*.exe
      
VS2015-64-bit-static-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2015"
    ARCHITECTURE:   "x64"
    SHARED:         "FALSE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2015
  artifacts:
    paths:
      - build-release/*.exe

VS2015-64-bit-static-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2015"
    ARCHITECTURE:   "x64"
    SHARED:         "FALSE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2015
  artifacts:
    paths:
      - build-release/*.exe

VS2015-32-bit-static-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2015"
    ARCHITECTURE:   "x32"
    SHARED:         "FALSE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2015
  artifacts:
    paths:
      - build-release/*.exe

VS2015-32-bit-static-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2015"
    ARCHITECTURE:   "x32"
    SHARED:         "FALSE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2015
  artifacts:
    paths:
      - build-release/*.exe
      
      
      
VS2013-64-bit-shared-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2013"
    ARCHITECTURE:   "x64"
    SHARED:         "TRUE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2013
  artifacts:
    paths:
      - build-release/*.exe

VS2013-64-bit-shared-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2013"
    ARCHITECTURE:   "x64"
    SHARED:         "TRUE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2013
  artifacts:
    paths:
      - build-release/*.exe

VS2013-32-bit-shared-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2013"
    ARCHITECTURE:   "x32"
    SHARED:         "TRUE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2013
  artifacts:
    paths:
      - build-release/*.exe

VS2013-32-bit-shared-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2013"
    ARCHITECTURE:   "x32"
    SHARED:         "TRUE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2013
  artifacts:
    paths:
      - build-release/*.exe
      
VS2013-64-bit-static-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2013"
    ARCHITECTURE:   "x64"
    SHARED:         "FALSE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2013
  artifacts:
    paths:
      - build-release/*.exe

VS2013-64-bit-static-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2013"
    ARCHITECTURE:   "x64"
    SHARED:         "FALSE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2013
  artifacts:
    paths:
      - build-release/*.exe

VS2013-32-bit-static-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2013"
    ARCHITECTURE:   "x32"
    SHARED:         "FALSE"
    APPS:           "ON"
  script: "CI\\Windows.bat"
  tags:
    - VS2013
  artifacts:
    paths:
      - build-release/*.exe

VS2013-32-bit-static-no-apps:
  stage: build
  variables:
    BUILD_PLATFORM: "VS2013"
    ARCHITECTURE:   "x32"
    SHARED:         "FALSE"
    APPS:           "OFF"
  script: "CI\\Windows.bat"
  tags:
    - VS2013
  artifacts:
    paths:
      - build-release/*.exe      
      
Doc-publish:
  stage: deploy
  only:
     - master
  script: "CI/ci-doc.sh"
  tags:
     - Linux

Sources:
  stage: deploy
  only:
     - master
  script: "CI/ci-source.sh"
  tags:
     - Linux
  artifacts:
    paths:
      - OpenMesh*.zip
      - OpenMesh*.tar.bz2
      - OpenMesh*.tar.gz

