Skip to content

Commit

Permalink
arg_router v1.4.0 (#344)
Browse files Browse the repository at this point in the history
* Update vcpkg submodule commit for v1.3.0 recipe

* #312 Reduce code duplication in GHAs

Fix #312

* README.md grammar and spelling improvements

* #318 Skip irelevant GHA jobs

Fix #318

* #321 Add variable list length end token

Fix #321

* Fix clang-format error

* Updating README.md unit test coverage badge

* #302 Switch from a locally generated Conan package, to one hosted on conan-center.io

Fix #302

* Fixed copyrights

* Moved Conan jobs back into merge checker workflow

* Add Conan to README's installation options list

* #314 Add support for multi-value arguments (#326)

* #314 Add support for multi-value arguments

Fix #314

* Fix linting, Win and GCCv9 compilation errors

* Added missing tuple include

* Moved tuple include...

* Multiple clang-tidy fixes

Still can't reproduce the GCCv9 error locally.

* Fix missing MSVC toolset for local builds

Updated timeout time

* Increased timeouts again

Windows tests are hanging, so disabling for now and will create a bug ticket.

* Updating README.md unit test coverage badge

* #327 Fix MSVC builds (#328)

* #327 Fix MSVC builds

Fix #327

* Fixed copyright year.

* Extended MSVC test run timeout

* Fixed MSVC assert failure

* Updating README.md unit test coverage badge

* #325 Create copyright checker git hook (#329)

Fix #325

* #330 Explicitly specify NOMINMAX and WIN32_LEAN_AND_MEAN (#331)

* #330 Explicitly specify NOMINMAX and WIN32_LEAN_AND_MEAN

Fix #330

Also:
* Suppressing deprecation warnings in unit tests on Windows
* Workarounds for invalid C4702 (unreachable code) warnings on MSVC

* Fixed formatting

* #332 Extend pre-commit hook to include clang-format (#333)

Fix #332

* #317 Enable/disable nodes at runtime (#334)

Fix #317

* #315 CMake function to generate translation type headers from simple  text files (#336)

Fix #315

* #338 arg_router_translation_generator isn't detecting changes in the TOML files (#339)

Fix #338

* #335 Use Levenshtein distance to suggest possibly misspelt arguments (#337)

* #335 Use Levenshtein distance to suggest possibly misspelt arguments

Fix #335

* #320 Review parsing code (#340)

Fix #320

* arg_router v1.4.0 (#343)

Bug fixes
* #330, Explicitly specify NOMINMAX and WIN32_LEAN_AND_MEAN

Improvements
* #302, Switch from a locally generated Conan package, to one hosted on conan-center.io
* #314, Add support for multi-value arguments
* #315, CMake function to generate translation type headers from simple text files
* #317, Enable/disable nodes at runtime
* #318, Skip irrelevant GHA jobs
* #321, Add variable list length end token
* #325, Create copyright checker git hook
* #332, Extend pre-commit hook to include clang-format
* #335, Use Levenshtein distance to suggest possibly misspelt arguments

* Fix vcpkg_test_package CMakeLists.txt (#345)

Used incorrect target name.

* Added missing env vars to vcpkg test package GHA (#346)

* vcpkg test package needs C++20 for Windows build (#347)

* Disable Windows vcpkg test package for merge_checker (#348)

v1.3.0 cannot be built in the latest MSVC, so this test is broken until vcpkg is carrying the v1.4.0 package.

* clang_cl example build fix (#350)

* Fix clang_cl support in test package (#352)

Added missing constexpr step limit increase.
  • Loading branch information
cmannett85 authored Aug 8, 2023
1 parent ea82e8c commit b3dab2e
Show file tree
Hide file tree
Showing 163 changed files with 8,988 additions and 2,156 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: false
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 4
PointerAlignment: Left
QualifierAlignment: Left
ReferenceAlignment: Pointer
ReflowComments: true
SortUsingDeclarations: false
SpacesInContainerLiterals: false
Expand Down
44 changes: 44 additions & 0 deletions .github/filters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pr_checker:
- ".github/workflows/pr_checker.yml"
- ".github/workflows/bootstrap_vcpkg/action.yml"

merge_checker:
- ".github/workflows/merge_checker.yml"
- ".github/workflows/bootstrap_vcpkg/action.yml"

docs_pusher:
- ".github/workflows/docs_pusher.yml"
- ".github/workflows/bootstrap_vcpkg/action.yml"

ci: &ci
- "scripts/copyright_checker.py"
- "ci/calculate_test_coverage.sh"
- "ci/create_badge_url.sh"

source: &source
- *ci
- "include/**"
- "CMakeLists.txt"
- "cmake/**"
- "vcpkg.json"
- ".gitmodules"
- ".clang-format"
- ".clang-tidy"

source_tests_and_examples:
- *source
- "test/**"
- "examples/**"
- "ci/package_test_project/**"

docs:
- "cmake/build_types/documentation*"
- "docs/**"
- "README.md"

vcpkg_test_project:
- "ci/vcpkg_test_project/**"

conan_test_project:
- ".github/workflows/conan_setup/action.yml"
- "ci/conan_test_project/**"
53 changes: 53 additions & 0 deletions .github/workflows/bootstrap_vcpkg/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Bootstrap vcpkg and Configure NuGet
description: Bootsraps vcpkg with disabled metrics, and configures NuGet as a bianry cache

inputs:
token:
description: "GitHub password token"
required: true

runs:
using: "composite"
steps:
- name: Configure env vars
shell: bash
run: |
echo "NUGET_SOURCE_URL=https://nuget.pkg.github.com/cmannett85/index.json" >> $GITHUB_ENV
echo "VCPKG_BINARY_SOURCES=clear;nuget,vcpkg-cache,readwrite" >> $GITHUB_ENV
- name: Bootstrap vcpkg to build the NuGet client on Linux and MacOS
if: runner.os != 'Windows'
shell: bash
run: |
cd ${{ github.workspace }}
./external/vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Bootstrap vcpkg to build the NuGet client on Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
cd ${{ github.workspace }}
./external/vcpkg/bootstrap-vcpkg.bat -disableMetrics
- name: Configure NuGet client on Linux and MacOS
if: runner.os != 'Windows'
shell: bash
run: |
mono `./external/vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \
-source ${{ env.NUGET_SOURCE_URL }} \
-storepasswordincleartext \
-name "vcpkg-cache" \
-username "cmannett85" \
-password "${{ inputs.token }}"
mono `./external/vcpkg/vcpkg fetch nuget | tail -n 1` \
setapikey "${{ inputs.token }}" \
-source ${{ env.NUGET_SOURCE_URL }}
- name: Configure NuGet client on Windows
if: runner.os == 'Windows'
shell: pwsh
run: |
[array] $output = ./external/vcpkg/vcpkg.exe fetch nuget
& $output[-1] sources add -source ${{ env.NUGET_SOURCE_URL }} -storepasswordincleartext -name "vcpkg-cache" -username "cmannett85" -password "${{ inputs.token }}"
& $output[-1] setapikey "${{ inputs.token }}" -source ${{ env.NUGET_SOURCE_URL }}
37 changes: 37 additions & 0 deletions .github/workflows/conan_setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Installs and configures Conan
description: Installs and configures Conan for a particular C++ version (Linux only)

inputs:
version:
description: "C++ language version"
build_dir:
description: "Build directory for the Conan test project"

runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Update packages
shell: bash
run: |
sudo apt update
sudo apt install ninja-build
python -m pip install --upgrade pip conan
- name: Build Conan profile
shell: bash
run: |
conan profile detect --force
sed -i "s/^compiler.cppstd=.*/compiler.cppstd=${{ inputs.version }}/g" `conan profile path default`
- name: Build
shell: bash
run: |
conan install ${{ github.workspace }}/ci/conan_test_project --output-folder=${{ inputs.build_dir }} --build=missing
cd ${{ inputs.build_dir }}
cmake ${{ github.workspace }}/ci/conan_test_project/ -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=./build/Release/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .
47 changes: 27 additions & 20 deletions .github/workflows/docs_pusher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,36 @@ on:

env:
SKIP_COVERAGE_UPDATE: 1
NUGET_SOURCE_URL: "https://nuget.pkg.github.com/cmannett85/index.json"
VCPKG_BINARY_SOURCES: 'clear;nuget,vcpkg-cache,readwrite'
BUILD_DIR: ${{ github.workspace }}/build

jobs:
# Skip jobs based on what files have changed
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
docs_pusher: ${{ steps.filter.outputs.docs_pusher }}
source_tests_and_examples: ${{ steps.filter.outputs.source_tests_and_examples }}
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
initial-fetch-depth: 2
filters: .github/filters.yml

documentation:
runs-on: ubuntu-latest
needs: changes
if: |
needs.changes.outputs.docs_pusher == 'true' ||
needs.changes.outputs.source_tests_and_examples == 'true' ||
needs.changes.outputs.docs == 'true'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand All @@ -26,22 +46,9 @@ jobs:
sudo apt update
sudo apt install lcov ninja-build doxygen graphviz
- name: Bootstrap vcpkg to build the NuGet client
run: |
./external/vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Configure NuGet client
run: |
mono `./external/vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \
-source ${{ env.NUGET_SOURCE_URL }} \
-storepasswordincleartext \
-name "vcpkg-cache" \
-username "cmannett85" \
-password "${{ secrets.GITHUB_TOKEN }}"
mono `./external/vcpkg/vcpkg fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source ${{ env.NUGET_SOURCE_URL }}
- uses: ./.github/workflows/bootstrap_vcpkg
with:
token: "${{ secrets.GITHUB_TOKEN }}"

- name: Generate API documentation and build Unit Tests
timeout-minutes: 30
Expand All @@ -59,7 +66,7 @@ jobs:
- name: Generate coverage report
run: |
cd ${{ github.workspace }}/scripts/ci
cd ${{ github.workspace }}/ci
./calculate_test_coverage.sh ${{ env.BUILD_DIR }}
cd ${{ env.BUILD_DIR }}
genhtml arg_router.info --no-function-coverage --title "arg_router Unit Test Code Coverage" --legend --highlight --output-directory gcov_html
Expand Down
Loading

0 comments on commit b3dab2e

Please sign in to comment.