Skip to content

Commit 5fdd76e

Browse files
committed
Merge branch 'release/v0.4.0'
2 parents 05dc36d + e9e87ed commit 5fdd76e

211 files changed

Lines changed: 4786 additions & 1132 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/macos.yml

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -52,32 +52,6 @@ jobs:
5252
working-directory: ${{github.workspace}}/build
5353
run: ctest -C ${{matrix.build_type}} --output-on-failure -j ${{env.JOBS}}
5454

55-
xcode_for_macos12:
56-
timeout-minutes: 10
57-
runs-on: macos-12
58-
strategy:
59-
matrix:
60-
xcode: [ '13.1', '13.2.1', '13.3.1', '13.4.1', '14.0.1', '14.1', '14.2' ]
61-
build_type: [ Debug, Release ]
62-
env:
63-
DEVELOPER_DIR: /Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer
64-
JOBS: 2
65-
66-
steps:
67-
- uses: actions/checkout@v4
68-
with:
69-
submodules: recursive
70-
71-
- name: Configure CMake
72-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DFK_YAML_BUILD_TEST=ON
73-
74-
- name: Build
75-
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j ${{env.JOBS}}
76-
77-
- name: Test
78-
working-directory: ${{github.workspace}}/build
79-
run: ctest -C ${{matrix.build_type}} --output-on-failure -j ${{env.JOBS}}
80-
8155
xcode_for_macos13:
8256
timeout-minutes: 10
8357
runs-on: macos-13
@@ -109,7 +83,10 @@ jobs:
10983
runs-on: macos-14
11084
strategy:
11185
matrix:
112-
xcode: [ '14.3.1', '15.0.1', '15.1', '15.2', '15.3', '15.4', '16' ]
86+
# The macos-14 runner image will contain only Xcode 15.x versions due to support policy changes.
87+
# Xcode 16.x versions are tested with the macos-15 runner image.
88+
# See https://github.com/actions/runner-images/issues/10703 for more details.
89+
xcode: [ '15.0.1', '15.1', '15.2', '15.3', '15.4' ]
11390
build_type: [ Debug, Release ]
11491
env:
11592
DEVELOPER_DIR: /Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer
@@ -135,7 +112,9 @@ jobs:
135112
runs-on: macos-15
136113
strategy:
137114
matrix:
138-
xcode: [ '16' ]
115+
# The macos-14 runner image will contain only Xcode 16.x versions.
116+
# See https://github.com/actions/runner-images/issues/10703 for more details.
117+
xcode: [ '16', '16.1' ]
139118
build_type: [ Debug, Release ]
140119
env:
141120
DEVELOPER_DIR: /Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer

