# C/C++ with GCC
# Build your C/C++ project with GCC using make.
# Add steps that publish test results, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc

trigger:
- master

pool:
  vmImage: 'Ubuntu-16.04'

steps:
  - bash: |
      set -x
      sudo pip3 install ninja
      sudo apt-get update
      sudo apt-get install -y python3.6
    displayName: Install dependencies
  - bash: |
      set -x
      mkdir ITKTubeTK-Release
      curl -L https://data.kitware.com/api/v1/item/5c1aaf188d777f072bdc2d36/download -o ITKTubeTK-Release/ExternalData.zip
      unzip ITKTubeTK-Release/ExternalData.zip
    displayName: Download testing data
    workingDirectory: $(Agent.BuildDirectory)
  - bash: |
      set -x
      git clone https://github.com/InsightSoftwareConsortium/ITK.git ITK
      mkdir ITK-Release
      cd ITK-Release
      cmake -GNinja -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DModule_MinimalPathExtraction=ON -DCMAKE_BUILD_TYPE=Release ../ITK
      cd ..
    displayName: Download and Build ITK
    workingDirectory: $(Agent.BuildDirectory)
  - bash: |
      set -x
      c++ --version
      cmake --version
      cd ITKTubeTK-Release
      cmake -GNinja -DTubeTK_USE_VTK=OFF -DTubeTK_WRAP_PYTHON=OFF -DTubeTK_BUILD_APPS=OFF -DITK_DIR=$(Agent.BuildDirectory)/ITK-Release -DCMAKE_BUILD_TYPE=Release $(Agent.SourcesDirectory)
      ctest -D Experimental -V
      cd ..
    displayName: CMake and CTest
    workingDirectory: $(Agent.BuildDirectory)
Set up CI with Azure Pipelines
Set up CI with Azure Pipelines