mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-29 04:03:52 +00:00
* Add cpplint config file * Add cpplint to CI * Add checks * Add docker container tag * Unindent container As suggested in code review Co-Authored-By: Henry Schreiner <HenrySchreinerIII@gmail.com> * Fix cpplint issues * Fix clang-format * Include and fix modern cpplint runtime/int * Include and fix cpplint build/include_order * Revert "Include and fix cpplint build/include_order" This reverts commit bddb6a2d6744c5397f387ccd03416a1ec5e29862. * Update explanation, sort alphabetically * Implement suggestion from code review Co-Authored-By: Henry Schreiner <HenrySchreinerIII@gmail.com> * Include cstdint header, prefix its symbols with std:: * Forgot std:: Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
108 lines
2.8 KiB
YAML
108 lines
2.8 KiB
YAML
# 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: -DCLI11_EXAMPLES_JSON=ON
|
|
CMAKE_BUILD_PARALLEL_LEVEL: 4
|
|
|
|
jobs:
|
|
|
|
- job: ClangTidy
|
|
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: -DCLI11_CLANG_TIDY=ON -DCLI11_CLANG_TIDY_OPTIONS="-fix"
|
|
cli11.std: 11
|
|
cli11.single: OFF
|
|
CMAKE_BUILD_PARALLEL_LEVEL: 1
|
|
pool:
|
|
vmImage: 'ubuntu-latest'
|
|
container: silkeh/clang:8
|
|
steps:
|
|
- template: .ci/azure-cmake.yml
|
|
- template: .ci/azure-build.yml
|
|
- script: git diff --exit-code --color
|
|
displayName: Check tidy
|
|
|
|
- job: CppLint
|
|
pool:
|
|
vmImage: 'ubuntu-latest'
|
|
container: sharaku/cpplint:latest
|
|
steps:
|
|
- bash: cpplint --counting=detailed --recursive examples include/CLI
|
|
displayName: Checking against google style guide
|
|
|
|
# TODO: Fix macOS error and windows warning in c++17 mode
|
|
- job: Native
|
|
strategy:
|
|
matrix:
|
|
Linux14:
|
|
vmImage: 'ubuntu-latest'
|
|
macOS17:
|
|
vmImage: 'macOS-latest'
|
|
cli11.std: 17
|
|
macOS11:
|
|
vmImage: 'macOS-latest'
|
|
cli11.std: 11
|
|
Windows17:
|
|
vmImage: 'vs2017-win2016'
|
|
cli11.std: 17
|
|
Windows11:
|
|
vmImage: 'vs2017-win2016'
|
|
cli11.std: 11
|
|
pool:
|
|
vmImage: $(vmImage)
|
|
steps:
|
|
- template: .ci/azure-build.yml
|
|
- template: .ci/azure-test.yml
|
|
|
|
- job: Meson
|
|
pool:
|
|
vmImage: 'ubuntu-latest'
|
|
steps:
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '3.6'
|
|
- script: python3 -m pip install meson ninja
|
|
- script: meson build
|
|
displayName: Run meson to generate build
|
|
workingDirectory: tests/mesonTest
|
|
- script: ninja -C tests/mesonTest/build
|
|
displayName: Build with Ninja
|
|
- script: ./tests/mesonTest/build/main --help
|
|
displayName: Run help
|
|
|
|
- job: Docker
|
|
variables:
|
|
cli11.single: OFF
|
|
pool:
|
|
vmImage: 'ubuntu-latest'
|
|
strategy:
|
|
matrix:
|
|
gcc9:
|
|
containerImage: gcc:9
|
|
cli11.std: 17
|
|
gcc4.8:
|
|
containerImage: gcc:4.8
|
|
cli11.std: 11
|
|
cli11.options:
|
|
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
|