From 49ab339a51579fdb9802a73daa98176a8bf49ed1 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 28 Feb 2019 13:12:51 +0100 Subject: [PATCH] Set up CI with Azure Pipelines (#244) * Set up CI with Azure Pipelines * Adding more agents to Azure --- .ci/azure-steps.yml | 18 ++++++++++++++++++ README.md | 7 +++++-- azure-pipelines.yml | 26 ++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 .ci/azure-steps.yml create mode 100644 azure-pipelines.yml diff --git a/.ci/azure-steps.yml b/.ci/azure-steps.yml new file mode 100644 index 00000000..3ac2b35c --- /dev/null +++ b/.ci/azure-steps.yml @@ -0,0 +1,18 @@ +steps: + +- checkout: self + fetchDepth: 50 + submodules: true + +- task: CMake@1 + inputs: + cmakeArgs: .. -DCLI12_SINGLE_FILE=ON -DCLI11_CXX_STD=14 -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug + displayName: 'Configure' + +- script: cmake --build . -j + displayName: 'Build' + workingDirectory: build + +- script: ctest --output-on-failure -C Debug + displayName: 'Test' + workingDirectory: build diff --git a/README.md b/README.md index 565adf65..7b446e38 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Build Status Linux and macOS][travis-badge]][travis] [![Build Status Windows][appveyor-badge]][appveyor] +[![Build Status Azure][azure-badge]][azure-link] [![Code Coverage][codecov-badge]][codecov] [![Codacy Badge][codacy-badge]][codacy-link] [![Join the chat at https://gitter.im/CLI11gitter/Lobby][gitter-badge]][gitter] @@ -49,7 +50,7 @@ CLI11 is a command line parser for C++11 and beyond that provides a rich feature ### Introduction CLI11 provides all the features you expect in a powerful command line parser, with a beautiful, minimal syntax and no dependencies beyond C++11. It is header only, and comes in a single file form for easy inclusion in projects. It is easy to use for small projects, but powerful enough for complex command line projects, and can be customized for frameworks. -It is tested on [Travis][] and [AppVeyor][], and is being included in the [GooFit GPU fitting framework][goofit]. It was inspired by [`plumbum.cli`][plumbum] for Python. CLI11 has a user friendly introduction in this README, a more in-depth tutorial [GitBook][], as well as [API documentation][api-docs] generated by Travis. +It is tested on [Travis][], [AppVeyor][], and [Azure][], and is being included in the [GooFit GPU fitting framework][goofit]. It was inspired by [`plumbum.cli`][plumbum] for Python. CLI11 has a user friendly introduction in this README, a more in-depth tutorial [GitBook][], as well as [API documentation][api-docs] generated by Travis. See the [changelog](./CHANGELOG.md) or [GitHub Releases][] for details for current and past releases. Also see the [Version 1.0 post][], [Version 1.3 post][], or [Version 1.6 post][] for more information. You can be notified when new releases are made by subscribing to on an RSS reader, like Feedly. @@ -62,7 +63,7 @@ An acceptable CLI parser library should be all of the following: - Short, simple syntax: This is one of the main reasons to use a CLI parser, it should make variables from the command line nearly as easy to define as any other variables. If most of your program is hidden in CLI parsing, this is a problem for readability. - C++11 or better: Should work with GCC 4.7+ (such as GCC 4.8 on CentOS 7), Clang 3.5+, AppleClang 7+, NVCC 7.0+, or MSVC 2015+. - Work on Linux, macOS, and Windows. -- Well tested using [Travis][] (Linux and macOS) and [AppVeyor][] (Windows). "Well" is defined as having good coverage measured by [CodeCov][]. +- Well tested using [Travis][] (Linux and macOS) and [AppVeyor][] (Windows) or [Azure][] (all three). "Well" is defined as having good coverage measured by [CodeCov][]. - Clear help printing. - Nice error messages. - Standard shell idioms supported naturally, like grouping flags, a positional separator, etc. @@ -570,6 +571,8 @@ CLI11 was developed at the [University of Cincinnati][] to support of the [GooFi [doi-badge]: https://zenodo.org/badge/80064252.svg [doi-link]: https://zenodo.org/badge/latestdoi/80064252 +[azure-badge]: https://dev.azure.com/CLIUtils/CLI11/_apis/build/status/CLIUtils.CLI11?branchName=master +[azure-link]: https://dev.azure.com/CLIUtils/CLI11/_build/|latest?definitionId=1&branchName=master [travis-badge]: https://img.shields.io/travis/CLIUtils/CLI11/master.svg?label=Linux/macOS [travis]: https://travis-ci.org/CLIUtils/CLI11 [appveyor-badge]: https://img.shields.io/appveyor/ci/HenrySchreiner/cli11/master.svg?label=Windows diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..328bbc3e --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,26 @@ +# 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 + +jobs: +- job: Linux + pool: + vmImage: 'ubuntu-16.04' + steps: + - template: .ci/azure-steps.yml + +- job: macOS + pool: + vmImage: 'macOS-10.13' + steps: + - template: .ci/azure-steps.yml + +- job: Windows + pool: + vmImage: 'vs2017-win2016' + steps: + - template: .ci/azure-steps.yml