From c5379611e81031984cbafba28f2b4df98d857480 Mon Sep 17 00:00:00 2001
From: Joao Paulo Magalhaes
Date: Mon, 1 Jun 2026 16:54:57 +0100
Subject: [PATCH 1/4] CI: speedup embedded workflow
---
.github/workflows/embedded.yml | 235 ++++++++++++++-------------------
.github/workflows/embedded.ys | 79 ++++++-----
2 files changed, 139 insertions(+), 175 deletions(-)
diff --git a/.github/workflows/embedded.yml b/.github/workflows/embedded.yml
index e889157bd..35fe96569 100644
--- a/.github/workflows/embedded.yml
+++ b/.github/workflows/embedded.yml
@@ -22,16 +22,17 @@ jobs:
canary:
if: always()
continue-on-error: false
- name: ${{matrix.arch}}/c++${{matrix.std}}
+ name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- arch: armv7
+ std: 23
+ bt: Release
tc: arm-linux-gnueabihf
- std: 11
- heavybuild: 0
+ heavybuild: 1
flags: -march=armv7+fp
steps:
- name: checkout (action)
@@ -52,15 +53,15 @@ jobs:
${{matrix.tc}}-g++${{matrix.version}} -dM -E - 1 )) ; then
- numprocs=$(($numprocs / 2))
- fi
- fi
- export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
- cmake --build build --parallel $numprocs --target ryml-test-build
- - name: test ${{matrix.arch}}/c++${{matrix.std}}/Release
+ - name: test ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}
run: |
export CTEST_PARALLEL_LEVEL=`nproc`
cmake --build build --target ryml-test-run
xcompile:
needs:
- canary
- if: always()
continue-on-error: false
- name: ${{matrix.arch}}/c++${{matrix.std}}
+ name: ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- arch: armv7
+ std: 11
+ bt: Debug
tc: arm-linux-gnueabihf
- std: 20
- heavybuild: 1
+ heavybuild: 0
flags: -march=armv7+fp
- arch: armv6
+ std: 23
+ bt: Release
tc: arm-linux-gnueabi
- std: 11
- heavybuild: 0
+ heavybuild: 1
flags: -march=armv6+fp
- arch: armv6
+ std: 11
+ bt: Debug
tc: arm-linux-gnueabi
- std: 20
- heavybuild: 1
+ heavybuild: 0
flags: -march=armv6+fp
- arch: armv5
+ std: 23
+ bt: Release
tc: arm-linux-gnueabi
- std: 11
- heavybuild: 0
+ heavybuild: 1
flags: -march=armv5te+fp
- arch: armv5
+ std: 11
+ bt: Debug
tc: arm-linux-gnueabi
- std: 20
- heavybuild: 1
+ heavybuild: 0
flags: -march=armv5te+fp
- arch: armv4
+ std: 23
+ bt: Release
tc: arm-linux-gnueabi
- std: 11
- heavybuild: 0
+ heavybuild: 1
flags: -march=armv4
- arch: armv4
+ std: 11
+ bt: Debug
tc: arm-linux-gnueabi
- std: 20
- heavybuild: 1
+ heavybuild: 0
flags: -march=armv4
- arch: aarch64
+ std: 23
+ bt: Release
tc: aarch64-linux-gnu
- std: 11
- heavybuild: 1
- - arch: aarch64
- tc: aarch64-linux-gnu
- std: 20
heavybuild: 2
- - arch: loongarch64
- tc: loongarch64-linux-gnu
+ - arch: aarch64
std: 11
- heavybuild: 0
- version: -14
+ bt: Debug
+ tc: aarch64-linux-gnu
+ heavybuild: 1
- arch: loongarch64
+ std: 23
+ bt: Release
tc: loongarch64-linux-gnu
- std: 20
heavybuild: 1
version: -14
- - arch: mips
- tc: mips-linux-gnu
+ - arch: loongarch64
std: 11
+ bt: Debug
+ tc: loongarch64-linux-gnu
heavybuild: 0
+ version: -14
- arch: mips
+ std: 23
+ bt: Release
tc: mips-linux-gnu
- std: 20
heavybuild: 1
- - arch: mipsel
- tc: mipsel-linux-gnu
+ - arch: mips
std: 11
+ bt: Debug
+ tc: mips-linux-gnu
heavybuild: 0
- arch: mipsel
+ std: 23
+ bt: Release
tc: mipsel-linux-gnu
- std: 20
heavybuild: 1
+ - arch: mipsel
+ std: 11
+ bt: Debug
+ tc: mipsel-linux-gnu
+ heavybuild: 0
- arch: mips64
+ std: 23
+ bt: Release
tc: mips64-linux-gnuabi64
- std: 11
heavybuild: 2
- arch: mips64
+ std: 11
+ bt: Debug
tc: mips64-linux-gnuabi64
- std: 20
heavybuild: 2
- arch: mips64el
+ std: 23
+ bt: Release
tc: mips64el-linux-gnuabi64
- std: 11
heavybuild: 2
- arch: mips64el
+ std: 11
+ bt: Debug
tc: mips64el-linux-gnuabi64
- std: 20
heavybuild: 2
- arch: riscv64
+ std: 23
+ bt: Release
tc: riscv64-linux-gnu
- std: 11
- heavybuild: 0
- - arch: riscv64
- tc: riscv64-linux-gnu
- std: 20
heavybuild: 1
- - arch: s390x
- tc: s390x-linux-gnu
+ - arch: riscv64
std: 11
+ bt: Debug
+ tc: riscv64-linux-gnu
heavybuild: 0
- arch: s390x
+ std: 23
+ bt: Release
tc: s390x-linux-gnu
- std: 20
heavybuild: 1
- - arch: ppc
- tc: powerpc-linux-gnu
+ - arch: s390x
std: 11
+ bt: Debug
+ tc: s390x-linux-gnu
heavybuild: 0
- arch: ppc
+ std: 23
+ bt: Release
tc: powerpc-linux-gnu
- std: 20
heavybuild: 1
- - arch: ppc64
- tc: powerpc64-linux-gnu
+ - arch: ppc
std: 11
+ bt: Debug
+ tc: powerpc-linux-gnu
heavybuild: 0
- arch: ppc64
+ std: 23
+ bt: Release
tc: powerpc64-linux-gnu
- std: 20
heavybuild: 1
- - arch: ppc64le
- tc: powerpc64le-linux-gnu
+ - arch: ppc64
std: 11
+ bt: Debug
+ tc: powerpc64-linux-gnu
heavybuild: 0
- arch: ppc64le
+ std: 23
+ bt: Release
tc: powerpc64le-linux-gnu
- std: 20
heavybuild: 1
- - arch: sparc64
- tc: sparc64-linux-gnu
+ - arch: ppc64le
std: 11
+ bt: Debug
+ tc: powerpc64le-linux-gnu
heavybuild: 0
- arch: sparc64
+ std: 23
+ bt: Release
tc: sparc64-linux-gnu
- std: 20
heavybuild: 1
+ - arch: sparc64
+ std: 11
+ bt: Debug
+ tc: sparc64-linux-gnu
+ heavybuild: 0
steps:
- name: checkout (action)
uses: actions/checkout@v4
@@ -280,15 +278,15 @@ jobs:
${{matrix.tc}}-g++${{matrix.version}} -dM -E - 1 )) ; then
- numprocs=$(($numprocs / 2))
- fi
- fi
- export CMAKE_BUILD_PARALLEL_LEVEL=$numprocs
- cmake --build build --parallel $numprocs --target ryml-test-build
- - name: test ${{matrix.arch}}/c++${{matrix.std}}/Release
+ - name: test ${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}
run: |
export CTEST_PARALLEL_LEVEL=`nproc`
cmake --build build --target ryml-test-run
diff --git a/.github/workflows/embedded.ys b/.github/workflows/embedded.ys
index c7d211251..41d64cc68 100644
--- a/.github/workflows/embedded.ys
+++ b/.github/workflows/embedded.ys
@@ -55,7 +55,7 @@
cmake --build build --target ryml-test-run
defn define-job(matrixvar)::
- name:: "${{matrix.arch}}/c++${{matrix.std}}"
+ name:: "${{matrix.arch}}/c++${{matrix.std}}/${{matrix.bt}}"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
@@ -75,48 +75,47 @@
${{matrix.tc}}-g++${{matrix.version}} --version
${{matrix.tc}}-g++${{matrix.version}} -dM -E - : nil
matrix-items =::
- # heavybuild: use less workers to build on:
- # 0: nowhere; always use nproc
- # 1=release
- # 2=release+debug
- - {arch: armv7 , tc: arm-linux-gnueabihf , std: 11, heavybuild: 0, flags: -march=armv7+fp}
- - {arch: armv7 , tc: arm-linux-gnueabihf , std: 20, heavybuild: 1, flags: -march=armv7+fp}
- - {arch: armv6 , tc: arm-linux-gnueabi , std: 11, heavybuild: 0, flags: -march=armv6+fp}
- - {arch: armv6 , tc: arm-linux-gnueabi , std: 20, heavybuild: 1, flags: -march=armv6+fp}
- - {arch: armv5 , tc: arm-linux-gnueabi , std: 11, heavybuild: 0, flags: -march=armv5te+fp}
- - {arch: armv5 , tc: arm-linux-gnueabi , std: 20, heavybuild: 1, flags: -march=armv5te+fp}
- - {arch: armv4 , tc: arm-linux-gnueabi , std: 11, heavybuild: 0, flags: -march=armv4}
- - {arch: armv4 , tc: arm-linux-gnueabi , std: 20, heavybuild: 1, flags: -march=armv4}
- - {arch: aarch64 , tc: aarch64-linux-gnu , std: 11, heavybuild: 1} # this is armv8
- - {arch: aarch64 , tc: aarch64-linux-gnu , std: 20, heavybuild: 2} # this is armv8
- - {arch: loongarch64, tc: loongarch64-linux-gnu , std: 11, heavybuild: 0, version: -14}
- - {arch: loongarch64, tc: loongarch64-linux-gnu , std: 20, heavybuild: 1, version: -14}
- - {arch: mips , tc: mips-linux-gnu , std: 11, heavybuild: 0}
- - {arch: mips , tc: mips-linux-gnu , std: 20, heavybuild: 1}
- - {arch: mipsel , tc: mipsel-linux-gnu , std: 11, heavybuild: 0}
- - {arch: mipsel , tc: mipsel-linux-gnu , std: 20, heavybuild: 1}
- - {arch: mips64 , tc: mips64-linux-gnuabi64 , std: 11, heavybuild: 2}
- - {arch: mips64 , tc: mips64-linux-gnuabi64 , std: 20, heavybuild: 2}
- - {arch: mips64el , tc: mips64el-linux-gnuabi64, std: 11, heavybuild: 2}
- - {arch: mips64el , tc: mips64el-linux-gnuabi64, std: 20, heavybuild: 2}
- - {arch: riscv64 , tc: riscv64-linux-gnu , std: 11, heavybuild: 0}
- - {arch: riscv64 , tc: riscv64-linux-gnu , std: 20, heavybuild: 1}
- - {arch: s390x , tc: s390x-linux-gnu , std: 11, heavybuild: 0}
- - {arch: s390x , tc: s390x-linux-gnu , std: 20, heavybuild: 1}
- - {arch: ppc , tc: powerpc-linux-gnu , std: 11, heavybuild: 0}
- - {arch: ppc , tc: powerpc-linux-gnu , std: 20, heavybuild: 1}
- - {arch: ppc64 , tc: powerpc64-linux-gnu , std: 11, heavybuild: 0}
- - {arch: ppc64 , tc: powerpc64-linux-gnu , std: 20, heavybuild: 1}
- - {arch: ppc64le , tc: powerpc64le-linux-gnu , std: 11, heavybuild: 0}
- - {arch: ppc64le , tc: powerpc64le-linux-gnu , std: 20, heavybuild: 1}
- - {arch: sparc64 , tc: sparc64-linux-gnu , std: 11, heavybuild: 0}
- - {arch: sparc64 , tc: sparc64-linux-gnu , std: 20, heavybuild: 1}
+ # heavybuild: use less workers to build on:
+ # 0: nowhere; always use nproc
+ # 1=release
+ # 2=release+debug
+ - {arch: armv7 , std: 23, bt: Release, tc: arm-linux-gnueabihf , heavybuild: 1, flags: -march=armv7+fp}
+ - {arch: armv7 , std: 11, bt: Debug , tc: arm-linux-gnueabihf , heavybuild: 0, flags: -march=armv7+fp}
+ - {arch: armv6 , std: 23, bt: Release, tc: arm-linux-gnueabi , heavybuild: 1, flags: -march=armv6+fp}
+ - {arch: armv6 , std: 11, bt: Debug , tc: arm-linux-gnueabi , heavybuild: 0, flags: -march=armv6+fp}
+ - {arch: armv5 , std: 23, bt: Release, tc: arm-linux-gnueabi , heavybuild: 1, flags: -march=armv5te+fp}
+ - {arch: armv5 , std: 11, bt: Debug , tc: arm-linux-gnueabi , heavybuild: 0, flags: -march=armv5te+fp}
+ - {arch: armv4 , std: 23, bt: Release, tc: arm-linux-gnueabi , heavybuild: 1, flags: -march=armv4}
+ - {arch: armv4 , std: 11, bt: Debug , tc: arm-linux-gnueabi , heavybuild: 0, flags: -march=armv4}
+ - {arch: aarch64 , std: 23, bt: Release, tc: aarch64-linux-gnu , heavybuild: 2} # this is armv8
+ - {arch: aarch64 , std: 11, bt: Debug , tc: aarch64-linux-gnu , heavybuild: 1} # this is armv8
+ - {arch: loongarch64, std: 23, bt: Release, tc: loongarch64-linux-gnu , heavybuild: 1, version: -14}
+ - {arch: loongarch64, std: 11, bt: Debug , tc: loongarch64-linux-gnu , heavybuild: 0, version: -14}
+ - {arch: mips , std: 23, bt: Release, tc: mips-linux-gnu , heavybuild: 1}
+ - {arch: mips , std: 11, bt: Debug , tc: mips-linux-gnu , heavybuild: 0}
+ - {arch: mipsel , std: 23, bt: Release, tc: mipsel-linux-gnu , heavybuild: 1}
+ - {arch: mipsel , std: 11, bt: Debug , tc: mipsel-linux-gnu , heavybuild: 0}
+ - {arch: mips64 , std: 23, bt: Release, tc: mips64-linux-gnuabi64 , heavybuild: 2}
+ - {arch: mips64 , std: 11, bt: Debug , tc: mips64-linux-gnuabi64 , heavybuild: 2}
+ - {arch: mips64el , std: 23, bt: Release, tc: mips64el-linux-gnuabi64, heavybuild: 2}
+ - {arch: mips64el , std: 11, bt: Debug , tc: mips64el-linux-gnuabi64, heavybuild: 2}
+ - {arch: riscv64 , std: 23, bt: Release, tc: riscv64-linux-gnu , heavybuild: 1}
+ - {arch: riscv64 , std: 11, bt: Debug , tc: riscv64-linux-gnu , heavybuild: 0}
+ - {arch: s390x , std: 23, bt: Release, tc: s390x-linux-gnu , heavybuild: 1}
+ - {arch: s390x , std: 11, bt: Debug , tc: s390x-linux-gnu , heavybuild: 0}
+ - {arch: ppc , std: 23, bt: Release, tc: powerpc-linux-gnu , heavybuild: 1}
+ - {arch: ppc , std: 11, bt: Debug , tc: powerpc-linux-gnu , heavybuild: 0}
+ - {arch: ppc64 , std: 23, bt: Release, tc: powerpc64-linux-gnu , heavybuild: 1}
+ - {arch: ppc64 , std: 11, bt: Debug , tc: powerpc64-linux-gnu , heavybuild: 0}
+ - {arch: ppc64le , std: 23, bt: Release, tc: powerpc64le-linux-gnu , heavybuild: 1}
+ - {arch: ppc64le , std: 11, bt: Debug , tc: powerpc64le-linux-gnu , heavybuild: 0}
+ - {arch: sparc64 , std: 23, bt: Release, tc: sparc64-linux-gnu , heavybuild: 1}
+ - {arch: sparc64 , std: 11, bt: Debug , tc: sparc64-linux-gnu , heavybuild: 0}
# TODO xtensa!
@@ -128,7 +127,7 @@ jobs:
xcompile:
needs: [canary]
- :: setup-job('embedded' 'xcompile')
+ :: setup-dependent-job('embedded' 'xcompile')
:: define-job(rest(matrix-items))
From 78dedac0e00a88bd9d123a062de9614f720401d2 Mon Sep 17 00:00:00 2001
From: Joao Paulo Magalhaes
Date: Sat, 13 Jun 2026 14:54:26 +0100
Subject: [PATCH 2/4] CI: update actions
---
.github/workflows/bash/clang-checkout.bash | 11 ----
.github/workflows/benchmarks.yml | 10 ++--
.github/workflows/benchmarks.ys | 2 +-
.github/workflows/clang.yml | 10 ++--
.github/workflows/clang.ys | 2 +-
.github/workflows/clang_tidy.yml | 2 +-
.github/workflows/codeql.yml | 2 +-
.github/workflows/codeql.ys | 2 +-
.github/workflows/coverage.yml | 4 +-
.github/workflows/coverage.ys | 2 +-
.github/workflows/embedded.yml | 4 +-
.github/workflows/emscripten.yml | 4 +-
.github/workflows/emscripten.ys | 4 +-
.github/workflows/gcc.yml | 6 +--
.github/workflows/infra.yml | 4 +-
.github/workflows/install.yml | 6 ++-
.github/workflows/install.ys | 6 ++-
.github/workflows/macosx.yml | 2 +-
.github/workflows/release.yml | 60 +++++++---------------
.github/workflows/release.ys | 53 +++++++++----------
.github/workflows/samples.yml | 2 +-
.github/workflows/windows.yml | 10 ++--
.github/workflows/ys/common.ys | 8 +--
23 files changed, 93 insertions(+), 123 deletions(-)
delete mode 100644 .github/workflows/bash/clang-checkout.bash
diff --git a/.github/workflows/bash/clang-checkout.bash b/.github/workflows/bash/clang-checkout.bash
deleted file mode 100644
index dd6c74143..000000000
--- a/.github/workflows/bash/clang-checkout.bash
+++ /dev/null
@@ -1,11 +0,0 @@
-set -x
-echo GITHUB_REF=$GITHUB_REF
-echo GITHUB_HEAD_REF=$GITHUB_HEAD_REF
-branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} # https://stackoverflow.com/questions/58033366
-echo branch=$branch
-git init -q .
-git config --system --add safe.directory '*' # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169
-git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
-git fetch origin $branch
-git reset --hard FETCH_HEAD
-git submodule update --init --recursive
diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml
index 2e7ab6322..f4d7e733c 100644
--- a/.github/workflows/benchmarks.yml
+++ b/.github/workflows/benchmarks.yml
@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -61,7 +61,7 @@ jobs:
export SRC_VERSION=$SRC_VERSION
EOF
- name: Save vars.sh
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with:
name: vars.sh
path: ./vars.sh
@@ -123,12 +123,12 @@ jobs:
OS: ${{matrix.os}}
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Download vars.sh
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: vars.sh
path: ./
@@ -196,7 +196,7 @@ jobs:
mv -vf build/$bl/bm/bm-results/* $dst/.
done
- name: upload benchmark result artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with:
name: ryml-benchmark_results-${{strategy.job-index}}
path: ryml-benchmark_results/
diff --git a/.github/workflows/benchmarks.ys b/.github/workflows/benchmarks.ys
index d63d03016..c052e9295 100644
--- a/.github/workflows/benchmarks.ys
+++ b/.github/workflows/benchmarks.ys
@@ -70,7 +70,7 @@ jobs:
mv -vf build/$bl/bm/bm-results/* $dst/.
done
- name: upload benchmark result artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with:
name: ryml-benchmark_results-${{strategy.job-index}}
path: ryml-benchmark_results/
diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml
index e1ad94b60..15541a8d0 100644
--- a/.github/workflows/clang.yml
+++ b/.github/workflows/clang.yml
@@ -39,7 +39,7 @@ jobs:
bitlinks: shared64 static32
steps:
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -112,7 +112,7 @@ jobs:
bitlinks: shared64 static32
steps:
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -186,7 +186,7 @@ jobs:
bitlinks: shared64 static32
steps:
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -260,7 +260,7 @@ jobs:
bitlinks: shared64 static32
steps:
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -1303,7 +1303,7 @@ jobs:
OS: ${{matrix.os}}
steps:
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
diff --git a/.github/workflows/clang.ys b/.github/workflows/clang.ys
index 7d1242af1..27f2d1247 100644
--- a/.github/workflows/clang.ys
+++ b/.github/workflows/clang.ys
@@ -219,7 +219,7 @@ jobs:
# env:: load('share/env.yaml')
#
# steps:
-# - {name: checkout, uses: actions/checkout@v4,
+# - {name: checkout, uses: actions/checkout@v6,
# with: {submodules: recursive}}
# # needed for running in the docker image.
# # see https://github.com/actions/checkout/issues/1169
diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml
index c730a7683..e30f8c216 100644
--- a/.github/workflows/clang_tidy.yml
+++ b/.github/workflows/clang_tidy.yml
@@ -44,7 +44,7 @@ jobs:
OS: ${{matrix.os}}
steps:
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 099cb62e3..e9c8c5096 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -25,7 +25,7 @@ jobs:
- cpp
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
- name: Initialize CodeQL
diff --git a/.github/workflows/codeql.ys b/.github/workflows/codeql.ys
index fdb59f5f7..8adde9473 100644
--- a/.github/workflows/codeql.ys
+++ b/.github/workflows/codeql.ys
@@ -24,7 +24,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index c9d1ffb96..d4c3e5a19 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -58,7 +58,7 @@ jobs:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -111,7 +111,7 @@ jobs:
export CTEST_PARALLEL_LEVEL=`nproc`
cmake --build build/$BUILD_ID --verbose --target ryml-coverage
- name: upload artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
with:
name: coverage-${{env.BUILD_ID}}
path: |
diff --git a/.github/workflows/coverage.ys b/.github/workflows/coverage.ys
index 76157d6e1..8c75db172 100644
--- a/.github/workflows/coverage.ys
+++ b/.github/workflows/coverage.ys
@@ -77,7 +77,7 @@ jobs:
export CTEST_PARALLEL_LEVEL=`nproc`
cmake --build build/$BUILD_ID --verbose --target ryml-coverage
- name: upload artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
with:
name: coverage-${{env.BUILD_ID}}
path: |
diff --git a/.github/workflows/embedded.yml b/.github/workflows/embedded.yml
index 35fe96569..efb442fe8 100644
--- a/.github/workflows/embedded.yml
+++ b/.github/workflows/embedded.yml
@@ -36,7 +36,7 @@ jobs:
flags: -march=armv7+fp
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -261,7 +261,7 @@ jobs:
heavybuild: 0
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml
index 8a8a62eec..9f1b615cb 100644
--- a/.github/workflows/emscripten.yml
+++ b/.github/workflows/emscripten.yml
@@ -65,12 +65,12 @@ jobs:
CMAKE_FLAGS: -DRYML_TEST_SUITE=OFF
steps:
- name: checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
- name: setup emscripten cache
id: cache-system-libraries
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: ${{env.EMSCRIPTEN_CACHE_FOLDER}}
key: ${{matrix.emver}}-${{runner.os}}
diff --git a/.github/workflows/emscripten.ys b/.github/workflows/emscripten.ys
index e57784a9a..1aef34da1 100644
--- a/.github/workflows/emscripten.ys
+++ b/.github/workflows/emscripten.ys
@@ -30,11 +30,11 @@ jobs:
+ {'CMAKE_FLAGS' '-DRYML_TEST_SUITE=OFF'}
steps:
- name: checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with: {submodules: recursive}
- name: setup emscripten cache
id: cache-system-libraries
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: ${{env.EMSCRIPTEN_CACHE_FOLDER}}
key: ${{matrix.emver}}-${{runner.os}}
diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml
index 0c11c9053..ff98a434c 100644
--- a/.github/workflows/gcc.yml
+++ b/.github/workflows/gcc.yml
@@ -679,7 +679,7 @@ jobs:
OS: ${{matrix.os}}
steps:
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -750,7 +750,7 @@ jobs:
OS: ${{matrix.os}}
steps:
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -1768,7 +1768,7 @@ jobs:
OS: ${{matrix.os}}
steps:
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
diff --git a/.github/workflows/infra.yml b/.github/workflows/infra.yml
index 243d7b880..2977edabd 100644
--- a/.github/workflows/infra.yml
+++ b/.github/workflows/infra.yml
@@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -51,7 +51,7 @@ jobs:
DOXY_DIR: /tmp/doxydir
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml
index e399920ef..21dd09d76 100644
--- a/.github/workflows/install.yml
+++ b/.github/workflows/install.yml
@@ -134,7 +134,7 @@ jobs:
PDIR: prefix/${{matrix.name}}-${{matrix.bt}}
steps:
- name: checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
- name: install requirements
@@ -172,6 +172,10 @@ jobs:
${{matrix.commonvars}}
- name: build
run: |
+ if [ "${{matrix.sdir}}" == "test/test_singleheader" ] ; then
+ cmake --build $BDIR --config ${{matrix.bt}} --target ryml_hdr_ints
+ cmake --build $BDIR --config ${{matrix.bt}} --target ryml_hdr_all
+ fi
cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j
- name: run
run: |
diff --git a/.github/workflows/install.ys b/.github/workflows/install.ys
index bf2ff9b29..21279be60 100644
--- a/.github/workflows/install.ys
+++ b/.github/workflows/install.ys
@@ -50,7 +50,7 @@ jobs:
steps:
- name: checkout
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with: {submodules: recursive}
- name: install requirements
run: source .github/reqs.sh && c4_install_test_requirements $OS
@@ -84,6 +84,10 @@ jobs:
${{matrix.commonvars}}
- name: build
run: |
+ if [ "${{matrix.sdir}}" == "test/test_singleheader" ] ; then
+ cmake --build $BDIR --config ${{matrix.bt}} --target ryml_hdr_ints
+ cmake --build $BDIR --config ${{matrix.bt}} --target ryml_hdr_all
+ fi
cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j
- name: run
run: |
diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml
index e0f32903b..4d0c4e4a4 100644
--- a/.github/workflows/macosx.yml
+++ b/.github/workflows/macosx.yml
@@ -58,7 +58,7 @@ jobs:
OS: ${{matrix.os}}
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 513e21135..04b611efb 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -67,7 +67,7 @@ jobs:
export SRC_VERSION=$SRC_VERSION
EOF
- name: Save vars.sh
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with:
name: vars.sh
path: ./vars.sh
@@ -97,12 +97,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Download vars.sh
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: vars.sh
path: ./
@@ -146,7 +146,7 @@ jobs:
python --version
python tools/amalgamate.py assets/$id.hpp
- name: Save source artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with:
name: assets-src
path: assets/
@@ -172,34 +172,14 @@ jobs:
gen: DEB
mime: vnd.debian.binary-package
os: ubuntu-24.04
- - name: Ubuntu 22.04 deb
- sfxg: unix64.deb
- sfxp: ubuntu-22.04.deb
- gen: DEB
- mime: vnd.debian.binary-package
- os: ubuntu-22.04
- - name: Windows VS2022 zip
- sfxg: win64.zip
- sfxp: windows-vs2022.zip
- gen: ZIP
- mime: zip
- os: windows-2022
- cxx: vs2022
- - name: MacOSX sh
- sfxg: apple64.sh
- sfxp: macosx-xcode.sh
- gen: STGZ
- mime: x-sh
- os: macos-latest
- cxx: xcode
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Download vars.sh
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: vars.sh
path: ./
@@ -242,7 +222,7 @@ jobs:
[ ! -f $asset_src ] && exit 1
cp -fav $asset_src $asset_dst
- name: Save artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with:
name: assets-${{matrix.config.sfxp}}
path: assets/
@@ -255,7 +235,7 @@ jobs:
- cpp
steps:
- name: Merge assets artifacts
- uses: actions/upload-artifact/merge@v4
+ uses: actions/upload-artifact/merge@v7
with:
name: assets
pattern: assets-*
@@ -269,12 +249,12 @@ jobs:
- merge_artifacts
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Download vars.sh
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: vars.sh
path: ./
@@ -302,28 +282,24 @@ jobs:
ls -lFhp .
ls -lFhp assets*/ || echo 'none found'
- name: Gather artifacts - ./assets
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
pattern: assets
- - name: Gather artifacts - ./dist
- uses: actions/download-artifact@v4
- with:
- pattern: dist
- name: Verify existing artifacts
run: |
+ mkdir -p assets
ls -lFhp .
ls -lFhp assets*/ || echo 'none found'
( \
- cd assets ; \
- for asset in assets-*/ ; do \
- ls -lFhpA $asset/ ; \
- mv -v $asset/* . ; \
- rmdir $asset ; \
+ for a in assets-*/ ; do \
+ ls -lFhpA $a/ ; \
+ mv -v $a/* assets/. ; \
+ rmdir $a ; \
done ;
)
ls -lFhp assets*/ || echo 'none found'
- name: Download vars.sh
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with:
name: vars.sh
path: ./
diff --git a/.github/workflows/release.ys b/.github/workflows/release.ys
index e1afd2576..5ce2359d7 100644
--- a/.github/workflows/release.ys
+++ b/.github/workflows/release.ys
@@ -74,7 +74,7 @@ jobs:
python --version
python tools/amalgamate.py assets/$id.hpp
- name: Save source artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with: {name: assets-src, path: assets/}
#----------------------------------------------------------------------------
@@ -100,22 +100,22 @@ jobs:
sfxg: unix64.deb,
sfxp: ubuntu-24.04.deb,
gen: DEB, mime: vnd.debian.binary-package, os: ubuntu-24.04}
- - {name: Ubuntu 22.04 deb,
- sfxg: unix64.deb,
- sfxp: ubuntu-22.04.deb,
- gen: DEB, mime: vnd.debian.binary-package, os: ubuntu-22.04}
- #- {name: Ubuntu 18.04 deb,
- # sfxg: unix64.deb,
- # sfxp: ubuntu-18.04.deb,
- # gen: DEB, mime: vnd.debian.binary-package, os: ubuntu-18.04}
- - {name: Windows VS2022 zip,
- sfxg: win64.zip,
- sfxp: windows-vs2022.zip,
- gen: ZIP, mime: zip, os: windows-2022, cxx: vs2022}
- - {name: MacOSX sh,
- sfxg: apple64.sh,
- sfxp: macosx-xcode.sh,
- gen: STGZ, mime: x-sh, os: macos-latest, cxx: xcode}
+ #- {name: Ubuntu 22.04 deb,
+ # sfxg: unix64.deb,
+ # sfxp: ubuntu-22.04.deb,
+ # gen: DEB, mime: vnd.debian.binary-package, os: ubuntu-22.04}
+ ##- {name: Ubuntu 18.04 deb,
+ ## sfxg: unix64.deb,
+ ## sfxp: ubuntu-18.04.deb,
+ ## gen: DEB, mime: vnd.debian.binary-package, os: ubuntu-18.04}
+ # - {name: Windows VS2022 zip,
+ # sfxg: win64.zip,
+ # sfxp: windows-vs2022.zip,
+ # gen: ZIP, mime: zip, os: windows-2022, cxx: vs2022}
+ # - {name: MacOSX sh,
+ # sfxg: apple64.sh,
+ # sfxp: macosx-xcode.sh,
+ # gen: STGZ, mime: x-sh, os: macos-latest, cxx: xcode}
steps:
- :: checkout-action
- :: version-get-vars
@@ -139,7 +139,7 @@ jobs:
[ ! -f $asset_src ] && exit 1
cp -fav $asset_src $asset_dst
- name: Save artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with: {name: 'assets-${{matrix.config.sfxp}}', path: assets/}
#----------------------------------------------------------------------------
@@ -149,7 +149,7 @@ jobs:
needs: [src, cpp]
steps:
- name: Merge assets artifacts
- uses: actions/upload-artifact/merge@v4
+ uses: actions/upload-artifact/merge@v7
with:
name: assets
pattern: assets-*
@@ -170,21 +170,18 @@ jobs:
ls -lFhp .
ls -lFhp assets*/ || echo 'none found'
- name: Gather artifacts - ./assets
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with: {pattern: assets}
- - name: Gather artifacts - ./dist
- uses: actions/download-artifact@v4
- with: {pattern: dist}
- name: Verify existing artifacts
run: |
+ mkdir -p assets
ls -lFhp .
ls -lFhp assets*/ || echo 'none found'
( \
- cd assets ; \
- for asset in assets-*/ ; do \
- ls -lFhpA $asset/ ; \
- mv -v $asset/* . ; \
- rmdir $asset ; \
+ for a in assets-*/ ; do \
+ ls -lFhpA $a/ ; \
+ mv -v $a/* assets/. ; \
+ rmdir $a ; \
done ;
)
ls -lFhp assets*/ || echo 'none found'
diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml
index 7a31f8848..fe37677c4 100644
--- a/.github/workflows/samples.yml
+++ b/.github/workflows/samples.yml
@@ -88,7 +88,7 @@ jobs:
CMANY: 'ON'
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 29a711469..d615b688e 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -80,7 +80,7 @@ jobs:
arch: Win32
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -232,7 +232,7 @@ jobs:
arch: Win32
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -344,7 +344,7 @@ jobs:
arch: Win32
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -427,7 +427,7 @@ jobs:
arch: Win32
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
@@ -560,7 +560,7 @@ jobs:
cxx: -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc
steps:
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
diff --git a/.github/workflows/ys/common.ys b/.github/workflows/ys/common.ys
index 67d5f9f9a..773cfa283 100644
--- a/.github/workflows/ys/common.ys
+++ b/.github/workflows/ys/common.ys
@@ -73,7 +73,7 @@ install-python-action =::
#----------------------------------------------------------
checkout-action =::
- name: checkout (action)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
# use fetch-depth to ensure all tags are fetched
with: {submodules: recursive, fetch-depth: 0}
@@ -81,7 +81,7 @@ checkout-action =::
#----------------------------------------------------------
checkout-action-docker =::
- name: checkout (action + docker)
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
# use fetch-depth to ensure all tags are fetched
with: {submodules: recursive, fetch-depth: 0}
# needed for running in the docker image.
@@ -197,7 +197,7 @@ version-discover =::
export SRC_VERSION=$SRC_VERSION
EOF
- name: Save vars.sh
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with: {name: vars.sh, path: ./vars.sh}
- name: Show vars.sh
run: cat vars.sh
@@ -210,7 +210,7 @@ version-discover =::
version-get-vars =::
- name: Download vars.sh
- uses: actions/download-artifact@v4
+ uses: actions/download-artifact@v7
with: {name: vars.sh, path: ./}
- name: Show vars.sh
run: cat vars.sh
From 5929d8d3af3dba09b0ccdc2b0f18e1b3520da0a1 Mon Sep 17 00:00:00 2001
From: Joao Paulo Magalhaes
Date: Fri, 5 Jun 2026 12:56:24 +0100
Subject: [PATCH 3/4] Fix clang-tidy warnings with clang++ 22
---
.clang-tidy | 3 ++
.github/workflows/clang_tidy.yml | 4 +--
.github/workflows/clang_tidy.ys | 4 +--
bm/bm_common.hpp | 1 +
src/c4/yml/event_handler_tree.hpp | 2 +-
src/c4/yml/file.hpp | 2 +-
src/c4/yml/parse_engine.def.hpp | 2 +-
src/c4/yml/tag.cpp | 4 ++-
src_extra/c4/yml/extra/event_handler_ints.cpp | 3 +-
src_extra/c4/yml/extra/event_handler_ints.hpp | 28 +++++++++----------
src_extra/c4/yml/extra/ints_to_testsuite.cpp | 15 +++++-----
src_extra/c4/yml/extra/ints_utils.cpp | 10 +++----
12 files changed, 43 insertions(+), 35 deletions(-)
diff --git a/.clang-tidy b/.clang-tidy
index 167fadb33..6a9850212 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -79,7 +79,9 @@ Checks:
- -modernize-type-traits # use c++17 style variable templates
- -modernize-use-auto # use auto when initializing with a cast to avoid duplicating the type name
- -modernize-use-default-member-init # use default member initializer for 'm_pos'
+ - -modernize-use-designated-initializers
- -modernize-use-nodiscard # function 'valid' should be marked nodiscard
+ - -modernize-use-std-print
- -modernize-use-trailing-return-type # don't care about this
- -modernize-use-using # use 'using' instead of 'typedef'
- -performance-enum-size # enum '_ppstate' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size
@@ -98,6 +100,7 @@ Checks:
- -readability-redundant-access-specifiers # redundant access specifier has the same accessibility as the previous access specifier
- -readability-redundant-member-init # initializer for member 'm_arena' is redundant
- -readability-redundant-parentheses # redundant parentheses around expression
+ - -readability-redundant-typename
- -readability-simplify-boolean-expr # boolean expression can be simplified by DeMorgan's theorem
- -readability-suspicious-call-argument # 1st argument 'after' (passed to 'node') looks like it might be swapped with the 2nd, 'node' (passed to 'sib')
- -readability-uppercase-literal-suffix # integer literal has suffix 'u', which is not uppercase
diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml
index e30f8c216..93e92bf28 100644
--- a/.github/workflows/clang_tidy.yml
+++ b/.github/workflows/clang_tidy.yml
@@ -23,14 +23,14 @@ jobs:
if: always()
continue-on-error: false
runs-on: ubuntu-24.04
- container: ghcr.io/biojppm/c4core/ubuntu22.04:latest
+ container: ghcr.io/biojppm/c4core/ubuntu24.04:latest
name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}}
strategy:
fail-fast: false
matrix:
include:
- std: 11
- clang: 18
+ clang: 22
bt: Debug
bits: 64
env:
diff --git a/.github/workflows/clang_tidy.ys b/.github/workflows/clang_tidy.ys
index 54733cfa9..6fed251c6 100644
--- a/.github/workflows/clang_tidy.ys
+++ b/.github/workflows/clang_tidy.ys
@@ -5,13 +5,13 @@
jobs:
clang_tidy:
- :: setup-job('clang_tidy' 'clang_tidy') + runs-on-docker-c4core('22.04')
+ :: setup-job('clang_tidy' 'clang_tidy') + runs-on-docker-c4core('24.04')
name: clang_tidy/c++${{matrix.std}}/${{matrix.bt}}
strategy:
fail-fast: false
matrix:
include:
- - {std: 11, clang: 18, bt: Debug, bits: 64}
+ - {std: 11, clang: 22, bt: Debug, bits: 64}
env:: load('share/env.yaml')
steps:
- :: checkout-action-docker
diff --git a/bm/bm_common.hpp b/bm/bm_common.hpp
index 9850e3cf6..151616d55 100644
--- a/bm/bm_common.hpp
+++ b/bm/bm_common.hpp
@@ -46,6 +46,7 @@
# pragma GCC diagnostic ignored "-Wshadow"
# pragma GCC diagnostic ignored "-Wunused-parameter"
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+# pragma GCC diagnostic ignored "-Wunused-const-variable"
# pragma GCC diagnostic ignored "-Wfloat-equal"
# pragma GCC diagnostic ignored "-Wpedantic"
# pragma GCC diagnostic ignored "-Wuseless-cast"
diff --git a/src/c4/yml/event_handler_tree.hpp b/src/c4/yml/event_handler_tree.hpp
index 12288b187..8de1a708b 100644
--- a/src/c4/yml/event_handler_tree.hpp
+++ b/src/c4/yml/event_handler_tree.hpp
@@ -43,7 +43,7 @@ struct EventHandlerTree : public EventHandlerStack s.len)
return npos;
- for(size_t i = s.len-indentation-1; i != size_t(-1); --i)
+ for(size_t i = s.len-indentation-1; i != size_t(-1); --i) // NOLINT
{
if(s.str[i] == '\n')
{
diff --git a/src/c4/yml/tag.cpp b/src/c4/yml/tag.cpp
index d7623df26..697f44814 100644
--- a/src/c4/yml/tag.cpp
+++ b/src/c4/yml/tag.cpp
@@ -314,7 +314,9 @@ size_t transform_tag(substr output, csubstr handle, csubstr prefix, csubstr tag,
if(C4_LIKELY(is_valid_tag_char(c)))
{
if(c != '%')
+ {
continue;
+ }
else if(read_hex_char(rest, pos, &c))
{
appendstr(rest.range(rpos, pos));
@@ -563,7 +565,7 @@ TagCache::LookupResult TagCache::find(csubstr tag, id_type doc_id, id_type linea
id_type count = sz;
while(count)
{
- id_type halfsz = count / id_type(2);
+ id_type halfsz = count / id_type(2); // NOLINT(*avoid-c-style-cast)
id_type mid = first + halfsz;
_RYML_ASSERT_BASIC_(m_entries.m_callbacks, mid < sz);
Entry const& C4_RESTRICT e = m_entries[mid];
diff --git a/src_extra/c4/yml/extra/event_handler_ints.cpp b/src_extra/c4/yml/extra/event_handler_ints.cpp
index 90d113012..0c85b62dc 100644
--- a/src_extra/c4/yml/extra/event_handler_ints.cpp
+++ b/src_extra/c4/yml/extra/event_handler_ints.cpp
@@ -63,6 +63,7 @@ RYML_EXPORT int32_t estimate_events_ints_size(csubstr src)
return count;
}
+// NOLINTBEGIN(hicpp-signed-bitwise)
// ensure the ievt flags work despite being signed
namespace ievt {
static_assert((MASK & BSTR) == BSTR, "overflow?");
@@ -93,9 +94,9 @@ static_assert((MASK & AREN) == AREN, "overflow?");
static_assert((MASK & PSTR) == PSTR, "overflow?");
static_assert((MASK & UNFILT) == UNFILT, "overflow?");
static_assert((MASK & LAST) == LAST, "overflow?");
-static_assert((MASK & MASK) == MASK, "overflow?");
static_assert((MASK & WSTR) == WSTR, "overflow?");
} // namespace ievt
+// NOLINTEND(hicpp-signed-bitwise)
} // namespace extra
} // namespace yml
diff --git a/src_extra/c4/yml/extra/event_handler_ints.hpp b/src_extra/c4/yml/extra/event_handler_ints.hpp
index d5eab1c38..3453b9a02 100644
--- a/src_extra/c4/yml/extra/event_handler_ints.hpp
+++ b/src_extra/c4/yml/extra/event_handler_ints.hpp
@@ -24,7 +24,7 @@
#endif
#endif
-// NOLINTBEGIN(hicpp-signed-bitwise)
+// NOLINTBEGIN(hicpp-signed-bitwise,*avoid-c-style-cast)
namespace c4 {
namespace yml {
@@ -41,7 +41,7 @@ namespace ievt {
using DataType = int32_t;
/** enumeration of integer event bits. */
-typedef enum : DataType {
+typedef enum : DataType { // NOLINT
// Structure flags
KEY_ = (1 << 0), ///< as key
@@ -441,7 +441,7 @@ struct EventHandlerInts : public c4::yml::EventHandlerStack{}", i, m_evt_size, m_evt[i+1]); \
+ m_evt[(i) + 1] = (ievt::DataType)((scalar).str - m_arena.str); \
+ _c4dbgpf("{}/{}: arena! ->{}", i, m_evt_size, m_evt[(i)+1]); \
} \
- m_evt[i + 2] = (ievt::DataType)scalar.len; \
- m_evt[i + 3] = ievt::PSTR
+ m_evt[(i) + 2] = (ievt::DataType)(scalar).len; \
+ m_evt[(i) + 3] = ievt::PSTR
/** @endcond */
public:
@@ -1073,7 +1073,7 @@ struct EventHandlerInts : public c4::yml::EventHandlerStack= 0)
&& (evts[evtpos + 2] >= 0)
- && (evts[evtpos + 1] <= (int)region.len)
- && (evts[evtpos + 2] <= ((int)region.len - evts[evtpos + 1]));
+ && (evts[evtpos + 1] <= (ievt::DataType)region.len) // NOLINT(use-integer-sign-comparison) // clang-tidy is wrong here
+ && (evts[evtpos + 2] <= ((ievt::DataType)region.len - evts[evtpos + 1]));
const char *str = safe ? (region.str + evts[evtpos + 1]) : "ERR!!!";
- int len = safe ? evts[evtpos + 2] : 6;
+ ievt::DataType len = safe ? evts[evtpos + 2] : 6;
printf(": %d [%d]~~~%.*s~~~", evts[evtpos+1], evts[evtpos+2], len, str);
if(in_arena)
printf(" (arenasz=%zu)", arena.len);
@@ -126,6 +126,6 @@ void events_ints_print(csubstr parsed_yaml, csubstr arena, ievt::DataType const*
} // namespace yml
} // namespace c4
-// NOLINTEND(hicpp-signed-bitwise)
+// NOLINTEND(hicpp-signed-bitwise,*avoid-c-style-cast)
C4_SUPPRESS_WARNING_CLANG_POP
C4_SUPPRESS_WARNING_GCC_POP
From a6b181c426c457c96889b2c67870351ecc8be571 Mon Sep 17 00:00:00 2001
From: Joao Paulo Magalhaes
Date: Sat, 13 Jun 2026 14:24:36 +0100
Subject: [PATCH 4/4] CI: fix flaky single header tests
---
.github/workflows/install.yml | 3 ++-
.github/workflows/install.ys | 3 ++-
test/CMakeLists.txt | 1 -
test/test_singleheader/CMakeLists.txt | 13 ++++++++-----
4 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml
index 21dd09d76..6a2a1a6d6 100644
--- a/.github/workflows/install.yml
+++ b/.github/workflows/install.yml
@@ -179,4 +179,5 @@ jobs:
cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j
- name: run
run: |
- cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-run
+ cd $BDIR/test
+ ctest -C ${{matrix.bt}} --output-on-failure
diff --git a/.github/workflows/install.ys b/.github/workflows/install.ys
index 21279be60..92c5a9127 100644
--- a/.github/workflows/install.ys
+++ b/.github/workflows/install.ys
@@ -91,4 +91,5 @@ jobs:
cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-build -j
- name: run
run: |
- cmake --build $BDIR --config ${{matrix.bt}} --target ryml-test-run
+ cd $BDIR/test
+ ctest -C ${{matrix.bt}} --output-on-failure
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 9ed3a160b..2f81efa34 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -421,7 +421,6 @@ if(RYML_FUZZ_TEST OR RYML_FUZZ_DRIVERS)
# will then iterate over the files. this generates only a
# handful of unit tests, so we can run everything.
foreach(corpus_dir ${faildir} ${ARGN})
- message(STATUS ryml-test-fuzz-${name}-${corpus_dir})
add_test(NAME ryml-test-fuzz-${name}-${corpus_dir}
COMMAND ${testexe} ${fuzzdir}/${corpus_dir}
)
diff --git a/test/test_singleheader/CMakeLists.txt b/test/test_singleheader/CMakeLists.txt
index b2794bf96..11417e7bf 100644
--- a/test/test_singleheader/CMakeLists.txt
+++ b/test/test_singleheader/CMakeLists.txt
@@ -8,7 +8,7 @@ c4_project(VERSION 0.15.2
AUTHOR "Joao Paulo Magalhaes ")
# amalgamate ryml to get the single header
-function(amalgamate_ryml basename header_dir header_file)
+function(amalgamate_ryml target_name basename header_dir header_file)
set(rymldir "${CMAKE_CURRENT_LIST_DIR}/../..")
set(singleheaderdir "${rymldir}/src_singleheader")
set(singleheader "${singleheaderdir}/${basename}")
@@ -16,8 +16,11 @@ function(amalgamate_ryml basename header_dir header_file)
file(GLOB_RECURSE srcfiles
LIST_DIRECTORIES FALSE
CONFIGURE_DEPENDS "${rymldir}/src")
- add_custom_command(OUTPUT "${singleheader}"
+ # do not use custom command because there are parallel
+ # dependencies
+ add_custom_target(${target_name}
COMMAND python "${amscript}" --events all -- "${singleheader}"
+ BYPRODUCTS "${singleheader}"
DEPENDS ${srcfiles} "${amscript}" "${rymldir}/ext/c4core/cmake/amalgamate_utils.py")
set(files "${${header_file}}")
list(APPEND files "${singleheader}")
@@ -25,8 +28,8 @@ function(amalgamate_ryml basename header_dir header_file)
set(${header_file} ${files} PARENT_SCOPE)
endfunction()
# workaround to: some tests use ryml_all, others ryml_ints
-amalgamate_ryml(ryml_ints.hpp hdr_dir hdr_file)
-amalgamate_ryml(ryml_all.hpp hdr_dir hdr_file)
+amalgamate_ryml(ryml_hdr_ints ryml_ints.hpp hdr_dir hdr_file_ints)
+amalgamate_ryml(ryml_hdr_all ryml_all.hpp hdr_dir hdr_file_all)
c4_add_library(ryml
INC_DIRS
@@ -34,7 +37,7 @@ c4_add_library(ryml
$
SOURCE_ROOT ${hdr_dir}
SOURCES
- ${hdr_file}
+ ${hdr_file_all}
${CMAKE_CURRENT_LIST_DIR}/libryml_singleheader.cpp)
target_compile_definitions(ryml PUBLIC -DRYML_SINGLE_HEADER) # this is needed only for the tests, not ryml itself