CI on amd64 and arm64, DEPLOY.md architectures, fix RocksDB teardown in test_storage

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-10-25 09:52:40 +01:00
1 parent fe02bfec76
commit 4bcbb51605
5 files changed
+34 -19

No files matched your search

+16 -6
View File
@@ -14,8 +14,13 @@ concurrency:
jobs:
unittests:
name: unittests
runs-on: ubuntu-24.04
name: unittests (${{ matrix.os }})
# amd64 and arm64 runners
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
steps:
- name: Checkout
uses: actions/checkout@v6
@@ -94,8 +99,12 @@ jobs:
docker:
# builds the image and checks the SSL handling of its entrypoint (contrib/docker-smoke-test.sh)
name: docker
runs-on: ubuntu-24.04
name: docker (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@v6
@@ -107,12 +116,13 @@ jobs:
integration:
# ElectrumX against a real Palladium node in regtest mode (tests/integration), with each DB engine
name: integration (${{ matrix.db_engine }})
runs-on: ubuntu-24.04
name: integration (${{ matrix.db_engine }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
db_engine: [leveldb, rocksdb]
os: [ubuntu-24.04, ubuntu-24.04-arm]
steps:
- uses: actions/checkout@v6
+1 -1
View File
@@ -62,5 +62,5 @@ Integration tests (`tests/integration`): `node/Dockerfile` + `node/palladium.con
- History is a snapshot of upstream commit `280cb33` plus Palladium commits: no common history, `git merge upstream` does not work. Update with `git diff 280cb33 upstream/master | git apply --3way` (see the "Fork notes" in `README.md`).
- Do not create, move or delete git tags.
- Do not `git add -A`: generated files (`.coverage`, `.env`) get swept in. Add files by name. `.coverage` and `.env` are in `.gitignore`.
- CI (`.github/workflows/ci.yml`, on `main`): `unittests`, `pycodestyle`, `build_docs`, `docker` (builds the image, runs the smoke test). It runs on Ubuntu 24.04; `test_storage.py` fails with RocksDB 9.10 (Debian trixie) in teardown.
- CI (`.github/workflows/ci.yml`, on `main`): `unittests`, `pycodestyle`, `build_docs`, `docker` (builds the image, runs the smoke test). It runs on Ubuntu 24.04, amd64 and arm64 (`ubuntu-24.04-arm`) for `unittests`, `docker` and `integration`.
- In repo documentation never cite paths or links of the palladiumcore repository; describe the concept (the Palladium node, the `palladium` Docker network).
+7
View File
@@ -189,6 +189,13 @@ DONATION_ADDRESS=plm1q...your address...
amount) and use an address you are happy to make public, since it is sent to everyone who connects.
- After changing it, apply it with `docker compose up -d` (the container is recreated with the new value).
## Architectures
amd64 and arm64 (for example a Raspberry Pi 5) are both supported: the Docker image builds natively on either.
Without Docker, the DB engine bindings are compiled from source, so install the development headers first:
`libleveldb-dev` for LevelDB (`plyvel`), or RocksDB >= 8.0 (`librocksdb-dev`) for RocksDB (`rocksdb-ng`).
Debian 12 ships RocksDB 7.8.3, which is too old: use Debian 13 (or the Docker image) for RocksDB.
## Data directory and first start
Create the data directory as the user that runs Docker, before the first start (otherwise Docker creates it as root and
+9 -11
View File
@@ -66,21 +66,19 @@ Verified on aarch64 (Raspberry Pi, Debian 12, Docker 29):
- the systemd unit in `contrib/systemd` starts, syncs a regtest chain, answers on the Electrum protocol and
`electrumx_rpc`, and stops cleanly through its `ExecStop`.
Added: the `unittests`, `docker` and `integration` CI jobs run on amd64 and arm64 (`ubuntu-24.04-arm`);
`DEPLOY.md` has an "Architectures" section (headers needed to compile `plyvel` and `rocksdb-ng`).
`docker build --no-cache` of the server image on arm64 works (`rocksdb-ng` compiles from scratch), and the
RocksDB tests in `tests/server/test_storage.py` pass with RocksDB 9.10 (the fixture now closes the DB before the `chdir`).
`rocksdb-ng` needs RocksDB >= 8.0: Debian 12 (7.8.3) is too old, use Debian 13 or the Docker image.
Still to do or verify:
- **RocksDB version**: `rocksdb-ng` needs RocksDB >= 8.0 and compiles from source; Debian 12 (7.8.3) is too old,
use Debian 13 or the Docker image. In `tests/server/test_storage.py` the 7 RocksDB tests error at teardown with
9.10 (the fixture does `os.chdir` before `db.close()` on a relative path), the same on ARM and amd64.
- **Server image build without cache**: confirm that `rocksdb-ng` compiles on arm64 from scratch
(`docker build --no-cache -t plm-electrumx .`).
- **A full sync** of the server image against a real Palladium node on ARM (speed, memory, `CACHE_MB`).
- **amd64**: nothing was run on this machine, rely on the CI.
- **CI**: add an ARM runner (`ubuntu-24.04-arm`) to the `unittests`, `integration` and `docker` jobs
of `.github/workflows/ci.yml`, so both architectures are tested on every push.
- **Published image** (if any): build it multi-arch with
- **First run of the amd64/arm64 CI matrix** on GitHub (nothing amd64 was run on the ARM machine used here).
- **Published image** (none is published today): build it multi-arch with
`docker buildx build --platform linux/amd64,linux/arm64`.
- **Development on ARM**: `plyvel` needs `libleveldb-dev` to compile (`apt install libleveldb-dev`);
document it in `DEPLOY.md` if it is useful there.
## Fork notes
+1 -1
View File
@@ -22,8 +22,8 @@ def db(tmpdir, request):
os.chdir(str(tmpdir))
db = db_class(request.param)("db", False)
yield db
os.chdir(cwd)
db.close()
os.chdir(cwd)
def test_put_get(db):