From ad2650b0a6da28e4ca4165867cd050fdbdfd6ca5 Mon Sep 17 00:00:00 2001 From: Weaselbot Date: Tue, 30 Jun 2026 15:23:23 -0400 Subject: [PATCH 1/4] Switch llhttp FetchContent to git repository The tarball download redirects to codeload.github.com, which can be unreliable in restricted network environments. Fetching the same release via git uses github.com directly and pins the exact commit. --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5404f5c..d9bf403 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,10 +80,9 @@ FetchContent_MakeAvailable(simdutf) FetchContent_Declare( llhttp - URL "https://github.com/nodejs/llhttp/archive/refs/tags/release/v9.2.1.tar.gz" - URL_HASH - SHA256=3c163891446e529604b590f9ad097b2e98b5ef7e4d3ddcf1cf98b62ca668f23e - DOWNLOAD_EXTRACT_TIMESTAMP ON) + GIT_REPOSITORY https://github.com/nodejs/llhttp.git + GIT_TAG 610a87d755f6bae466cd871c2ba97574ccac5483 # release/v9.2.1 +) set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "") -- 2.43.0 From 4b168c86886373e46293186339b630463a1be47d Mon Sep 17 00:00:00 2001 From: Weaselbot Date: Tue, 30 Jun 2026 15:23:25 -0400 Subject: [PATCH 2/4] Add basic Gitea Actions CI workflow Run pre-commit checks and build/test the project on clang and gcc for both amd64 and arm64. weaseljson is built and installed locally because weaseldb depends on it via find_package. --- .gitea/workflows/ci.yml | 69 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..ea2c7a9 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,69 @@ +name: CI + +on: [push, pull_request] + +jobs: + pre-commit: + runs-on: ubuntu-latest-amd64 + steps: + - uses: actions/checkout@v4 + + - name: Install pre-commit + run: pipx install pre-commit + + - name: Run pre-commit + run: ~/.local/bin/pre-commit run --all-files --show-diff-on-failure + + build: + strategy: + fail-fast: false + matrix: + include: + - name: clang-amd64 + runner: ubuntu-latest-amd64 + cmake_args: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ + - name: clang-arm64 + runner: ubuntu-latest-arm64 + cmake_args: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ + - name: gcc-amd64 + runner: ubuntu-latest-amd64 + cmake_args: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ + - name: gcc-arm64 + runner: ubuntu-latest-arm64 + cmake_args: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ + runs-on: ${{ matrix.runner }} + steps: + - uses: actions/checkout@v4 + with: + path: weaseldb + + - name: Checkout weaseljson + uses: actions/checkout@v4 + with: + repository: weaselab/weaseljson + path: weaseljson + + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install -y build-essential clang cmake + + - name: Build and install weaseljson + run: | + cmake -S weaseljson -B weaseljson/build \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="$(pwd)/weaseljson/install" + cmake --build weaseljson/build -j "$(nproc)" + cmake --install weaseljson/build + + - name: Build weaseldb + run: | + cmake -S weaseldb -B weaseldb/build ${{ matrix.cmake_args }} \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_PREFIX_PATH="$(pwd)/weaseljson/install" + cmake --build weaseldb/build -j "$(nproc)" + + - name: Test + run: | + cd weaseldb/build + ctest --output-on-failure -j "$(nproc)" --timeout 90 -- 2.43.0 From 7ffecdda7df3af6b85424f3d591a1fb2de5eda26 Mon Sep 17 00:00:00 2001 From: Weaselbot Date: Tue, 30 Jun 2026 15:59:17 -0400 Subject: [PATCH 3/4] ci: install gperf in CI workflow The build requires gperf to generate src/json_tokens.cpp from the .gperf source. The CI jobs were failing at CMake configure time with: CMake Error at CMakeLists.txt:108 (find_program): Could not find GPERF_EXECUTABLE using the following names: gperf Add gperf to the apt-get install step so all build dependencies are present on the runners. --- .gitea/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ea2c7a9..3a7e02c 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - name: Install deps run: | sudo apt-get update - sudo apt-get install -y build-essential clang cmake + sudo apt-get install -y build-essential clang cmake gperf - name: Build and install weaseljson run: | -- 2.43.0 From ac491c2174a0e39592ff2a104b89c8e9c8cda582 Mon Sep 17 00:00:00 2001 From: Weaselbot Date: Tue, 30 Jun 2026 16:15:18 -0400 Subject: [PATCH 4/4] fix weaseljson public header include path weaseljson installs its public header as ${prefix}/include/weaseljson/weaseljson.h and exports INTERFACE_INCLUDE_DIRECTORIES as ${prefix}/include/weaseljson so consumers must include the header as . The previous weaseldb code used , which only worked when a system copy of weaseljson happened to be reachable via the compiler's default include search path (e.g. /usr/include). In CI, where weaseljson is built and installed to a non-system prefix, the build failed with: fatal error: 'weaseljson/weaseljson.h' file not found Use the include path advertised by the weaseljson CMake target. --- src/json_commit_request_parser.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json_commit_request_parser.hpp b/src/json_commit_request_parser.hpp index 6d28e45..8ddf6f1 100644 --- a/src/json_commit_request_parser.hpp +++ b/src/json_commit_request_parser.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "commit_request_parser.hpp" #include "json_token_enum.hpp" -- 2.43.0