-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce bitmask support and std::format specialization
- Loading branch information
Showing
37 changed files
with
2,762 additions
and
833 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Checks: >- | ||
bugprone-*, | ||
cppcoreguidelines-*, | ||
google-*, | ||
misc-*, | ||
modernize-*, | ||
performance-*, | ||
readability-*, | ||
-bugprone-lambda-function-name, | ||
-bugprone-reserved-identifier, | ||
-cppcoreguidelines-avoid-goto, | ||
-cppcoreguidelines-avoid-magic-numbers, | ||
-cppcoreguidelines-avoid-non-const-global-variables, | ||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay, | ||
-cppcoreguidelines-pro-type-vararg, | ||
-google-readability-braces-around-statements, | ||
-google-readability-function-size, | ||
-misc-no-recursion, | ||
-modernize-return-braced-init-list, | ||
-modernize-use-nodiscard, | ||
-modernize-use-trailing-return-type, | ||
-performance-unnecessary-value-param, | ||
-readability-magic-numbers, | ||
CheckOptions: | ||
- key: readability-function-cognitive-complexity.Threshold | ||
value: 100 | ||
- key: readability-function-cognitive-complexity.IgnoreMacros | ||
value: true | ||
# Set naming conventions for your style below (there are dozens of naming settings possible): | ||
# See https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html | ||
# - key: readability-identifier-naming.ClassCase | ||
# value: CamelCase | ||
# - key: readability-identifier-naming.NamespaceCase | ||
# value: lower_case | ||
# - key: readability-identifier-naming.PrivateMemberSuffix | ||
# value: _ | ||
# - key: readability-identifier-naming.StructCase | ||
# value: CamelCase | ||
|
||
WarningsAsErrors: '*' | ||
HeaderFilterRegex: '.*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: "build-docs" | ||
description: "Builds documentation using Doxygen" | ||
inputs: | ||
cmake_target: | ||
description: "CMake documentation target" | ||
required: true | ||
docs_dir: | ||
description: "Path to documentation dir, relative to build_dir" | ||
required: true | ||
github_token: | ||
description: "GitHub token" | ||
required: true | ||
build_dir: | ||
description: "Build directory" | ||
required: false | ||
default: "build" | ||
cmake_configure_args: | ||
description: "Additional CMake configure arguments" | ||
required: false | ||
default: "" | ||
destination_dir: | ||
description: "Directory name for deployed docs" | ||
required: false | ||
default: "" | ||
docs_branch: | ||
description: "Documentation branch" | ||
required: false | ||
default: "gh-pages" | ||
|
||
outputs: | ||
version: | ||
description: "Version of the generated docs" | ||
value: ${{ steps.get-docs-version.outputs.version }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install deps | ||
shell: bash | ||
run: | | ||
sudo apt install -y cmake | ||
sudo apt install -y wget | ||
cd ~ | ||
wget -nv https://www.doxygen.nl/files/doxygen-1.10.0.linux.bin.tar.gz | ||
tar -xzf doxygen-1.10.0.linux.bin.tar.gz | ||
echo "$(pwd)/doxygen-1.10.0/bin" >> $GITHUB_PATH | ||
- name: CMake configuration | ||
shell: bash | ||
run: cmake ${{ inputs.cmake_configure_args }} -B ${{ inputs.build_dir }} -DENUM_NAME_BUILD_DOCS=ON | ||
|
||
- name: CMake build | ||
shell: bash | ||
run: cmake --build ${{ inputs.build_dir }} --target ${{ inputs.cmake_target }} | ||
|
||
- name: Get docs version | ||
id: get-docs-version | ||
shell: bash | ||
run: | | ||
subdir=$(basename $(find ${{ inputs.build_dir }}/${{ inputs.docs_dir }} -mindepth 1 -maxdepth 1 -type d | head -n 1)) | ||
echo "version=$subdir" >> $GITHUB_OUTPUT | ||
- name: Deploy docs | ||
if: ${{ inputs.destination_dir != '' }} | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ inputs.github_token }} | ||
publish_dir: ${{ inputs.build_dir }}/${{ inputs.docs_dir }}/${{ steps.get-docs-version.outputs.version }} | ||
destination_dir: ${{ inputs.destination_dir }} | ||
publish_branch: ${{ inputs.docs_branch }} | ||
|
||
- name: Deploy docs | ||
if: ${{ inputs.destination_dir == '' }} | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ inputs.github_token }} | ||
publish_dir: ${{ inputs.build_dir }}/${{ inputs.docs_dir }}/${{ steps.get-docs-version.outputs.version }} | ||
destination_dir: ${{ steps.get-docs-version.outputs.version }} | ||
publish_branch: ${{ inputs.docs_branch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: "update-redirect-page" | ||
description: "Updates redirect HTML page" | ||
inputs: | ||
github_token: | ||
description: "GitHub token" | ||
required: true | ||
target_url: | ||
description: "Redirect target URL" | ||
temp_dir: | ||
description: "Directory where redirect file will be generated" | ||
required: false | ||
default: "redirect-dir" | ||
file_name: | ||
description: "Generated file name" | ||
required: false | ||
default: "index.html" | ||
destination_dir: | ||
description: "Redirect file destination directory" | ||
required: false | ||
default: "" | ||
docs_branch: | ||
description: "Documentation branch" | ||
required: false | ||
default: "gh-pages" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Generate redirect HTML | ||
shell: bash | ||
run: | | ||
mkdir ${{ inputs.temp_dir }} | ||
cat << EOF > ${{ inputs.temp_dir }}/${{ inputs.file_name }} | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="refresh" content="0; url=${{ inputs.target_url }}"> | ||
<title>Redirecting...</title> | ||
</head> | ||
<body> | ||
<p>If you are not redirected automatically, <a href="${{ inputs.target_url }}">click here</a>.</p> | ||
</body> | ||
</html> | ||
EOF | ||
- name: Deploy redirect page | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ inputs.github_token }} | ||
publish_dir: ${{ inputs.temp_dir }} | ||
destination_dir: ${{ inputs.destination_dir }} | ||
publish_branch: ${{ inputs.docs_branch }} | ||
keep_files: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "update-version-selector" | ||
description: "Updates version selector" | ||
inputs: | ||
github_token: | ||
description: "GitHub token" | ||
required: true | ||
temp_dir: | ||
description: "Directory where version selector file will be generated" | ||
required: false | ||
default: "selector-dir" | ||
file_name: | ||
description: "Selector file name" | ||
required: false | ||
default: "version_selector.html" | ||
selector_id: | ||
description: "select element id" | ||
required: false | ||
default: "versionSelector" | ||
docs_branch: | ||
description: "Documentation branch" | ||
required: false | ||
default: "gh-pages" | ||
outputs: | ||
versions_counter: | ||
description: "Number of existing versions" | ||
value: ${{ steps.discover-versions.outputs.counter }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Discover versions | ||
id: discover-versions | ||
shell: bash | ||
run: | | ||
git fetch origin ${{ inputs.docs_branch }} | ||
dirs=$(git ls-tree --name-only -d origin/${{ inputs.docs_branch }} | sort -rV) | ||
echo "counter=$(echo "$dirs" | wc -l | xargs)" >> $GITHUB_OUTPUT | ||
mkdir ${{ inputs.temp_dir }} | ||
# Create HTML | ||
echo '<select id="${{ inputs.selector_id }}">' > ${{ inputs.temp_dir }}/${{ inputs.file_name }} | ||
for dir in $dirs; do | ||
if [[ "$(basename "$dir")" != .* ]]; then | ||
version=$(basename "$dir") | ||
echo " <option value=\"$version\">$version</option>" >> ${{ inputs.temp_dir }}/${{ inputs.file_name }} | ||
fi | ||
done | ||
echo '</select>' >> ${{ inputs.temp_dir }}/${{ inputs.file_name }} | ||
- name: Deploy version selector | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ inputs.github_token }} | ||
publish_dir: ${{ inputs.temp_dir }} | ||
publish_branch: ${{ inputs.docs_branch }} | ||
keep_files: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Create git-main docs | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
create-git-main-docs: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build docs | ||
id: build-docs | ||
uses: ./.github/actions/build-docs | ||
with: | ||
cmake_target: "doc" | ||
docs_dir: "doc/docs" | ||
destination_dir: git-main | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Update version selector | ||
id: update-version-selector | ||
uses: ./.github/actions/update-version-selector | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create redirect page if there are no releases | ||
if: ${{ steps.update-version-selector.outputs.versions_counter == 1}} | ||
uses: ./.github/actions/update-redirect-page | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
target_url: git-main/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Push | ||
on: [push, pull_request, workflow_dispatch] | ||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
trunk_check: | ||
name: Trunk Check Runner | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write # For trunk to post annotations | ||
contents: read # For repo checkout | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Trunk Check | ||
uses: trunk-io/trunk-action@v1 | ||
with: | ||
check-mode: all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*out | ||
*logs | ||
*actions | ||
*notifications | ||
*tools | ||
plugins | ||
user_trunk.yaml | ||
user.yaml | ||
tmp |
Oops, something went wrong.