azure-pipelines.yml 1.86 KB
# 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

variables:
  cli11.single: ON
  cli11.std: 14
  cli11.build_type: Debug
  cli11.options:
  CMAKE_BUILD_PARALLEL_LEVEL: 4

jobs:

- job: ClangFormatTidy
  variables:
    CXX_FLAGS: "-Werror -Wcast-align -Wfloat-equal -Wimplicit-atomic-properties -Wmissing-declarations -Woverlength-strings -Wshadow -Wstrict-selector-match -Wundeclared-selector -Wunreachable-code -std=c++11"
    cli11.options: -DCLANG_TIDY_FIX=ON
    cli11.std: 11
    cli11.single: OFF
    CMAKE_BUILD_PARALLEL_LEVEL: 1
  pool:
    vmImage: 'ubuntu-16.04'
  container: silkeh/clang:5
  steps:
    - script: scripts/check_style.sh
      displayName: Check format
    - template: .ci/azure-cmake.yml
    - template: .ci/azure-build.yml
    - script: git diff --exit-code --color
      displayName: Check tidy

- job: Native
  strategy:
    matrix:
      Linux:
        vmImage: 'ubuntu-latest'
      macOS:
        vmImage: 'macOS-latest'
      Windows:
        vmImage: 'vs2017-win2016'
  pool:
    vmImage: $(vmImage)
  steps:
    - template: .ci/azure-build.yml
    - template: .ci/azure-test.yml

- job: Docker
  variables:
    cli11.single: OFF
  pool:
    vmImage: 'ubuntu-latest'
  strategy:
    matrix:
      gcc9:
        containerImage: gcc:9
        cli11.std: 17
      gcc4.7:
        containerImage: gcc:4.7
        cli11.std: 11
      clang3.4:
        containerImage: silkeh/clang:3.4
        cli11.std: 11
      clang8:
        containerImage: silkeh/clang:8
        cli11.std: 14
        cli11.options: -DCLI11_FORCE_LIBCXX=ON
  container: $[ variables['containerImage'] ]
  steps:
    - template: .ci/azure-cmake.yml
    - template: .ci/azure-build.yml
    - template: .ci/azure-test.yml