Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from jbeder:master #84

Open
wants to merge 107 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
d8d9419
Fix shared library tests for Windows (#1074)
TheVice Dec 15, 2021
bce601f
Support the conversion for std::unordered_map (#932)
dota17 Jan 6, 2022
f8e1a7b
Add MinGW to build pipeline
TheVice Jan 27, 2022
cdf89fa
set POSITION_INDEPENDENT_CODE if BUILD_SHARED_LIBS=OFF (#1076)
christian-rauch Jan 27, 2022
26e3b70
Update old style cast from (T) to static_cast<T>.
Sam4uk Feb 8, 2022
edadfec
Update gtest to 1.11.0 (#1086)
acxz Feb 17, 2022
669af4e
Make YAML_MSVC_SHARED_RT depend on "CMAKE_SYSTEM_NAME MATCHES Windows…
theOtherMichael Apr 1, 2022
a6db7e3
Fix single cr not recognized (#1094)
vehre-x41 Apr 1, 2022
4aad2b1
Fix CMake export files (#1077)
felix2010 Apr 1, 2022
0e6e98e
Extend options that disable testing and formatting to looking for dep…
xiaozhuai Apr 1, 2022
7d06655
Allow yaml-cpp to be installed from another project (#1007)
SpaceIm Apr 3, 2022
4c982d5
Improve build and fix single cr on windows (#1099)
vehre-x41 Apr 19, 2022
13626af
Fix escaping anchors in keys (#1101)
vehre-x41 Apr 21, 2022
420c982
Improve bazel build for Windows. (#1100)
vehre-x41 Apr 27, 2022
190ad50
Remove redundant include (#1110)
hyperxor May 21, 2022
c73ee34
Small perfomance optimization in Directives and Tag methods (#1112)
hyperxor May 31, 2022
e87ed7e
Add the "make uninstall" target (#1130)
Skywol Sep 20, 2022
763b7d6
Fix compilation errors in build for Oracle Solaris OS (#1133)
rdzehtsiar Sep 20, 2022
255bf1f
Install pkgconfig and cmake files into arch-dependent locations (#1055)
tgurr Sep 20, 2022
c86a9e4
Minimize warnings when not the top-level project (#1124)
BMBurstein Sep 20, 2022
85ad599
Basic update to CMakeLists.txt to address #1116 (#1117)
stephematician Sep 20, 2022
97ebcf0
Export library directory and shared libs to CMake config (#1113)
darktohka Sep 20, 2022
4ae4cb7
Support conversion for std::valarray (#956)
sfalmo Sep 20, 2022
1b50109
Include property nodes in the long key check (#1140)
zenno-leaky-bucket Oct 4, 2022
bdc5582
Add tests for iterator and const_iterator on sequence (#1169)
MatthijsBurgh Mar 2, 2023
d7f672d
CI: define read-only permission for GitHub Workflow (#1175)
diogoteles08 Mar 4, 2023
3ff7ab0
Make sure tests are run in CI (#1170)
MatthijsBurgh Mar 4, 2023
55a8037
(appveyor) remove, because testing windows in GH actions (#1176)
MatthijsBurgh Mar 4, 2023
987a604
Delete .travis.yml (#1177)
MatthijsBurgh Mar 4, 2023
74f63c1
Move CTest to test entry (#1181)
jelin-sh Mar 21, 2023
0e6e28d
Revert "Move CTest to test entry (#1181)" (#1182)
jbeder Mar 23, 2023
b888265
Add namespace for the exported targets (#1196)
Ryanf55 Jun 28, 2023
35b4498
node/convert: support conversion for std::string_view (#1148)
tchaikov Jul 24, 2023
f6c8b17
Create Security-Policy (#1189)
diogoteles08 Aug 10, 2023
f732014
Bump version to 0.8.0.
jbeder Aug 10, 2023
c268020
Specify CMake policy range to avoid deprecation warning (#1211)
craigscott-crascit Aug 16, 2023
fcbb819
Fix testsuite with gcc-13 (#1216)
LocutusOfBorg Aug 19, 2023
6262201
node/convert: relax the check for string_view (#1222)
tchaikov Sep 6, 2023
2383e6d
Revert "node/convert: relax the check for string_view (#1222)" (#1225)
tchaikov Sep 10, 2023
016b2e7
CI: test with supported C++ standards (#1226)
tchaikov Sep 10, 2023
9f31491
bzlmodded (#1224)
stonier Sep 17, 2023
d046eea
node/convert: Enable the template specialization for `std::string_vie…
0xFireWolf Sep 17, 2023
37f1b8b
Update How-To-Emit-YAML.md (#976)
pauljurczak Sep 21, 2023
4c061a5
Disable `format` target when not building as the main project (#1231)
threeal Oct 11, 2023
ac144ed
Hide uninstall target unless YAML_CPP_INSTALL is set, and allow it to…
Megamouse Oct 11, 2023
c26e047
CMake: Fixes for generated config (#1212)
FtZPetruska Oct 12, 2023
8106fcf
Resolve warnings about unreferenced parameter 'style' in NullEventHan…
PJayB Oct 12, 2023
4fc5ec3
automatically create bzlmod archive for release (#1230)
zaucy Oct 12, 2023
f791b95
remove unncessary continue-on-error (#1234)
zaucy Oct 12, 2023
145eec5
Add CMake option YAML_USE_SYSTEM_GTEST to use system googletest if av…
LocutusOfBorg Oct 22, 2023
db03655
Make sure CXX_STANDARD can be overridden from outside (#1239)
LocutusOfBorg Oct 23, 2023
30e6933
Fix yaml-cpp-config.cmake.in
Levi-Armstrong Nov 6, 2023
51adc5f
Update yaml-cpp-config.cmake.in
Levi-Armstrong Nov 6, 2023
1c5a38e
workflows/build.yml: Use debug std C++ library on Ubuntu
rico-chet Nov 26, 2023
eaf7205
README.md: Describe building with debug libstdc++ mode
rico-chet Nov 27, 2023
f30582f
ci: hash-pin sensitive workflow dependency
diogoteles08 Dec 13, 2023
c7639e8
ci: configure dependabot to montly update GHAs
diogoteles08 Dec 14, 2023
94710bb
Add default destructor to EmitFromEvents
Levi-Armstrong Dec 28, 2023
c28295b
Add CMake integration example
Trompettesib Oct 13, 2022
9eb1142
Fix GIT_TAG field in cmake integration example
Trompettesib Jan 4, 2024
c67d701
Fix indentation of empty sequences and add test
Alejandro-FA Jan 25, 2024
96f5c88
assign fallback value
Jan 26, 2024
4afd53b
Bump the github-actions group with 1 update
dependabot[bot] Jan 1, 2024
5c1bbbd
Skip Position Independent Code for PSP/PS3
humbertodias Feb 21, 2024
76dc671
Add option YAML_ENABLE_PIC=ON
humbertodias Feb 22, 2024
1d8ca1f
Avoid static reference to temporary
frankosterfeld Apr 11, 2024
b95aa14
fix: use C locale by default
SGSSGene Jul 17, 2024
9f7babc
Use c-strings to constant initialize token array
JosiahWI Aug 1, 2024
b11eaf1
Run format target from project root
JosiahWI Aug 1, 2024
1f5e971
Fix compile warning with -Wshadow
RonsonNamek Aug 5, 2024
04dddd6
Revert "Fix compile warning with -Wshadow"
jbeder Aug 5, 2024
06c3d1d
fix compile warning(Pull requests #1305)(Issues #1306)
RonsonNamek Aug 6, 2024
8fbf344
doc, fix: invalid liquid '{{...}}' tags
SGSSGene Jul 18, 2024
7b469b4
emitterutils: Explicitly include <cstdint>
csfore Aug 15, 2024
b38ac5b
Use FetchContent_MakeAvailable
LecrisUT Aug 21, 2024
ee9c4d1
fix: parse files with '\r' symbols as line ending correctly
SGSSGene Aug 22, 2024
84459a7
fix: missing token enum name
SGSSGene Aug 22, 2024
850ec4f
Fix reference types in iterators
orgads Nov 11, 2020
47cd272
Remove build debug messages
orgads Aug 27, 2024
1f2b841
fix(src,include,test): fixed multiple cases where a bad yaml was acce…
FedeDP Sep 12, 2024
da82fd9
chore(test/integration): refactor some test cases to their own test.
FedeDP Sep 13, 2024
bc67157
fix(src): avoid possible infinite loop in LoadAll().
FedeDP Sep 12, 2024
29c59c0
new(test): added a test to avoid future issues with LoadAll().
FedeDP Sep 13, 2024
c2bec4c
chore(test): moved infiniteloop test to load_node_test suite.
FedeDP Oct 14, 2024
3d2888c
missing keys should throw InvalidNode, not BadConversion
Nov 1, 2024
bd070a7
fix: prettier floating point numbers
SGSSGene Jul 6, 2024
d4e00bd
fix: rename fp_to_string to FpToString to match coding style
SGSSGene Jul 16, 2024
f4bca79
fix: fp_to_string uses now 2 spaces
SGSSGene Jul 16, 2024
72865f7
fix: remove trailing return types
SGSSGene Jul 16, 2024
28c0a1b
doc: add a little more information to dragonbox file
SGSSGene Jul 29, 2024
5d9e4b6
patch: split fp_to_string.h into fptostring.h and fptostring.cpp
SGSSGene Jul 29, 2024
d8de965
patch: move dragonbox.h from 'include' folder to 'src' folder
SGSSGene Jul 30, 2024
82f3c04
fix: add YAML_CPP_API for windows-shared library builds
SGSSGene Jul 30, 2024
0b94541
fix: add missing include
SGSSGene Jul 30, 2024
06ffaf3
remove reduntant license information
SGSSGene Oct 21, 2024
ebfbf27
patch: added more defensive programming techniques
SGSSGene Oct 22, 2024
9ce5a25
fix: spell fix
SGSSGene Oct 22, 2024
f878043
Don't install embedded copy of GTest
PhilMiller Feb 7, 2023
1da813f
ensuring local tags are retained after loading a node + test
IMaloney Oct 12, 2024
7def204
Fix bazel build, and commit module lock file.
jbeder Dec 17, 2024
61db897
Exclude ubuntu/C++ 11/googletest system from the test matrix since it…
jbeder Dec 17, 2024
d45c4fb
Update README.md
jbeder Dec 18, 2024
8a9a7b7
Update CONTRIBUTING.md
jbeder Dec 22, 2024
7470c2d
emitter: Support std::string_view
Oct 20, 2024
73ef006
Avoid including <iostream> in library code
jwnimmer-tri Dec 30, 2024
39f7374
Update README.md
diehlpk Jan 24, 2025
28f93bd
docs: Fix link in README
salim-b Mar 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/gtest-1.11.0
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"

137 changes: 119 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,137 @@ on:
pull_request:
branches: [ master ]
workflow_dispatch:
permissions: read-all
defaults:
run:
shell: bash
jobs:
build:
cmake-build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
cxx_standard: [11, 17, 20]
build: [static, shared]
googletest: [build, system]
generator: ["Default Generator", "MinGW Makefiles"]
exclude:
- os: ubuntu-latest
cxx_standard: 11
googletest: system
- os: macos-latest
build: shared
- os: macos-latest
generator: "MinGW Makefiles"
- os: ubuntu-latest
generator: "MinGW Makefiles"
- os: macos-latest
googletest: system
- os: windows-latest
googletest: system
env:
YAML_BUILD_SHARED_LIBS: ${{ matrix.build == 'shared' && 'ON' || 'OFF' }}
YAML_USE_SYSTEM_GTEST: ${{ matrix.googletest == 'system' && 'ON' || 'OFF' }}
CMAKE_GENERATOR: >-
${{format(matrix.generator != 'Default Generator' && '-G "{0}"' || '', matrix.generator)}}
CMAKE_INSTALL_PREFIX: "${{ github.workspace }}/install-prefix"
CMAKE_BUILD_TYPE: Debug
CMAKE_CXX_FLAGS_DEBUG: ${{ matrix.googletest == 'build' && '-g -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC' || '-g' }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Build static
shell: bash
- uses: awalsh128/cache-apt-pkgs-action@latest
if: matrix.os == 'ubuntu-latest'
with:
packages: googletest libgmock-dev libgtest-dev
version: 1.0

- uses: actions/checkout@v4

- name: Configure
run: |
mkdir -p build && cd build
cmake ..
cmake --build . --parallel 4
cmake \
${{ env.CMAKE_GENERATOR }} \
-S "${{ github.workspace }}" \
-B build \
-D CMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} \
-D CMAKE_INSTALL_PREFIX="${{ env.CMAKE_INSTALL_PREFIX }}" \
-D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \
-D CMAKE_CXX_FLAGS_DEBUG="${{ env.CMAKE_CXX_FLAGS_DEBUG }}" \
-D YAML_BUILD_SHARED_LIBS=${{ env.YAML_BUILD_SHARED_LIBS }} \
-D YAML_USE_SYSTEM_GTEST=${{ env.YAML_USE_SYSTEM_GTEST }} \
-D YAML_CPP_BUILD_TESTS=ON

- name: Test static
- name: Build
run: |
cmake \
--build build \
--config ${{ env.CMAKE_BUILD_TYPE }} \
--verbose \
--parallel

- name: Run Tests
shell: bash
run: cd build && ctest --output-on-failure
run: |
ctest \
--test-dir build \
--build-config ${{ env.CMAKE_BUILD_TYPE }} \
--output-on-failure \
--verbose

- name: Install
run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }}

- name: Configure CMake package test
run: |
cmake \
${{ env.CMAKE_GENERATOR }} \
-S "${{ github.workspace }}/test/cmake" \
-B consumer-build \
-D CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} \
-D CMAKE_PREFIX_PATH="${{ env.CMAKE_INSTALL_PREFIX }}"

- name: Build CMake package test
run: |
cmake \
--build consumer-build \
--config ${{ env.CMAKE_BUILD_TYPE }} \
--verbose

bazel-build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Build
run: |
cd "${{ github.workspace }}"
bazel build :all

- name: Test
run: |
cd "${{ github.workspace }}"
bazel test test

- name: Build shared
bzlmod-build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Build
shell: bash
run: |
rm -rf build && mkdir -p build && cd build
cmake .. -DYAML_BUILD_SHARED_LIBS=ON
cmake --build . --parallel 4
cd "${{ github.workspace }}"
bazel build --enable_bzlmod :all

# tests are failing for unknown reasons
- if: matrix.os == 'ubuntu-latest'
name: Test shared
- name: Test
shell: bash
run: cd build && ctest --output-on-failure
# test all ASAP
run: |
cd "${{ github.workspace }}"
bazel test --enable_bzlmod test
19 changes: 19 additions & 0 deletions .github/workflows/bzlmod-archive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Bazel Release

on:
release:
types: [published]

jobs:
# A release archive is required for bzlmod
# See: https://blog.bazel.build/2023/02/15/github-archive-checksum.html
bazel-release-archive:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: git archive $GITHUB_REF -o "yaml-cpp-${GITHUB_REF:10}.tar.gz"
- run: gh release upload ${GITHUB_REF:10} "yaml-cpp-${GITHUB_REF:10}.tar.gz"
env:
GH_TOKEN: ${{ github.token }}
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
yaml_cpp_defines = select({
# On Windows, ensure static linking is used.
"@platforms//os:windows": ["YAML_CPP_STATIC_DEFINE", "YAML_CPP_NO_CONTRIB"],
"//conditions:default": [],
})

cc_library(
name = "yaml-cpp_internal",
visibility = ["//:__subpackages__"],
Expand All @@ -11,4 +17,5 @@ cc_library(
includes = ["include"],
hdrs = glob(["include/**/*.h"]),
srcs = glob(["src/**/*.cpp", "src/**/*.h"]),
defines = yaml_cpp_defines,
)
Loading