Add basic Gitea Actions CI workflow #6

Merged
andrew merged 4 commits from weaselbot/weaseldb:weaselbot/issue-5 into main 2026-06-30 20:36:38 +00:00
Member

Closes #5

Adds a Gitea Actions workflow that runs pre-commit checks and builds/tests the project on clang and gcc for both amd64 and arm64.

weaseljson is checked out, built, and installed locally because weaseldb depends on it via find_package(weaseljson REQUIRED).

Also switches the llhttp FetchContent declaration from a tarball URL to a git repository pinned to the same release commit. The tarball redirect goes through codeload.github.com, which can be blocked in restricted network environments; using git keeps the fetch on github.com.

Closes #5 Adds a Gitea Actions workflow that runs pre-commit checks and builds/tests the project on clang and gcc for both amd64 and arm64. weaseljson is checked out, built, and installed locally because weaseldb depends on it via `find_package(weaseljson REQUIRED)`. Also switches the llhttp FetchContent declaration from a tarball URL to a git repository pinned to the same release commit. The tarball redirect goes through codeload.github.com, which can be blocked in restricted network environments; using git keeps the fetch on github.com.
weaselbot added 2 commits 2026-06-30 19:23:37 +00:00
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.
Add basic Gitea Actions CI workflow
CI / pre-commit (pull_request) Successful in 56s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-arm64, ubuntu-latest-arm64) (pull_request) Failing after 1m16s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-arm64, ubuntu-latest-arm64) (pull_request) Failing after 1m27s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-amd64, ubuntu-latest-amd64) (pull_request) Failing after 1m55s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-amd64, ubuntu-latest-amd64) (pull_request) Failing after 1m47s
4b168c8688
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.
weaselbot requested review from andrew 2026-06-30 19:23:41 +00:00
weaselbot added 1 commit 2026-06-30 19:59:22 +00:00
ci: install gperf in CI workflow
CI / pre-commit (pull_request) Successful in 55s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-arm64, ubuntu-latest-arm64) (pull_request) Failing after 2m7s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-amd64, ubuntu-latest-amd64) (pull_request) Failing after 2m48s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-arm64, ubuntu-latest-arm64) (pull_request) Failing after 2m27s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-amd64, ubuntu-latest-amd64) (pull_request) Failing after 2m56s
7ffecdda7d
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.
weaselbot added 1 commit 2026-06-30 20:15:24 +00:00
fix weaseljson public header include path
CI / pre-commit (pull_request) Successful in 56s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-arm64, ubuntu-latest-arm64) (pull_request) Successful in 2m25s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-amd64, ubuntu-latest-amd64) (pull_request) Successful in 2m52s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-arm64, ubuntu-latest-arm64) (pull_request) Successful in 2m45s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-amd64, ubuntu-latest-amd64) (pull_request) Successful in 3m7s
ac491c2174
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 <weaseljson.h>. The previous
weaseldb code used <weaseljson/weaseljson.h>, 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.
andrew merged commit a053b92911 into main 2026-06-30 20:36:38 +00:00
andrew deleted branch weaselbot/issue-5 2026-06-30 20:36:39 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weaselab/weaseldb#6