Compare commits

...

2 Commits

Author SHA1 Message Date
Paul Dreik 812f8823d2 ci: fix warning about deprecated node.js (#2744)
* ci: update to checkout v6

v4 and older causes warnings about deprecated node.js

* ci: update to actions cache v5

the older versions cause deprecation warings for node.js 20
2026-06-01 18:57:21 -04:00
Daniel Lemire 1726505f66 safety fix for yyjson benchmark 2026-05-29 18:13:05 -04:00
42 changed files with 91 additions and 84 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: uraimo/run-on-arch-action@v3 - uses: uraimo/run-on-arch-action@v3
name: Test name: Test
id: runcmd id: runcmd
+2 -2
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
image: debian:testing image: debian:testing
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Install dependencies - name: Install dependencies
run: | run: |
+1 -1
View File
@@ -24,7 +24,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }} url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Install Doxygen - name: Install Doxygen
run: sudo apt-get install doxygen graphviz -y run: sudo apt-get install doxygen graphviz -y
- run: mkdir docs - run: mkdir docs
+3 -3
View File
@@ -4,14 +4,14 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@v6
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14 - uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
- name: Verify - name: Verify
run: emcc -v run: emcc -v
- name: Checkout - name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3.6.0 uses: actions/checkout@v6
- name: Configure - name: Configure
run: emcmake cmake -B build run: emcmake cmake -B build
- name: Build # We build but do not test - name: Build # We build but do not test
run: cmake --build build run: cmake --build build
@@ -6,7 +6,7 @@ jobs:
whitespace: whitespace:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Remove whitespace and check the diff - name: Remove whitespace and check the diff
run: | run: |
set -eu set -eu
+3 -3
View File
@@ -38,14 +38,14 @@ jobs:
chmod +x llvm.sh chmod +x llvm.sh
sudo ./llvm.sh $CLANGVERSION sudo ./llvm.sh $CLANGVERSION
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
- uses: actions/cache@v4 - uses: actions/cache@v5
id: cache-corpus id: cache-corpus
with: with:
path: out/ path: out/
+3 -3
View File
@@ -11,13 +11,13 @@ jobs:
platform: platform:
- { toolchain-version: 2023.08.08 } - { toolchain-version: 2023.08.08 }
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Install build requirements - name: Install build requirements
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y --no-install-recommends cmake sudo apt-get install -y --no-install-recommends cmake
- uses: actions/cache/restore@v4 - uses: actions/cache/restore@v5
id: restore-cache id: restore-cache
with: with:
path: /opt/cross-tools path: /opt/cross-tools
@@ -33,7 +33,7 @@ jobs:
mkdir -p /opt mkdir -p /opt
tar -C /opt -x -f /tmp/toolchain.tar.xz tar -C /opt -x -f /tmp/toolchain.tar.xz
- uses: actions/cache/save@v3 - uses: actions/cache/save@v5
if: ${{ !steps.restore-cache.outputs.cache-hit }} if: ${{ !steps.restore-cache.outputs.cache-hit }}
with: with:
path: /opt/cross-tools path: /opt/cross-tools
+2 -2
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+2 -2
View File
@@ -27,8 +27,8 @@ jobs:
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+2 -2
View File
@@ -29,8 +29,8 @@ jobs:
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: uraimo/run-on-arch-action@v3 - uses: uraimo/run-on-arch-action@v3
name: Test name: Test
id: runcmd id: runcmd
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: uraimo/run-on-arch-action@v3 - uses: uraimo/run-on-arch-action@v3
name: Test name: Test
id: runcmd id: runcmd
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
build: build:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Install packages - name: Install packages
run: | run: |
sudo apt-get update -q -y sudo apt-get update -q -y
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
build: build:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Install packages - name: Install packages
run: | run: |
sudo apt-get update -q -y sudo apt-get update -q -y
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
build: build:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Install packages - name: Install packages
run: | run: |
sudo apt-get update -q -y sudo apt-get update -q -y
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
build: build:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Install packages - name: Install packages
run: | run: |
sudo apt-get update -q -y sudo apt-get update -q -y
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
build: build:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- name: Install packages - name: Install packages
run: | run: |
sudo apt-get update -q -y sudo apt-get update -q -y
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: uraimo/run-on-arch-action@v3 - uses: uraimo/run-on-arch-action@v3
name: Test name: Test
id: runcmd id: runcmd
+3 -3
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
@@ -20,4 +20,4 @@ jobs:
cd build && cd build &&
CXX=clang++-13 cmake -DSIMDJSON_DEVELOPER_MODE=ON .. && CXX=clang++-13 cmake -DSIMDJSON_DEVELOPER_MODE=ON .. &&
cmake --build . && cmake --build . &&
ctest --output-on-failure -LE explicitonly -j ctest --output-on-failure -LE explicitonly -j
+2 -2
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+2 -2
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+3 -3
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
@@ -20,4 +20,4 @@ jobs:
cd build && cd build &&
CXX=g++-12 cmake -DSIMDJSON_DEVELOPER_MODE=ON .. && CXX=g++-12 cmake -DSIMDJSON_DEVELOPER_MODE=ON .. &&
cmake --build . && cmake --build . &&
ctest --output-on-failure -LE explicitonly -j ctest --output-on-failure -LE explicitonly -j
@@ -8,8 +8,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
@@ -21,4 +21,4 @@ jobs:
cd build && cd build &&
CXX=g++-12 cmake -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GLIBCXX_ASSERTIONS=ON -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON .. && CXX=g++-12 cmake -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_GLIBCXX_ASSERTIONS=ON -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DEVELOPER_MODE=ON .. &&
cmake --build . && cmake --build . &&
ctest . -E avoid_ ctest . -E avoid_
+3 -3
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
@@ -21,4 +21,4 @@ jobs:
CXX=g++-12 cmake -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_SANITIZE_THREADS=ON .. && CXX=g++-12 cmake -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_SANITIZE_THREADS=ON .. &&
cmake --build . --target document_stream_tests --target ondemand_document_stream_tests --target parse_many_test && cmake --build . --target document_stream_tests --target ondemand_document_stream_tests --target parse_many_test &&
ctest --output-on-failure -R parse_many_test && ctest --output-on-failure -R parse_many_test &&
ctest --output-on-failure -R document_stream_tests ctest --output-on-failure -R document_stream_tests
+2 -2
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+2 -2
View File
@@ -15,8 +15,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+2 -2
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
@@ -11,7 +11,7 @@ jobs:
matrix: matrix:
cxx: [g++-13, clang++-16] cxx: [g++-13, clang++-16]
steps: steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - uses: actions/checkout@v6
- name: Prepare - name: Prepare
run: cmake -DSIMDJSON_CXX_STANDARD=20 -DSIMDJSON_EXCEPTIONS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -B build run: cmake -DSIMDJSON_CXX_STANDARD=20 -DSIMDJSON_EXCEPTIONS=OFF -DSIMDJSON_DEVELOPER_MODE=ON -B build
env: env:
@@ -19,4 +19,4 @@ jobs:
- name: Build - name: Build
run: cmake --build build -j=2 run: cmake --build build -j=2
- name: Test - name: Test
run: ctest --output-on-failure --test-dir build run: ctest --output-on-failure --test-dir build
+2 -2
View File
@@ -11,7 +11,7 @@ jobs:
matrix: matrix:
cxx: [g++-13, clang++-16] cxx: [g++-13, clang++-16]
steps: steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - uses: actions/checkout@v6
- name: Prepare - name: Prepare
run: cmake -DSIMDJSON_CXX_STANDARD=20 -DSIMDJSON_DEVELOPER_MODE=ON -B build run: cmake -DSIMDJSON_CXX_STANDARD=20 -DSIMDJSON_DEVELOPER_MODE=ON -B build
env: env:
@@ -19,4 +19,4 @@ jobs:
- name: Build - name: Build
run: cmake --build build -j=2 run: cmake --build build -j=2
- name: Test - name: Test
run: ctest --output-on-failure --test-dir build run: ctest --output-on-failure --test-dir build
+2 -2
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+2 -2
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+4 -4
View File
@@ -9,8 +9,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
@@ -34,8 +34,8 @@ jobs:
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
nan_inf: [ON, OFF] nan_inf: [ON, OFF]
build_type: [RelWithDebInfo, Debug, Release] build_type: [RelWithDebInfo, Debug, Release]
steps: steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - uses: actions/checkout@v6
- name: Prepare - name: Prepare
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_SANITIZE=${{matrix.sanitizer}} -DBUILD_SHARED_LIBS=${{matrix.shared}} -DSIMDJSON_ENABLE_NAN_INF=${{matrix.nan_inf}} -B build run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_SANITIZE=${{matrix.sanitizer}} -DBUILD_SHARED_LIBS=${{matrix.shared}} -DSIMDJSON_ENABLE_NAN_INF=${{matrix.nan_inf}} -B build
env: env:
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
- {arch: ARM64EC} - {arch: ARM64EC}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Use cmake - name: Use cmake
run: | run: |
cmake -A ${{ matrix.arch }} -DCMAKE_SYSTEM_VERSION="10.0.22621.0" -DCMAKE_CROSSCOMPILING=1 -DSIMDJSON_DEVELOPER_MODE=ON -D SIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_EXCEPTIONS=OFF -B build && cmake -A ${{ matrix.arch }} -DCMAKE_SYSTEM_VERSION="10.0.22621.0" -DCMAKE_CROSSCOMPILING=1 -DSIMDJSON_DEVELOPER_MODE=ON -D SIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_EXCEPTIONS=OFF -B build &&
+2 -2
View File
@@ -19,7 +19,7 @@ jobs:
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF} - {gen: Visual Studio 17 2022, arch: x64, shared: OFF}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Configure - name: Configure
run: | run: |
cmake -DSIMDJSON_CXX_STANDARD=20 -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build cmake -DSIMDJSON_CXX_STANDARD=20 -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build
@@ -41,4 +41,4 @@ jobs:
- name: Test Installation - name: Test Installation
run: | run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find
cmake --build build_install_test --config Release cmake --build build_install_test --config Release
+2 -2
View File
@@ -18,7 +18,7 @@ jobs:
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: RelWithDebInfo} - {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: RelWithDebInfo}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Configure - name: Configure
run: | run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSANITIZE=ON -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSANITIZE=ON -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build
@@ -27,4 +27,4 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
cd build cd build
ctest -C ${{matrix.build_type}} -LE explicitonly --output-on-failure ctest -C ${{matrix.build_type}} -LE explicitonly --output-on-failure
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
- {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: Release, memory_map: ON, nan_inf: ON} - {gen: Visual Studio 17 2022, arch: x64, shared: OFF, build_type: Release, memory_map: ON, nan_inf: ON}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Configure - name: Configure
run: | run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} -DSIMDJSON_ENABLE_MEMORY_FILE_MAPPING_ON_WINDOWS=${{matrix.memory_map}} -DSIMDJSON_ENABLE_NAN_INF=${{matrix.nan_inf}} -B build cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -DBUILD_SHARED_LIBS=${{matrix.shared}} -DSIMDJSON_ENABLE_MEMORY_FILE_MAPPING_ON_WINDOWS=${{matrix.memory_map}} -DSIMDJSON_ENABLE_NAN_INF=${{matrix.nan_inf}} -B build
+2 -2
View File
@@ -18,7 +18,7 @@ jobs:
- {gen: Visual Studio 17 2022, arch: x64, build_type: RelWithDebInfo} - {gen: Visual Studio 17 2022, arch: x64, build_type: RelWithDebInfo}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Configure - name: Configure
run: | run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build
@@ -34,4 +34,4 @@ jobs:
- name: Test Installation - name: Test Installation
run: | run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find
cmake --build build_install_test --config ${{matrix.build_type}} cmake --build build_install_test --config ${{matrix.build_type}}
+2 -2
View File
@@ -18,7 +18,7 @@ jobs:
- {gen: Visual Studio 17 2022, arch: x64, build_type: RelWithDebInfo} - {gen: Visual Studio 17 2022, arch: x64, build_type: RelWithDebInfo}
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Configure - name: Configure
run: | run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_COMPETITION=OFF -B build
@@ -34,4 +34,4 @@ jobs:
- name: Test Installation - name: Test Installation
run: | run: |
cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find cmake -G "${{matrix.gen}}" -A ${{matrix.arch}} -B build_install_test tests/installation_tests/find
cmake --build build_install_test --config ${{matrix.build_type}} cmake --build build_install_test --config ${{matrix.build_type}}
+2 -2
View File
@@ -7,8 +7,8 @@ jobs:
name: windows-vs17 name: windows-vs17
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v6
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: dependencies/.cache path: dependencies/.cache
key: ${{ hashFiles('dependencies/CMakeLists.txt') }} key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
+15 -8
View File
@@ -61,22 +61,29 @@ struct yyjson_base {
}; };
struct yyjson : yyjson_base { struct yyjson : yyjson_base {
// The document owns the string memory that result's string_views point into,
// so it must outlive each run() (the verification diff happens after run()
// returns). Free it on the next run() / at destruction, not before the views
// are read.
yyjson_doc *doc{};
~yyjson() { if (doc != nullptr) { yyjson_doc_free(doc); } }
bool run(simdjson::padded_string &json, std::vector<tweet<std::string_view>> &result) { bool run(simdjson::padded_string &json, std::vector<tweet<std::string_view>> &result) {
yyjson_doc *doc = yyjson_read(json.data(), json.size(), 0); if (doc != nullptr) { yyjson_doc_free(doc); doc = nullptr; }
bool b = yyjson_base::run(doc, result); doc = yyjson_read(json.data(), json.size(), 0);
yyjson_doc_free(doc); return yyjson_base::run(doc, result);
return b;
} }
}; };
BENCHMARK_TEMPLATE(partial_tweets, yyjson)->UseManualTime(); BENCHMARK_TEMPLATE(partial_tweets, yyjson)->UseManualTime();
#if SIMDJSON_COMPETITION_ONDEMAND_INSITU #if SIMDJSON_COMPETITION_ONDEMAND_INSITU
struct yyjson_insitu : yyjson_base { struct yyjson_insitu : yyjson_base {
// See the note on yyjson above: the document must outlive result's views.
yyjson_doc *doc{};
~yyjson_insitu() { if (doc != nullptr) { yyjson_doc_free(doc); } }
bool run(simdjson::padded_string &json, std::vector<tweet<std::string_view>> &result) { bool run(simdjson::padded_string &json, std::vector<tweet<std::string_view>> &result) {
yyjson_doc *doc = yyjson_read_opts(json.data(), json.size(), YYJSON_READ_INSITU, 0, 0); if (doc != nullptr) { yyjson_doc_free(doc); doc = nullptr; }
bool b = yyjson_base::run(doc, result); doc = yyjson_read_opts(json.data(), json.size(), YYJSON_READ_INSITU, 0, 0);
yyjson_doc_free(doc); return yyjson_base::run(doc, result);
return b;
} }
}; };
BENCHMARK_TEMPLATE(partial_tweets, yyjson_insitu)->UseManualTime(); BENCHMARK_TEMPLATE(partial_tweets, yyjson_insitu)->UseManualTime();