.github/workflows/ubuntu.yml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ jobs:
200200
runs-on: ubuntu-latest
201201
strategy:
202202
matrix:
203-
compiler: [ "3.5", "3.6", "3.7", "3.8", "3.9", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", latest ]
203+
compiler: [ "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" ]
204204
build_type: [ Debug, Release ]
205205
container: silkeh/clang:${{matrix.compiler}}
206206

@@ -270,6 +270,63 @@ jobs:
270270
cd ${{github.workspace}}/build
271271
ctest -C ${{matrix.build_type}} --output-on-failure -j ${{env.JOBS}}
272272
273+
ci_test_older_gcc_versions:
274+
runs-on: ubuntu-22.04
275+
strategy:
276+
fail-fast: false
277+
matrix:
278+
build_type: [ Debug, Release ]
279+
gcc_ver: [ '4.8', '5', '6' ]
280+
281+
steps:
282+
- uses: actions/checkout@v4
283+
with:
284+
submodules: recursive
285+
286+
- name: add repository commonly needed to install GCC
287+
run: |
288+
sudo apt-get update
289+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
290+
sudo apt-get update
291+
292+
- name: add repository for GCC 4.8 or 5
293+
run: |
294+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
295+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
296+
sudo apt-get update
297+
298+
# for g++-4.8, g++-5
299+
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial main'
300+
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
301+
302+
sudo apt-get update
303+
if: ${{ matrix.gcc_ver == '4.8' || matrix.gcc_ver == '5' }}
304+
305+
- name: add repository for GCC 6
306+
run: |
307+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
308+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
309+
sudo apt-get update
310+
311+
# for g++-6
312+
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ bionic main'
313+
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
314+
315+
sudo apt-get update
316+
if: ${{ matrix.gcc_ver == '6' }}
317+
318+
- name: install GCC
319+
run: sudo apt-get install --no-install-recommends -y g++-${{matrix.gcc_ver}}
320+
321+
- name: Configure CMake
322+
run: CXX=g++-${{matrix.gcc_ver}} cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DFK_YAML_BUILD_TEST=ON
323+
324+
- name: Build & Test
325+
run: |
326+
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j ${{env.JOBS}}
327+
cd ${{github.workspace}}/build
328+
ctest -C ${{matrix.build_type}} --output-on-failure -j ${{env.JOBS}}
329+
273330
ci_test_icpx:
274331
runs-on: ubuntu-latest
275332
strategy:

.reuse/templates/fkYAML.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
_______ __ __ __ _____ __ __ __
22
| __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library
3-
| __| _ < \_ _/| ___ | _ | |___ version 0.3.14
3+
| __| _ < \_ _/| ___ | _ | |___ version 0.4.0
44
|__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
55

66
{% for copyright_line in copyright_lines %}

.reuse/templates/fkYAML_support.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
_______ __ __ __ _____ __ __ __
22
| __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
3-
| __| _ < \_ _/| ___ | _ | |___ version 0.3.14
3+
| __| _ < \_ _/| ___ | _ | |___ version 0.4.0
44
|__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
55

66
{% for copyright_line in copyright_lines %}

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## [v0.4.0](https://github.com/fktn-k/fkYAML/releases/tag/v0.4.0) (2024-12-10)
4+
5+
[Full Changelog](https://github.com/fktn-k/fkYAML/compare/v0.3.14...v0.4.0)
6+
7+
- Fix round-trip issue in float serialization using scientific notation [\#439](https://github.com/fktn-k/fkYAML/pull/439) ([fktn-k](https://github.com/fktn-k))
8+
- Fix parsing input which begins with a newline & indentation [\#437](https://github.com/fktn-k/fkYAML/pull/437) ([fktn-k](https://github.com/fktn-k))
9+
- Fixed bugs in parsing block scalars [\#435](https://github.com/fktn-k/fkYAML/pull/435) ([fktn-k](https://github.com/fktn-k))
10+
- Emit error if an anchor is specified to an alias [\#434](https://github.com/fktn-k/fkYAML/pull/434) ([fktn-k](https://github.com/fktn-k))
11+
- Stop throwing parse\_error on string-to-int/float conversion failures if not forced with tag [\#431](https://github.com/fktn-k/fkYAML/pull/431) ([fktn-k](https://github.com/fktn-k))
12+
- Resolve the C4800 warning when compiled with MSVC [\#430](https://github.com/fktn-k/fkYAML/pull/430) ([fktn-k](https://github.com/fktn-k))
13+
14+
- Support reverse iterations over sequence/mapping nodes [\#440](https://github.com/fktn-k/fkYAML/pull/440) ([fktn-k](https://github.com/fktn-k))
15+
- Make node iterators compatible with different value type const-ness [\#438](https://github.com/fktn-k/fkYAML/pull/438) ([fktn-k](https://github.com/fktn-k))
16+
- Add more GCC & Clang versions to use in GitHub Actions workflows [\#436](https://github.com/fktn-k/fkYAML/pull/436) ([fktn-k](https://github.com/fktn-k))
17+
- Update GitHub Actions workflow jobs using macOS related runner images [\#433](https://github.com/fktn-k/fkYAML/pull/433) ([fktn-k](https://github.com/fktn-k))
18+
- Support parsing multiline plain scalars [\#432](https://github.com/fktn-k/fkYAML/pull/432) ([fktn-k](https://github.com/fktn-k))
19+
320
## [v0.3.14](https://github.com/fktn-k/fkYAML/releases/tag/v0.3.14) (2024-11-16)
421

522
[Full Changelog](https://github.com/fktn-k/fkYAML/compare/v0.3.13...v0.3.14)

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.8)
66

77
project(
88
fkYAML
9-
VERSION 0.3.14
9+
VERSION 0.4.0
1010
LANGUAGES CXX)
1111

1212
#############################################################

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ TOOL_SRCS = $(shell find tool -type f -name '*.cpp' | sort)
1515

1616
# target version definition
1717
TARGET_MAJOR_VERSION := 0
18-
TARGET_MINOR_VERSION := 3
19-
TARGET_PATCH_VERSION := 14
18+
TARGET_MINOR_VERSION := 4
19+
TARGET_PATCH_VERSION := 0
2020
TARGET_VERSION_FULL := $(TARGET_MAJOR_VERSION).$(TARGET_MINOR_VERSION).$(TARGET_PATCH_VERSION)
2121
VERSION_MACRO_FILE := include/fkYAML/detail/macros/version_macros.hpp
2222

2323
# system
24-
JOBS = $(($(shell grep cpu.cores /proc/cpuinfo | sort -u | sed 's/[^0-9]//g') + 1))
24+
JOBS = $(($(shell grep cpu.cores /proc/cpuinfo | sort -u | sed 's/[^0-9]//g') - 1))
2525

2626
###############################################
2727
# documentation of the Makefile's targets #

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,15 @@ Currently, the following compilers are known to work and used in GitHub Actions
9090

9191
| Compiler | Operating System |
9292
| -------------------------- | -------------------------------------------------------------------------------------------------------------- |
93-
| AppleClang 13.0.0.13000029 | [macOS 12](https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md) |
94-
| AppleClang 13.1.6.13160021 | [macOS 12](https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md) |
95-
| AppleClang 14.0.0.14000029 | [macOS 12](https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md) |
9693
| AppleClang 14.0.0.14000029 | [macOS 13](https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md) |
9794
| AppleClang 14.0.3.14030022 | [macOS 13](https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md) |
98-
| AppleClang 14.0.3.14030022 | [macOS 14](https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md) |
9995
| AppleClang 15.0.0.15000040 | [macOS 13](https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md) |
10096
| AppleClang 15.0.0.15000040 | [macOS 14](https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md) |
10197
| AppleClang 15.0.0.15000100 | [macOS 13](https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md) |
10298
| AppleClang 15.0.0.15000100 | [macOS 14](https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md) |
10399
| AppleClang 15.0.0.15000309 | [macOS 14](https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md) |
104-
| AppleClang 16.0.0.16000026 | [macOS 14](https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md) |
105100
| AppleClang 16.0.0.16000026 | [macOS 15](https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md) |
101+
| Clang 3.4.2 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
106102
| Clang 3.5.2 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
107103
| Clang 3.6.2 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
108104
| Clang 3.7.1 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
@@ -122,14 +118,18 @@ Currently, the following compilers are known to work and used in GitHub Actions
122118
| Clang 16.0.6 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
123119
| Clang 17.0.6 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
124120
| Clang 18.1.6 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
121+
| Clang 19.1.4 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
122+
| GCC 4.8.5 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
123+
| GCC 5.3.1 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
124+
| GCC 6.4.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
125125
| GCC 7.5.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
126126
| GCC 8.5.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
127127
| GCC 9.5.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
128128
| GCC 10.5.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
129129
| GCC 11.4.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
130130
| GCC 12.3.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
131131
| GCC 13.3.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
132-
| GCC 14.1.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
132+
| GCC 14.2.0 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
133133
| IntelLLVM 2024.1.2 | [Ubuntu 22.04](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md) |
134134
| MinGW-64 8.1.0 | [Windows Server 2019](https://github.com/actions/runner-images/blob/main/images/windows/Windows2019-Readme.md) |
135135
| MinGW-64 12.2.0 | [Windows Server 2022](https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md) |

docs/examples/CMakeLists.txt

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,26 @@
33
#############################
44

55
add_library(example_common_config INTERFACE)
6-
target_include_directories(
6+
target_link_libraries(
77
example_common_config
88
INTERFACE
9-
${CMAKE_CURRENT_BINARY_DIR}/include
9+
${FK_YAML_TARGET_NAME}
1010
)
11-
target_link_libraries(
11+
target_compile_options(
1212
example_common_config
1313
INTERFACE
14-
${FK_YAML_TARGET_NAME}
14+
# MSVC
15+
$<$<CXX_COMPILER_ID:MSVC>:
16+
/wd4996 # examples contain deprecated APIs.
17+
>
18+
# GNU
19+
$<$<CXX_COMPILER_ID:GNU>:
20+
-Wno-deprecated-declarations # examples contain deprecated APIs.
21+
>
22+
# Clang
23+
$<$<CXX_COMPILER_ID:Clang>:
24+
-Wno-deprecated-declarations #examples contain deprecated APIs.
25+
>
1526
)
1627

1728
###############################
@@ -23,13 +34,14 @@ foreach(TUT_SRC_FILE ${TUT_SRC_FILES})
2334
file(RELATIVE_PATH REL_TUT_SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR} ${TUT_SRC_FILE})
2435
string(REPLACE ".cpp" "" TUT_SRC_FILE_BASE ${REL_TUT_SRC_FILE})
2536
add_executable(${TUT_SRC_FILE_BASE} ${TUT_SRC_FILE})
26-
target_link_libraries(${TUT_SRC_FILE_BASE} ${FK_YAML_TARGET_NAME})
37+
target_link_libraries(${TUT_SRC_FILE_BASE} example_common_config)
2738

2839
add_custom_command(
2940
TARGET ${TUT_SRC_FILE_BASE}
3041
POST_BUILD
3142
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/example.yaml $<TARGET_FILE_DIR:${TUT_SRC_FILE_BASE}>
3243
COMMAND $<TARGET_FILE:${TUT_SRC_FILE_BASE}> > ${CMAKE_CURRENT_SOURCE_DIR}/${TUT_SRC_FILE_BASE}.output
44+
WORKING_DIRECTORY $<TARGET_FILE_DIR:${TUT_SRC_FILE_BASE}>
3345
)
3446
endforeach()
3547

@@ -44,13 +56,14 @@ foreach(EX_SRC_FILE ${EX_SRC_FILES})
4456
file(RELATIVE_PATH REL_EX_SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR} ${EX_SRC_FILE})
4557
string(REPLACE ".cpp" "" EX_SRC_FILE_BASE ${REL_EX_SRC_FILE})
4658
add_executable(${EX_SRC_FILE_BASE} ${EX_SRC_FILE})
47-
target_link_libraries(${EX_SRC_FILE_BASE} ${FK_YAML_TARGET_NAME})
59+
target_link_libraries(${EX_SRC_FILE_BASE} example_common_config)
4860

4961
add_custom_command(
5062
TARGET ${EX_SRC_FILE_BASE}
5163
POST_BUILD
5264
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/input.yaml $<TARGET_FILE_DIR:${EX_SRC_FILE_BASE}>
5365
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/input_multi.yaml $<TARGET_FILE_DIR:${EX_SRC_FILE_BASE}>
5466
COMMAND $<TARGET_FILE:${EX_SRC_FILE_BASE}> > ${CMAKE_CURRENT_SOURCE_DIR}/${EX_SRC_FILE_BASE}.output
67+
WORKING_DIRECTORY $<TARGET_FILE_DIR:${EX_SRC_FILE_BASE}>
5568
)
5669
endforeach()

docs/examples/ex_basic_node_add_anchor_name.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// _______ __ __ __ _____ __ __ __
22
// | __| |_/ | \_/ |/ _ \ / \/ \| | fkYAML: A C++ header-only YAML library (supporting code)
3-
// | __| _ < \_ _/| ___ | _ | |___ version 0.3.14
3+
// | __| _ < \_ _/| ___ | _ | |___ version 0.4.0
44
// |__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML
55
//
66
// SPDX-FileCopyrightText: 2023-2024 Kensuke Fukutani <fktn.dev@gmail.com>

0 commit comments

Comments
 (0)