jobs:
- job: Linux
  timeoutInMinutes: 0
  cancelTimeoutInMinutes: 60
  pool:
    vmImage: ubuntu-16.04
  steps:
    - script: |
        set -x

        # Azure checkout submodules options does not currently work
        pushd $(Build.SourcesDirectory)
        git submodule update --init --recursive
        popd

        git clone -b dashboard --single-branch https://github.com/thewtex/ITKExamples.git ITKExamples-dashboard

        sudo apt-get -yy install ninja-build

        c++ --version
        cmake --version

        ctest -S ITKExamples-dashboard/azure_dashboard.cmake -VV -j 4
      displayName: Build and Test
      workingDirectory: $(Agent.BuildDirectory)

jobs:
- job: Linux
  timeoutInMinutes: 0
  cancelTimeoutInMinutes: 60
  pool:
    vmImage: ubuntu-16.04
  steps:
    - script: |
        set -x

        # Azure checkout submodules options does not currently work
        pushd $(Build.SourcesDirectory)
        git submodule update --init --recursive
        popd

        git clone -b dashboard --single-branch https://github.com/thewtex/ITKExamples.git ITKExamples-dashboard

        sudo pip3 install ninja

        c++ --version
        cmake --version

        ctest -S ITKExamples-dashboard/azure_dashboard.cmake -VV -j 4
      displayName: Build and Test
      workingDirectory: $(Agent.BuildDirectory)

Install ninja on Azure with pip3
BUG: Install ninja on Azure with pip3

Avoid:

  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
  E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
