Skip to content

ci: revive CI — one Linux build+test job; register the O functional tests (refs #24) - #26

Open
cno127 wants to merge 4 commits into
mainfrom
ci/revive-linux-ci
Open

cno127 wants to merge 4 commits into
mainfrom
ci/revive-linux-ci

Conversation

@cno127

@cno127 cno127 commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

Revives CI (first two deliverables of #24). Nothing here touches consensus or node code — workflow, test registration, README.

Why CI was dead: the inherited ci.yml was upstream Bitcoin Core's 8-job matrix (macOS native, Windows native + cross-built, ASan, two fuzz jobs). Every job was red on every run (last run Oct 2025), and GitHub Actions is disabled at the repository level — so no commit in the last eleven months, including the consensus fixes from the September audit, has ever been built by CI.

What this does

.github/workflows/ci.yml — replaced with ONE job that must stay green:

  • ubuntu-24.04, gcc, system Boost/libevent/SQLite; -DBUILD_GUI=OFF -DWITH_ZMQ=OFF -DWITH_USDT=OFF -DBUILD_BENCH=OFF; ccache (saved even on failed builds so retries get faster)
  • ctest: every Boost unit suite in test_bitcoin (including the O suites already registered in src/test/CMakeLists.txt: o_brightid_db, o_business_db, o_measurement_db, simple_o, user_consensus, o_pow_pob, o_reward), plus secp256k1, univalue and the util tests
  • the two O regtest functional tests via test_runner.py --ci (blocking)
  • workflow_dispatch input full_functional: runs the entire upstream functional suite as a non-blocking survey, to learn which inherited tests the fork currently breaks without making the baseline red
  • least-privilege token (contents: read), functional-test logs uploaded as artifacts on failure
  • triggers: every PR, pushes to main and ARCH-GlobalPaymentsV1

Functional-test wiring

  • test_o_databases.py → feature_o_databases.py, test_o_blockchain_sync.py → feature_o_blockchain_sync.py. test_runner.py enforces the upstream prefix set (feature_|rpc_|wallet_|p2p_|…), so the old names could never have been registered — that's why they were unregistered.
  • Both added to BASE_SCRIPTS. check_script_list / check_script_prefixes now exit 0 (they exited 1 before — verified offline against the list logic).

README — CI badge; the "CI runs on every push" wording now matches what CI actually runs.

What I verified locally (no C++ toolchain here, so this is deliberately narrow)

  • workflow YAML parses; single job; triggers as listed
  • test_runner.py list checks pass: 0 prefix violations, 0 unregistered scripts, 0 registered-but-missing, 0 duplicates
  • both renamed tests py_compile; every log string and RPC they assert on exists in the source ("O Measurement DB: Opened database", getmeasurementstatistics, getactiveinvites, …) and the three DB directory names match init.cpp

What I could NOT verify — the first run of this workflow is the real test

Needs a repo admin (one-time, cannot be done via PAT)

GitHub Actions is disabled for this repository — PUT /repos/.../actions/permissions returns 403 for the available token (fine-grained PAT without Administration). Until it's flipped, this workflow — and every other one — will never run. Settings → Actions → General → Allow all actions / Allow cno127 actions and reusable workflows, then set Workflow permissions to Read repository contents (the workflow already declares contents: read).

After that, this PR's own check will appear; PR #25 gets a run by rebasing on / merging this branch (workflow files only take effect from the branch that contains them).

Not in this PR (still open in #24)

Refs #24

…ster the O functional tests

CI has produced no run since Oct 2025 (issue #24): the inherited upstream
workflow (macOS native, Windows native + cross, ASan, fuzz) was red on every
job and GitHub Actions was disabled at the repository level, so no commit in
the last eleven months - including the consensus fixes from the 2026-09 audit -
has ever been built by CI.

This replaces the matrix with a single job that must stay green:

  * ubuntu-24.04, gcc, system Boost/libevent/SQLite, no GUI/ZMQ/USDT, ccache
  * ctest: all Boost unit suites in test_bitcoin (incl. the O suites already
    listed in src/test/CMakeLists.txt), secp256k1, univalue, util tests
  * the two O regtest functional tests, run through test_runner.py --ci
  * optional workflow_dispatch input to run the full upstream functional suite
    as a non-blocking survey of which inherited tests the fork breaks
  * least-privilege token (contents: read), functional-test logs uploaded on
    failure

Functional-test wiring (second deliverable of #24):

  * test_o_databases.py -> feature_o_databases.py and
    test_o_blockchain_sync.py -> feature_o_blockchain_sync.py: test_runner.py
    enforces a fixed prefix set (feature_/rpc_/wallet_/...), so the old names
    could never be registered
  * both added to BASE_SCRIPTS; check_script_list / check_script_prefixes now
    exit 0 (they exited 1 before)

README: CI badge + wording that matches what CI actually does.

Not in this change (tracked in #24): adding o_integration_tests.cpp /
o_rpc_tests.cpp to the build (they pull in sources that are not compiled at
all today), a sanitizer job, and branch protection requiring CI.

Refs #24
…i: ninja -k 0

First CI run (https://github.com/cno127/o-blockchain/actions/runs/34712267112)
failed in bitcoin_consensus: measurement_readiness.h declares three
std::vector<std::string> methods but never includes <vector>; with GCC 13 /
libstdc++ nothing pulls it in transitively:

  consensus/measurement_readiness.h:130:10: error: 'vector' in namespace
  'std' does not name a template type   (also :136, :142)

Pure include hygiene, no behaviour change.

The build step now passes -k 0 to ninja so a single run reports every
compile error in the tree instead of stopping at the first one.

Refs #24
…brightid_db_tests.cpp)

Commit bc94742 (Dec 2025) renamed the class but left two call sites on the
old name, so bitcoin_node and test_bitcoin no longer compiled. Pure rename;
every method the test calls exists unchanged on CIdentityUserDB. Found by CI
run 34712782684 on PR #26.
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.

1 participant