Skip to content
Snippets Groups Projects
Commit a1bee2aa authored by Emmanuel Labourasse's avatar Emmanuel Labourasse
Browse files

Merge branch 'develop' into feature/Navier-Stokes

parents 63275a89 91d53e3c
No related branches found
No related tags found
No related merge requests found
Showing
with 620 additions and 408 deletions
......@@ -78,6 +78,8 @@ if (EMACS)
DEPENDS
"${PUGS_SOURCE_DIR}/doc/userdoc.org"
"${PUGS_SOURCE_DIR}/doc/lisp/userdoc-pdf.el"
"${PUGS_SOURCE_DIR}/tools/pgs-pygments.sh"
"${PUGS_SOURCE_DIR}/tools/pgs-pygments.py"
pugs
pugsdoc-dir
pugsdoc-download-elpa
......
......@@ -43,8 +43,7 @@
(custom-set-variables
'(org-export-html-postamble nil)
;; By now pugs is not known by Pygments raw text is better
'(org-latex-minted-langs '((pugs "Text") (pugs-error "Text")))
'(org-latex-minted-langs '((pugs "Pugs") (pugs-error "Pugs")))
'(org-confirm-babel-evaluate nil)
'(org-html-validation-link nil)
'(org-src-fontify-natively t)
......
This diff is collapsed.
version: 2.1.2.{build}
version: 2.2.0.{build}
branches:
only:
......@@ -19,7 +19,9 @@ install:
build_script:
- mkdir build
- cd build
- ps: cmake .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_GENERATOR="Visual Studio 14 2015"
- ps:
cmake .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE_TESTS=ON
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_GENERATOR="Visual Studio 14 2015"
- ps: cmake --build .
- cd ..
- conan create . CLIUtils/CLI11
......
steps:
# Needed on GCC 4.8 docker image for some reason
- script: mkdir build
displayName: "Make build directory"
- task: CMake@1
inputs:
cmakeArgs: .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE=$(cli11.single) -DCMAKE_CXX_STANDARD=$(cli11.std) -DCLI11_SINGLE_FILE_TESTS=$(cli11.single) -DCMAKE_BUILD_TYPE=$(cli11.build_type) $(cli11.options)
displayName: 'Configure'
cmakeArgs:
.. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE=$(cli11.single)
-DCMAKE_CXX_STANDARD=$(cli11.std)
-DCLI11_SINGLE_FILE_TESTS=$(cli11.single)
-DCMAKE_BUILD_TYPE=$(cli11.build_type) $(cli11.options)
displayName: "Configure"
- script: cmake --build . -- -j2 --keep-going
displayName: "Build Unix"
workingDirectory: build
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: cmake --build .
displayName: 'Build'
displayName: "Build Windows"
workingDirectory: build
condition: eq( variables['Agent.OS'], 'Windows_NT' )
steps:
# Note that silkeh/clang does not include ca-certificates, so check the shasum for verification
- bash: |
wget --no-check-certificate "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz"
......@@ -8,9 +7,11 @@ steps:
- task: ExtractFiles@1
inputs:
archiveFilePatterns: 'cmake*.tar.gz'
destinationFolder: 'cmake_program'
archiveFilePatterns: "cmake*.tar.gz"
destinationFolder: "cmake_program"
displayName: Extract CMake
- bash: echo "##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
- bash:
echo
"##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
displayName: Add CMake to PATH
steps:
- script: ctest --output-on-failure -C $(cli11.build_type) -T test
displayName: 'Test'
displayName: "Test"
workingDirectory: build
- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test.xml'
testResultsFormat: "cTest"
testResultsFiles: "**/Test.xml"
#!/bin/env sh
# (Source me)
set -evx
#DOXYGEN_URL="http://doxygen.nl/files/doxygen-1.8.17.src.tar.gz"
DOXYGEN_URL="https://github.com/doxygen/doxygen/archive/Release_1_8_15.tar.gz"
cd "${DEPS_DIR}"
if [[ ! -f "${DEPS_DIR}/doxygen/build/bin/doxygen" ]] ; then
echo "Downloading Doxygen"
mkdir -p doxygen
travis_retry wget --no-check-certificate --quiet -O - "${DOXYGEN_URL}" | tar --strip-components=1 -xz -C doxygen
cd doxygen
mkdir -p build
cd build
cmake ..
make -j2
fi
export PATH="${DEPS_DIR}/doxygen/build/bin:${PATH}"
cd "${TRAVIS_BUILD_DIR}"
set +evx
#!/bin/env sh
# (Source me)
set -evx
LCOV_URL="http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz"
cd "${DEPS_DIR}"
if [[ ! -f "${DEPS_DIR}/lcov/bin/lcov" ]] ; then
echo "Downloading lcov"
mkdir -p lcov
travis_retry wget --no-check-certificate --quiet -O - "${LCOV_URL}" | tar --strip-components=1 -xz -C lcov
fi
export PATH="${DEPS_DIR}/lcov/bin:${PATH}"
cd "${TRAVIS_BUILD_DIR}"
set +evx
#!/usr/bin/env bash
echo -en "travis_fold:start:script.build\\r"
echo "Building..."
STD="$1"
shift
set -evx
mkdir -p build
cd build
cmake .. -DCLI11_WARNINGS_AS_ERRORS=ON -DCLI11_SINGLE_FILE=ON -DCMAKE_CXX_STANDARD="$STD" -DCLI11_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=ccache $@
cmake --build . -- -j2
set +evx
echo -en "travis_fold:end:script.build\\r"
echo -en "travis_fold:start:script.test\\r"
echo "Testing..."
set -evx
ctest --output-on-failure
set +evx
echo -en "travis_fold:end:script.test\\r"
#!/usr/bin/env bash
echo -en "travis_fold:start:script.build\\r"
echo "Building..."
set -evx
cd "${TRAVIS_BUILD_DIR}"
mkdir -p build
cd build
cmake .. -DCLI11_SINGLE_FILE_TESTS=OFF -DCLI11_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Coverage
cmake --build . -- -j2
cmake --build . --target CLI11_coverage
set +evx
echo -en "travis_fold:end:script.build\\r"
echo -en "travis_fold:start:script.lcov\\r"
echo "Capturing and uploading LCov..."
set -evx
lcov --directory . --capture --output-file coverage.info # capture coverage info
lcov --remove coverage.info '*/tests/*' '*/examples/*' '*gtest*' '*gmock*' '/usr/*' --output-file coverage.info # filter out system
lcov --list coverage.info #debug info
# Uploading report to CodeCov
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
set +evx
echo -en "travis_fold:end:script.lcov\\r"
# Checks that will be implemented in future PRs:
# performance-unnecessary-value-param, hints to ~110 issues. Be careful with implementing the suggested changes of this one, as auto-fixes may break the code
# bugprone-forwarding-reference-overload probably should be enabled and fixed.
# clang-diagnostic-float-equal can be fixed by using _a from Catch::literals
# bugprone-exception-escape due to main being a bit simple in examples
# modernize-avoid-c-arrays trips up in TEMPLATE_TEST_CASE catch macro
# modernize-return-braced-init-list triggers on lambdas ?
# modernize-make-unique requires C++14
# readability-avoid-const-params-in-decls Affected by the pre-compile split
FormatStyle: file
Checks: '
-*,
Checks: |
*bugprone*,
-bugprone-easily-swappable-parameters,
-bugprone-forwarding-reference-overload,
-bugprone-exception-escape,
clang-analyzer-optin.cplusplus.VirtualCall,
clang-analyzer-optin.performance.Padding,
-clang-diagnostic-float-equal,
cppcoreguidelines-init-variables,
cppcoreguidelines-prefer-member-initializer,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-slicing,
google-*,
-google-runtime-references,
llvm-include-order,
llvm-namespace-comment,
misc-definitions-in-headers,
misc-misplaced-const,
misc-non-copyable-objects,
misc-static-assert,
misc-throw-by-value-catch-by-reference,
misc-throw-by-value-catch-by-reference,
misc-uniqueptr-reset-release,
misc-unused-parameters,
modernize*,
-modernize-use-trailing-return-type,
-modernize-concat-nested-namespaces,
-modernize-return-braced-init-list,
-modernize-make-unique,
*performance*,
-performance-unnecessary-value-param,
-performance-inefficient-string-concatenation,
readability-const-return-type,
readability-container-size-empty,
'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*hpp'
readability-delete-null-pointer,
readability-else-after-return,
readability-implicit-bool-conversion,
readability-inconsistent-declaration-parameter-name,
readability-make-member-function-const,
readability-misplaced-array-index,
readability-non-const-parameter,
readability-qualified-auto,
readability-redundant-function-ptr-dereference,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
readability-simplify-subscript-expr,
readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-suspicious-call-argument,
readability-uniqueptr-delete-release,
CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '3'
value: "3"
- key: performance-for-range-copy.WarnOnAllAutoCopies
value: true
- key: performance-inefficient-string-concatenation.StrictMode
value: true
- key: performance-unnecessary-value-param.AllowedTypes
value: "exception_ptr$;"
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: true
- key: modernize-use-nodiscard.ReplacementString
value: "CLI11_NODISCARD"
HeaderFilterRegex: "CLI.*hpp"
FormatStyle: file
# WarningsAsErrors: "*"
ignore:
- "tests"
- "examples"
......@@ -2,10 +2,12 @@ root = true
[*]
indent_style = space
indent_size = 4
insert_final_newline = true
end_of_line = lf
trim_trailing_whitespace = true
[*.cpp,*.hpp,*.py]
indent_size = 4
[*.yml]
indent_size = 2
# Contributing
Thanks for considering to write a Pull Request (PR) for CLI11! Here are a few guidelines to get you started:
Thanks for considering to write a Pull Request (PR) for CLI11! Here are a few
guidelines to get you started:
Make sure you are comfortable with the license; all contributions are licensed under the original license.
Make sure you are comfortable with the license; all contributions are licensed
under the original license.
## Adding functionality
Make sure any new functions you add are are:
* Documented by `///` documentation for Doxygen
* Mentioned in the instructions in the README, though brief mentions are okay
* Explained in your PR (or previously explained in an Issue mentioned in the PR)
* Completely covered by tests
- Documented by `///` documentation for Doxygen
- Mentioned in the instructions in the README, though brief mentions are okay
- Explained in your PR (or previously explained in an Issue mentioned in the PR)
- Completely covered by tests
In general, make sure the addition is well thought out and does not increase the complexity of CLI11 needlessly.
In general, make sure the addition is well thought out and does not increase the
complexity of CLI11 needlessly.
## Things you should know
* Once you make the PR, tests will run to make sure your code works on all supported platforms
* The test coverage is also measured, and that should remain 100%
* Formatting should be done with pre-commit, otherwise the format check will not pass. However, it is trivial to apply this to your PR, so don't worry about this check. If you do want to run it, see below.
* Everything must pass clang-tidy as well, run with `-DCLI11_CLANG_TIDY=ON` (if you set `-DCLI11_CLANG_TIDY_OPTIONS="-fix"`, make sure you use a single threaded build process, or just build one example target).
* Your changes must also conform to most of the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) rules checked by [cpplint](https://github.com/cpplint/cpplint). For unused cpplint filters and justifications, see [CPPLINT.cfg](/CPPLINT.cfg).
- Once you make the PR, tests will run to make sure your code works on all
supported platforms
- The test coverage is also measured, and that should remain 100%
- Formatting should be done with pre-commit, otherwise the format check will not
pass. However, it is trivial to apply this to your PR, so don't worry about
this check. If you do want to run it, see below.
- Everything must pass clang-tidy as well, run with
`-DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy)"` (if you set
`"$(which clang-tidy) -fix"`, make sure you use a single threaded build
process, or just build one example target).
- Your changes must also conform to most of the
[Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html)
rules checked by [cpplint](https://github.com/cpplint/cpplint). For unused
cpplint filters and justifications, see [CPPLINT.cfg](/CPPLINT.cfg).
## Pre-commit
Format is handled by pre-commit. You should install it (or use [pipx](https://pypa.github.io/pipx/)):
Format is handled by pre-commit. You should install it (or use
[pipx](https://pypa.github.io/pipx/)):
```bash
python3 -m pip install pre-commit
```
Then, you can run it on the items you've added to your staging area, or all files:
Then, you can run it on the items you've added to your staging area, or all
files:
```bash
pre-commit run
......@@ -39,7 +53,8 @@ pre-commit run
pre-commit run --all-files
```
And, if you want to always use it, you can install it as a git hook (hence the name, pre-commit):
And, if you want to always use it, you can install it as a git hook (hence the
name, pre-commit):
```bash
pre-commit install
......@@ -47,7 +62,8 @@ pre-commit install
## For developers releasing to Conan.io
This is now done by the CI system on tagged releases. Previously, the steps to make a Conan.io release were:
This is now done by the CI system on tagged releases. Previously, the steps to
make a Conan.io release were:
```bash
conan remove '*' # optional, I like to be clean
......@@ -59,7 +75,10 @@ Here I've assumed that the remote is `cli11`.
## For maintainers: remember to add contributions
In a commit to a PR, just add "`@all-contributors please add <username> for <contributions>`" or similar (see <https://allcontributors.org>). Use `code` for code, `bug` if an issue was submitted, `platform` for packaging stuff, and `doc` for documentation updates.
In a commit to a PR, just add
"`@all-contributors please add <username> for <contributions>`" or similar (see
<https://allcontributors.org>). Use `code` for code, `bug` if an issue was
submitted, `platform` for packaging stuff, and `doc` for documentation updates.
To run locally, do:
......@@ -70,14 +89,15 @@ yarn all-contributors add username code,bug
## For maintainers: Making a release
Remember to replace the emoji in the readme, being careful not to replace the ones in all-contributors if any overlap.
Remember to replace the emoji in the readme, being careful not to replace the
ones in all-contributors if any overlap.
Steps:
* Update changelog if needed
* Update the version in `.appveyor.yml` and `include/CLI/Version.hpp`.
* Find and replace in README (new minor/major release only):
* Replace " 🆕" and "🆕 " with "" (ignores the description line)
* Check for `\/\/$` (vi syntax) to catch leftover `// 🆕`
* Replace "🚧" with "🆕" (manually ignore the description line)
* Make a release in the GitHub UI, use a name such as "Version X.Y(.Z): Title"
- Update changelog if needed
- Update the version in `.appveyor.yml` and `include/CLI/Version.hpp`.
- Find and replace in README (new minor/major release only):
- Replace " 🆕" and "🆕 " with "" (ignores the description line)
- Check for `\/\/$` (vi syntax) to catch leftover `// 🆕`
- Replace "🚧" with "🆕" (manually ignore the description line)
- Make a release in the GitHub UI, use a name such as "Version X.Y(.Z): Title"
name: Quick CMake config
description: 'Runs CMake 3.4+ (if already setup)'
description: "Runs CMake 3.4+ (if already setup)"
inputs:
args:
description: 'Other arguments'
description: "Other arguments"
required: false
default: ''
default: ""
cmake-version:
description: 'The CMake version to run'
description: "The CMake version to run"
required: true
runs:
using: composite
steps:
- name: CMake ${{ inputs.cmake-version }}
uses: jwlawson/actions-setup-cmake@v1.11
uses: jwlawson/actions-setup-cmake@v1.12
with:
cmake-version: "${{ inputs.cmake-version }}"
- run: |
......
codecov:
notify:
after_n_builds: 4
coverage:
status:
project:
informational: true
......@@ -5,12 +5,3 @@ updates:
directory: "/"
schedule:
interval: "daily"
ignore:
# Official actions have moving tags like v1
# that are used, so they don't need updates here
- dependency-name: "actions/checkout"
- dependency-name: "actions/setup-python"
- dependency-name: "actions/cache"
- dependency-name: "actions/upload-artifact"
- dependency-name: "actions/download-artifact"
- dependency-name: "actions/labeler"
needs changelog:
- all: ['!CHANGELOG.md']
- all: ["!CHANGELOG.md"]
needs README:
- all: ['!README.md']
- all: ["!README.md"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment