Skip to content

Commit

Permalink
Merge branch 'release/v0.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
fktn-k committed Mar 17, 2024
2 parents b100e37 + d1270bf commit b7e813b
Show file tree
Hide file tree
Showing 86 changed files with 2,138 additions and 1,081 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ concurrency:
cancel-in-progress: true

env:
JOBS: 4
JOBS: 3

jobs:
macos-latest:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure -j${{env.JOBS}}
run: ctest -C ${{matrix.build_type}} --output-on-failure -j ${{env.JOBS}}

xcode_for_macos12:
timeout-minutes: 10
Expand All @@ -101,4 +101,29 @@ jobs:

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure -j${{env.JOBS}}
run: ctest -C ${{matrix.build_type}} --output-on-failure -j ${{env.JOBS}}

xcode_for_macos13:
timeout-minutes: 10
runs-on: macos-13
strategy:
matrix:
xcode: [ '14.1', '14.2', '14.3.1', '15.0.1', '15.1', '15.2' ]
build_type: [ Debug, Release ]
env:
DEVELOPER_DIR: /Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DFK_YAML_BUILD_TEST=ON

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j ${{env.JOBS}}

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure -j ${{env.JOBS}}
26 changes: 15 additions & 11 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,25 @@ jobs:

ci_test_clang_sanitizers:
runs-on: ubuntu-latest
container: silkeh/clang:latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install git and unzip
run: |
apt-get update
apt-get install -y git unzip
git --version
- name: Install Clang
run: |
sudo apt-get update
sudo apt-get install -y clang
clang++ --version
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Run Clang Sanitizers
run: make clang-sanitizers
- name: Get latest CMake
uses: lukka/get-cmake@latest

- name: Run Clang Sanitizers
run: make clang-sanitizers

ci_test_clang_cxx_standards:
runs-on: ubuntu-latest
Expand All @@ -138,7 +142,7 @@ jobs:
apt-get update
apt-get install -y git unzip
git --version
- uses: actions/checkout@v3
with:
submodules: recursive
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.1
/// | __| _ < \_ _/| ___ | _ | |___ version 0.3.2
/// |__| |_| \__| |_| |_| |_|___||___|______| 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.1
| __| _ < \_ _/| ___ | _ | |___ version 0.3.2
|__| |_| \__| |_| |_| |_|___||___|______| https://github.com/fktn-k/fkYAML

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

## [v0.3.2](https://github.com/fktn-k/fkYAML/releases/tag/v0.3.2) (2024-03-17)

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

- Clean up CMakeLists files [\#280](https://github.com/fktn-k/fkYAML/pull/280) ([fktn-k](https://github.com/fktn-k))
- Add workflow jobs with the macos-13 runner image [\#274](https://github.com/fktn-k/fkYAML/pull/274) ([fktn-k](https://github.com/fktn-k))
- Modify handling node properties [\#270](https://github.com/fktn-k/fkYAML/pull/270) ([fktn-k](https://github.com/fktn-k))
- \#237 Support char8\_t in deserialization [\#269](https://github.com/fktn-k/fkYAML/pull/269) ([fktn-k](https://github.com/fktn-k))

- \#281 Fixed the parser crash due to comments right after a sequence block key [\#284](https://github.com/fktn-k/fkYAML/pull/284) ([fktn-k](https://github.com/fktn-k))
- \#282 Don't traverse up to the parent node immediately after parsing a flow-mapping value [\#283](https://github.com/fktn-k/fkYAML/pull/283) ([stephenwhittle](https://github.com/stephenwhittle))
- \#277 Fixed incorrect parse result from plain scalars starting with special values [\#278](https://github.com/fktn-k/fkYAML/pull/278) ([fktn-k](https://github.com/fktn-k))
- \#275 Fixed parse error on plain scalars containing flow indicators [\#276](https://github.com/fktn-k/fkYAML/pull/276) ([fktn-k](https://github.com/fktn-k))
- \#272 Fix parse error on a block sequence containing a comment within [\#273](https://github.com/fktn-k/fkYAML/pull/273) ([fktn-k](https://github.com/fktn-k))

- Updated documents [\#279](https://github.com/fktn-k/fkYAML/pull/279) ([fktn-k](https://github.com/fktn-k))
- Updated copyright year [\#271](https://github.com/fktn-k/fkYAML/pull/271) ([fktn-k](https://github.com/fktn-k))

## [v0.3.1](https://github.com/fktn-k/fkYAML/releases/tag/v0.3.1) (2023-12-21)

[Full Changelog](https://github.com/fktn-k/fkYAML/compare/v0.3.0...v0.3.1)
Expand Down
114 changes: 75 additions & 39 deletions 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.1
VERSION 0.3.2
LANGUAGES CXX)

#############################################################
Expand All @@ -33,6 +33,7 @@ endif()

if(FK_YAML_BUILD_TEST OR FK_YAML_BUILD_ALL_TEST)
set(CATCH2_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/catch2")

if(NOT EXISTS ${CATCH2_ROOT_DIR}/CMakeLists.txt)
find_package(Git REQUIRED)
message(STATUS "Fetching git submodule: Catch2")
Expand All @@ -44,7 +45,8 @@ if(FK_YAML_BUILD_TEST OR FK_YAML_BUILD_ALL_TEST)
message(FATAL_ERROR "Failed to fetch Catch2 as a git submodule.")
endif()
endif()
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CATCH2_ROOT_DIR}/contrib")

list(APPEND CMAKE_MODULE_PATH "${CATCH2_ROOT_DIR}/contrib")
endif()

###########################################
Expand All @@ -53,49 +55,54 @@ endif()

include(GNUInstallDirs)

set(FK_YAML_TARGET_NAME ${PROJECT_NAME})
set(FK_YAML_VERSION_STRING
"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
set(FK_YAML_CONFIG_INSTALL_DIR
"${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME}"
CACHE INTERNAL "Install directory path for config files.")
set(FK_YAML_TARGET_NAME ${PROJECT_NAME})
set(FK_YAML_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME}" CACHE INTERNAL "Install directory path for config files.")

if(FK_YAML_USE_SINGLE_HEADER)
set(FK_YAML_INCLUDE_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/single_include/")
else()
set(FK_YAML_INCLUDE_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/")
endif()

set(FK_YAML_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}")

set(FK_YAML_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(FK_YAML_CMAKE_CONFIG_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.cmake.in")
set(FK_YAML_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}")
set(FK_YAML_CMAKE_VERSION_CONFIG_FILE
"${FK_YAML_CMAKE_CONFIG_DIR}/${PROJECT_NAME}ConfigVersion.cmake")
set(FK_YAML_CMAKE_PROJECT_CONFIG_FILE "${FK_YAML_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Config.cmake")
set(FK_YAML_CMAKE_PROJECT_TARGETS_FILE "${FK_YAML_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Targets.cmake")
set(FK_YAML_PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/pkgconfig")
set(FK_YAML_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
set(FK_YAML_CMAKE_CONFIG_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.cmake.in")
set(FK_YAML_CMAKE_VERSION_CONFIG_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake.in")
set(FK_YAML_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}")
set(FK_YAML_CMAKE_VERSION_CONFIG_FILE ${FK_YAML_CMAKE_CONFIG_DIR}/${PROJECT_NAME}ConfigVersion.cmake)
set(FK_YAML_CMAKE_PROJECT_CONFIG_FILE ${FK_YAML_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Config.cmake)
set(FK_YAML_CMAKE_PROJECT_TARGETS_FILE ${FK_YAML_CMAKE_CONFIG_DIR}/${PROJECT_NAME}Targets.cmake)
set(FK_YAML_PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/pkgconfig")

##########################################
# Create target and add include path #
##########################################

add_library(${FK_YAML_TARGET_NAME} INTERFACE)
add_library(${PROJECT_NAME}::${FK_YAML_TARGET_NAME} ALIAS ${FK_YAML_TARGET_NAME})
target_compile_features(${FK_YAML_TARGET_NAME} INTERFACE cxx_std_11)
target_compile_features(
${FK_YAML_TARGET_NAME}
INTERFACE
cxx_std_11
)

target_include_directories(
${FK_YAML_TARGET_NAME} INTERFACE $<BUILD_INTERFACE:${FK_YAML_INCLUDE_BUILD_DIR}>
$<INSTALL_INTERFACE:${FK_YAML_INCLUDE_INSTALL_DIR}>)
${FK_YAML_TARGET_NAME}
INTERFACE
$<BUILD_INTERFACE:${FK_YAML_INCLUDE_BUILD_DIR}>
$<INSTALL_INTERFACE:${FK_YAML_INCLUDE_INSTALL_DIR}>
)

# add .natvis file to apply custom debug view for MSVC
if(MSVC)
set(FK_YAML_INSTALL_NATVIS ON)
set(FK_YAML_NATVIS_FILE "fkYAML.natvis")
set(FK_YAML_NATVIS_FILE ${FK_YAML_TARGET_NAME}.natvis)
target_sources(
${FK_YAML_TARGET_NAME} INTERFACE $<INSTALL_INTERFACE:${FK_YAML_NATVIS_FILE}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${FK_YAML_NATVIS_FILE}>)
${FK_YAML_TARGET_NAME}
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${FK_YAML_NATVIS_FILE}>
$<INSTALL_INTERFACE:${FK_YAML_NATVIS_FILE}>
)
endif()

###########################
Expand Down Expand Up @@ -124,9 +131,6 @@ endif()
# Install a pkg-config file #
#################################

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkg-config.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc")

###########################
# Build the test apps #
###########################
Expand All @@ -144,28 +148,60 @@ endif()

include(CMakePackageConfigHelpers)

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/fkYAMLConfigVersion.cmake.in"
"${FK_YAML_CMAKE_VERSION_CONFIG_FILE}" @ONLY)
configure_file(
${FK_YAML_CMAKE_CONFIG_TEMPLATE}
${FK_YAML_CMAKE_PROJECT_CONFIG_FILE}
@ONLY
)

configure_file(
${FK_YAML_CMAKE_VERSION_CONFIG_TEMPLATE}
${FK_YAML_CMAKE_VERSION_CONFIG_FILE}
@ONLY
)

configure_file("${FK_YAML_CMAKE_CONFIG_TEMPLATE}" "${FK_YAML_CMAKE_PROJECT_CONFIG_FILE}" @ONLY)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkg-config.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
)

if(FK_YAML_INSTALL)
install(DIRECTORY "${FK_YAML_INCLUDE_BUILD_DIR}" DESTINATION include)
install(FILES "${FK_YAML_CMAKE_PROJECT_CONFIG_FILE}" "${FK_YAML_CMAKE_VERSION_CONFIG_FILE}"
DESTINATION "${FK_YAML_CONFIG_INSTALL_DIR}")
install(
DIRECTORY ${FK_YAML_INCLUDE_BUILD_DIR}
DESTINATION ${FK_YAML_INCLUDE_INSTALL_DIR}
)

install(
FILES ${FK_YAML_CMAKE_PROJECT_CONFIG_FILE} ${FK_YAML_CMAKE_VERSION_CONFIG_FILE}
DESTINATION ${FK_YAML_CONFIG_INSTALL_DIR}
)

if(FK_YAML_INSTALL_NATVIS)
install(FILES ${FK_YAML_NATVIS_FILE}
DESTINATION .)
install(
FILES ${FK_YAML_NATVIS_FILE}
DESTINATION .
)
endif()

export(
TARGETS ${FK_YAML_TARGET_NAME}
NAMESPACE ${PROJECT_NAME}::
FILE "${FK_YAML_CMAKE_PROJECT_TARGETS_FILE}")
install(TARGETS ${FK_YAML_TARGET_NAME} EXPORT ${FK_YAML_TARGETS_EXPORT_NAME})
FILE ${FK_YAML_CMAKE_PROJECT_TARGETS_FILE}
)

install(
TARGETS ${FK_YAML_TARGET_NAME}
EXPORT ${FK_YAML_TARGETS_EXPORT_NAME}
)

install(
EXPORT ${FK_YAML_TARGETS_EXPORT_NAME}
NAMESPACE ${PROJECT_NAME}::
DESTINATION "${FK_YAML_CONFIG_INSTALL_DIR}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
DESTINATION "${FK_YAML_PKGCONFIG_INSTALL_DIR}")
DESTINATION ${FK_YAML_CONFIG_INSTALL_DIR}
)

install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
DESTINATION ${FK_YAML_PKGCONFIG_INSTALL_DIR}
)
endif()
17 changes: 5 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ SRCS = $(shell find include -type f -name '*.hpp' | sort)
SINGLE_SRC = 'single_include/fkYAML/node.hpp'
# list of sources in the test directory.
TEST_SRCS = $(shell find test -type f \( -name '*.hpp' -o -name '*.cpp' \) | sort)
# list of source files in the tool directory.
TOOL_SRCS = $(shell find tool -type f \( -name '*.cpp' -o -name '*.cpp.in' \) | sort)
# list of CMake scripts in the project.
CMAKE_SCRIPTS = $(shell find . -type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) -not -path './thirdparty/*' | sort)

# target version definition
TARGET_MAJOR_VERSION := 0
TARGET_MINOR_VERSION := 3
TARGET_PATCH_VERSION := 1
TARGET_PATCH_VERSION := 2
TARGET_VERSION_FULL := $(TARGET_MAJOR_VERSION).$(TARGET_MINOR_VERSION).$(TARGET_PATCH_VERSION)
VERSION_MACRO_FILE := include/fkYAML/detail/macros/version_macros.hpp

Expand Down Expand Up @@ -123,13 +119,10 @@ update-project-version:
reuse: update-reuse-templates
pipx run reuse annotate $(SRCS) --template fkYAML \
--copyright "Kensuke Fukutani <[email protected]>" --copyright-style spdx \
--license MIT --year 2023 --style c
--license MIT --year "2023-2024" --style c
pipx run reuse annotate $(TEST_SRCS) --template fkYAML_support \
--copyright "Kensuke Fukutani <[email protected]>" --copyright-style spdx \
--license MIT --year 2023 --style c
pipx run reuse annotate $(TOOL_SRCS) --template fkYAML_support \
--copyright "Kensuke Fukutani <[email protected]>" --copyright-style spdx \
--license MIT --year 2023 --style c
--license MIT --year "2023-2024" --style c
pipx run reuse lint

update-sources: reuse update-version-macros
Expand Down Expand Up @@ -162,8 +155,8 @@ lcov-coverage:
# pre-requisites: genhtml lcov
html-coverage: lcov-coverage
genhtml build_coverage/coverage/fkYAML.info --output-directory build_coverage/html \
--title "fkYAML: A C++ header-only YAML library" \
--legend --demangle-cpp --show-details --branch-coverage
--title "fkYAML: A C++ header-only YAML library" \
--legend --demangle-cpp --show-details --branch-coverage

###################
# Maintenance #
Expand Down
Loading

0 comments on commit b7e813b

Please sign in to comment.