Skip to content

Commit

Permalink
Merge branch 'release/v0.3.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
fktn-k committed May 16, 2024
2 parents 5a946be + 8eadaf8 commit 8c12399
Show file tree
Hide file tree
Showing 167 changed files with 3,036 additions and 2,366 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/amalgamation_check.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/clang_format_check.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
- Makefile
workflow_dispatch:



jobs:
coverage:
timeout-minutes: 10
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Format_Check

on:
push:
branches:
- develop
- main
paths:
- .github/workflows/format_check.yml
- include/**
- scripts/**
- single_include/**
- test/**
- tool/amalgamation/**
- CMakeLists.txt
- .clang-format
pull_request:
paths:
- .github/workflows/format_check.yml
- include/**
- scripts/**
- single_include/**
- test/**
- tool/amalgamation/**
- CMakeLists.txt
- .clang-format
workflow_dispatch:

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
format-check:
timeout-minutes: 10
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
ref: ${{github.head_ref}}
token: ${{secrets.FKYAML_FORMAT_CHECK_PAT}}
submodules: recursive

- name: Run clang-format style check
run: ${{github.workspace}}/scripts/run_clang_format.sh

- name: Run amalgamation check
run: ${{github.workspace}}/scripts/run_amalgamation.sh

- name: Detect diffs caused by formatting scripts
id: format_diff
run: git diff --name-only --exit-code

- name: Commit and push the diffs
if: failure() && steps.format_diff.outcome == 'failure'
run: |
set -x
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git commit --author="$(git log --pretty=format:"%an <%ae>")" -m "[bot] run clang-format & amalgamation"
git push
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{github.workflow}}-${{github.ref || github.run_id}}
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
JOBS: 3

concurrency:
group: ${{github.workflow}}-${{github.ref || github.run_id}}
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{github.workflow}}-${{github.ref || github.run_id}}
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

env:
Expand Down
2 changes: 1 addition & 1 deletion .reuse/templates/fkYAML.commented.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// _______ __ __ __ _____ __ __ __
/// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
/// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
/// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
/// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
///
{% for copyright_line in copyright_lines %}
Expand Down
2 changes: 1 addition & 1 deletion .reuse/templates/fkYAML_support.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_______ __ __ __ _____ __ __ __
| __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
| __| _ < \_ _/| ___ | _ | |___ version 0.3.6
| __| _ < \_ _/| ___ | _ | |___ version 0.3.7
|__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML

{% for copyright_line in copyright_lines %}
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [v0.3.7](https://github.com/fktn-k/fkYAML/releases/tag/v0.3.7) (2024-05-16)

[Full Changelog](https://github.com/fktn-k/fkYAML/compare/v0.3.6...v0.3.7)

- Fixed error on node properties for child block sequences [\#338](https://github.com/fktn-k/fkYAML/pull/338) ([fktn-k](https://github.com/fktn-k))
- Escape backslash\(\\) + 0x09 to a horizontal tab \(\t\) [\#336](https://github.com/fktn-k/fkYAML/pull/336) ([fktn-k](https://github.com/fktn-k))
- Fix false error on anchor names containing colons \(:\) [\#335](https://github.com/fktn-k/fkYAML/pull/335) ([fktn-k](https://github.com/fktn-k))

- Run and apply the result of clang-format & amalagamation in GA workflows [\#341](https://github.com/fktn-k/fkYAML/pull/341) ([fktn-k](https://github.com/fktn-k))
- Improve anchor alias node management [\#340](https://github.com/fktn-k/fkYAML/pull/340) ([fktn-k](https://github.com/fktn-k))
- Fix the C6262 warning on Windows [\#339](https://github.com/fktn-k/fkYAML/pull/339) ([fktn-k](https://github.com/fktn-k))
- Separate YAML escaping/unescaping functionalities [\#337](https://github.com/fktn-k/fkYAML/pull/337) ([fktn-k](https://github.com/fktn-k))

## [v0.3.6](https://github.com/fktn-k/fkYAML/releases/tag/v0.3.6) (2024-05-02)

[Full Changelog](https://github.com/fktn-k/fkYAML/compare/v0.3.5...v0.3.6)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.8)

project(
fkYAML
VERSION 0.3.6
VERSION 0.3.7
LANGUAGES CXX)

#############################################################
Expand Down
21 changes: 10 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ To make changes to the fkYAML project, you need to edit the following files:

### 1. [`include/fkYAML/**.hpp`](https://github.com/fktn-k/fkYAML/tree/develop/include/fkYAML)

These files are the sources of the fkYAML library. After making changes in those files, please run the script ([`run_amalgamation.bat`](https://github.com/fktn-k/fkYAML/scripts/run_amalgamation.bat) for Windows, [`run_amalgamation.sh`](https://github.com/fktn-k/fkYAML/scripts/run_amalgamation.sh) otherwise) to regenerate [`single_include/fkYAML/node.hpp`](https://github.com/fktn-k/fkYAML/tree/develop/single_include/fkYAML/node.hpp) at least before making a PR, with the following commands:
These files are the sources of the fkYAML library and **DO NOT** directly change the single header version under the [`single_include`](https://github.com/fktn-k/fkYAML/tree/develop/single_include/) directory. Alghough amalgamation is automatically executed in the GitHub Actions workflows, you can run the script ([`run_amalgamation.bat`](https://github.com/fktn-k/fkYAML/scripts/run_amalgamation.bat) for Windows, [`run_amalgamation.sh`](https://github.com/fktn-k/fkYAML/scripts/run_amalgamation.sh) otherwise) to regenerate [`single_include/fkYAML/node.hpp`](https://github.com/fktn-k/fkYAML/tree/develop/single_include/fkYAML/node.hpp) locally, which will save you from waiting unnecessarily long for the workflow results.

**Windows**
**Windows (Command Prompt)**
```batch
cd path\to\fkYAML
scripts\run_amalgamation.bat
Expand All @@ -41,9 +41,9 @@ cd path/to/fkYAML
scripts/run_amalgamation.sh
```

If you just want to check if amalgamation is needed, run the script ([`run_amalgamation.bat`](https://github.com/fktn-k/fkYAML/scripts/run_amalgamation.bat) for Windows, [`run_amalgamation.sh`](https://github.com/fktn-k/fkYAML/scripts/run_amalgamation.sh) otherwise) with the following commands:
If you just want to check if amalgamation is needed locally, run the script ([`run_amalgamation.bat`](https://github.com/fktn-k/fkYAML/scripts/run_amalgamation.bat) for Windows, [`run_amalgamation.sh`](https://github.com/fktn-k/fkYAML/scripts/run_amalgamation.sh) otherwise) with the following commands:

**Windows**
**Windows (Command Prompt)**
```batch
cd path\to\fkYAML
scripts\check_amalgamation.bat
Expand Down Expand Up @@ -105,14 +105,13 @@ The commands above will automatically install all the dependencies using [Python

### 4. Format source files

[GitHub Actions](https://github.com/fktn-k/fkYAML/actions) will test the updated project with the [Clang-Format](https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormat.html) tool (14.0.0) when you push commits which include changes in the source files in either `include` or `test` directories.
So, it would be more efficient to check if your changes follow the rules defined in the [`.clang-format`](https://github.com/fktn-k/fkYAML/tree/develop/.clang-format) file on your local environment in advance.
Since the Clang-Format tool does not seem to gurantee backward compatibility and its behaviors vary from version to version, the script files ([`run_clang_format.bat`](https://github.com/fktn-k/fkYAML/scripts/run_clang_format.bat) for Windows, [`run_clang_format.sh`](https://github.com/fktn-k/fkYAML/scripts/run_clang_format.sh) otherwise) are available to avoid unnecessary confusion for that kind of reason.
The scripts uses [the Clang-Format Python distribution](https://pypi.org/project/clang-format/14.0.0/) and installs it using [the Python venv module](https://docs.python.org/3/library/venv.html) if it's not installed yet.
So, all you need to run the script is only Python 3.3 or better.
You can run it with the following commands:
[GitHub Actions](https://github.com/fktn-k/fkYAML/actions) will test the updated project with the [Clang-Format](https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormat.html) tool (14.0.0) once you open a PR or push commits afterwards which include changes in the source files under either [`include`](https://github.com/fktn-k/fkYAML/tree/develop/include) or [`test`](https://github.com/fktn-k/fkYAML/tree/develop/test) directories.
Although code formatting is automatically executed in the GitHub Actions workflows, you can run the script files ([`run_clang_format.bat`](https://github.com/fktn-k/fkYAML/scripts/run_clang_format.bat) for Windows, [`run_clang_format.sh`](https://github.com/fktn-k/fkYAML/scripts/run_clang_format.sh) otherwise) to check if your changes follow the rules defined in the [`.clang-format`](https://github.com/fktn-k/fkYAML/tree/develop/.clang-format) file on your local environment in advance.
Note that, since the Clang-Format tool does not gurantee backward compatibility especially in its edge cases and its behaviors might therefore vary from version to version, it's highly recommended that you use the above script files to avoid unnecessary confusion for that kind of reason.
The scripts uses [the Clang-Format Python distribution](https://pypi.org/project/clang-format/14.0.0/) and installs it using [the Python venv module](https://docs.python.org/3/library/venv.html) if it's not been installed yet.
You can run the scripts with the following commands:

**Windows**
**Windows (Command Prompt)**
```batch
cd path\to\fkYAML
scripts\run_clang_format.bat
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ EXAMPLE_SRCS = $(shell find docs/examples -type f -name '*.cpp' | sort)
# target version definition
TARGET_MAJOR_VERSION := 0
TARGET_MINOR_VERSION := 3
TARGET_PATCH_VERSION := 6
TARGET_PATCH_VERSION := 7
TARGET_VERSION_FULL := $(TARGET_MAJOR_VERSION).$(TARGET_MINOR_VERSION).$(TARGET_PATCH_VERSION)
VERSION_MACRO_FILE := include/fkYAML/detail/macros/version_macros.hpp

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_add_anchor_name.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_add_tag_name.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_alias_of.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_at_basic_node.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_at_compatible_type.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_begin.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_boolean_type.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_const_iterator.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_constructor_1.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_constructor_2.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_constructor_3.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_constructor_4.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_constructor_5.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex_basic_node_constructor_6.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// _______ __ __ __ _____ __ __ __
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.6
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.7
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
//
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <[email protected]>
Expand Down
Loading

0 comments on commit 8c12399

Please sign in to comment.