Skip to content

ci: Add LevelDB test workflow#62

Merged
fanquake merged 1 commit into
bitcoin-core:bitcoin-forkfrom
l0rinc:l0rinc/add-leveldb-ci
Jun 1, 2026
Merged

ci: Add LevelDB test workflow#62
fanquake merged 1 commit into
bitcoin-core:bitcoin-forkfrom
l0rinc:l0rinc/add-leveldb-ci

Conversation

@l0rinc

@l0rinc l0rinc commented May 20, 2026

Copy link
Copy Markdown

Problem: GitHub PRs can currently be green without this subtree's LevelDB tests being built and run, so failures in tests such as autocompact_test and db_test can be missed.

Fix: Add a minimal GitHub Actions workflow for pushes and pull requests. It configures a static CMake build so the full test set is registered, builds the default targets including benchmarks, and runs CTest with failure output.

Context: I was wondering how #61 can pass CI while disabling a seemingly important feature, and saw locally that two tests were failing.

@l0rinc l0rinc mentioned this pull request May 20, 2026
@l0rinc l0rinc closed this May 22, 2026
@l0rinc l0rinc reopened this May 22, 2026

@andrewtoth-exo andrewtoth-exo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa6ea96

@andrewtoth andrewtoth left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa6ea96

@fanquake fanquake closed this May 28, 2026
@fanquake fanquake reopened this May 28, 2026
@willcl-ark

willcl-ark commented May 28, 2026

Copy link
Copy Markdown
Member

I think this will error in its current form.

I hit a build error locally so decided to test this action in my fork, and it appears to be the same: https://github.com/willcl-ark/leveldb-subtree/actions/runs/26569464496/job/78272596850

db_bench_sqlite3.cc calls functions from time.h but this isn't included. I think we need:

CXXFLAGS="-include time.h" cmake -S . -B build
cmake --build build --parallel
``

@willcl-ark

Copy link
Copy Markdown
Member

(ps @fanquake GHA will only run actions whose files already exist in master branch, in case that's what your close/open dance was trying to do above.)

@willcl-ark

Copy link
Copy Markdown
Member

The other option is to patch the file with the correct include.

Add a minimal GitHub Actions workflow that configures a static CMake build, compiles the default targets including benchmarks, and runs the full CTest suite on pushes and pull requests.

The static build keeps tests such as autocompact_test and db_test registered. Include time.h in the SQLite benchmark so that benchmark target builds cleanly on GitHub Actions.

Co-authored-by: Will Clark <will@256k1.dev>
@l0rinc l0rinc force-pushed the l0rinc/add-leveldb-ci branch from fa6ea96 to 47abe23 Compare May 30, 2026 15:19
@l0rinc

l0rinc commented May 30, 2026

Copy link
Copy Markdown
Author

Thanks, added the include (and you as a coauthor). l0rinc#1 passes now.

@willcl-ark willcl-ark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 47abe23

LGTM now.

@fanquake

fanquake commented Jun 1, 2026

Copy link
Copy Markdown
Member

ACK 47abe23 - a sanity check here seems fine.

@fanquake fanquake merged commit 8e89537 into bitcoin-core:bitcoin-fork Jun 1, 2026
mraksoll4 added a commit to Bitwebissss/bitweb-ver1 that referenced this pull request Jun 3, 2026
8e89537cef Merge bitcoin-core/leveldb-subtree#62: ci: Add LevelDB test workflow
47abe23ff2 ci: run LevelDB tests in GitHub Actions
a7f9bdc611 Merge bitcoin-core/leveldb-subtree#52: Revert "Increase maximum read-only mmap()s used from 1000 to 4096 on 64-bit systems"
a2f531d2d0 Merge bitcoin-core/leveldb-subtree#60: util: use [[fallthrough]] directly
1a166221cf Merge bitcoin-core/leveldb-subtree#61: Disable seek compaction
6bfdb6093b Disable seek compaction
42a5f29aa9 util: use [[fallthrough]] directly
c274b50867 Merge bitcoin-core/leveldb-subtree#53: refactor: Delete unused `ScopedHandle:operator=(ScopedHandle&&)`
68740f586f Merge bitcoin-core/leveldb-subtree#59: Fix Clang `-Wconditional-uninitialized` warning
70142e186b Merge bitcoin-core/leveldb-subtree#55: build: Require C++17
d123cf5a83 Effectively, this change
31361bf339 Allow different C/C++ standards when this is used as a subproject.
0711e6d082 Fix Clang `-Wconditional-uninitialized` warning
ab6c84e6f3 Merge bitcoin-core/leveldb-subtree#58: Initialize file_size to 0 to avoid UB
ad9b1c9893 Initialize file_size to 0 to avoid UB
cad64b151d Merge bitcoin-core/leveldb-subtree#57: doc: fix typos
157ed16be9 doc: fix typos
85665f9547 refactor: Delete unused `ScopedHandle:operator=(ScopedHandle&&)`
fd8f69657e Revert "Increase maximum read-only mmap()s used from 1000 to 4096 on 64-bit systems"

git-subtree-dir: src/leveldb
git-subtree-split: 8e89537cef1144b6b75df83ac53239b79d6e2617
mraksoll4 added a commit to bitweb-project/bitweb that referenced this pull request Jun 4, 2026
8e89537cef Merge bitcoin-core/leveldb-subtree#62: ci: Add LevelDB test workflow
47abe23ff2 ci: run LevelDB tests in GitHub Actions
a7f9bdc611 Merge bitcoin-core/leveldb-subtree#52: Revert "Increase maximum read-only mmap()s used from 1000 to 4096 on 64-bit systems"
a2f531d2d0 Merge bitcoin-core/leveldb-subtree#60: util: use [[fallthrough]] directly
1a166221cf Merge bitcoin-core/leveldb-subtree#61: Disable seek compaction
6bfdb6093b Disable seek compaction
42a5f29aa9 util: use [[fallthrough]] directly
c274b50867 Merge bitcoin-core/leveldb-subtree#53: refactor: Delete unused `ScopedHandle:operator=(ScopedHandle&&)`
68740f586f Merge bitcoin-core/leveldb-subtree#59: Fix Clang `-Wconditional-uninitialized` warning
70142e186b Merge bitcoin-core/leveldb-subtree#55: build: Require C++17
d123cf5a83 Effectively, this change
31361bf339 Allow different C/C++ standards when this is used as a subproject.
0711e6d082 Fix Clang `-Wconditional-uninitialized` warning
ab6c84e6f3 Merge bitcoin-core/leveldb-subtree#58: Initialize file_size to 0 to avoid UB
ad9b1c9893 Initialize file_size to 0 to avoid UB
cad64b151d Merge bitcoin-core/leveldb-subtree#57: doc: fix typos
157ed16be9 doc: fix typos
85665f9547 refactor: Delete unused `ScopedHandle:operator=(ScopedHandle&&)`
fd8f69657e Revert "Increase maximum read-only mmap()s used from 1000 to 4096 on 64-bit systems"

git-subtree-dir: src/leveldb
git-subtree-split: 8e89537cef1144b6b75df83ac53239b79d6e2617
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants