Skip to content

Commit d898366

Browse files
committed
ci: add Android cross-compilation CI job
Include CI jobs for the three new android targets, android-{aarch64, armv7, x86_64)
1 parent 987f943 commit d898366

3 files changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,26 @@ jobs:
218218
- name: Build and test
219219
run: cargo test -vv
220220

221+
222+
android-cross-compile:
223+
name: Cross-Compile for Android (${{ matrix.package }})
224+
runs-on: ubuntu-latest
225+
strategy:
226+
fail-fast: false
227+
matrix:
228+
package:
229+
- android-aarch64
230+
- android-armv7
231+
- android-x86_64
232+
steps:
233+
- uses: actions/checkout@v4
234+
235+
- name: Install Nix
236+
uses: cachix/install-nix-action@v31
237+
238+
- name: Build
239+
run: nix build .#${{ matrix.package }} -L
240+
221241
fuzz-corpus:
222242
name: Verify Fuzz Corpus
223243
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
## [0.2.1] 2026-05-20
1414

1515
### Added
16+
- Added Nix package outputs for Android with bundled NDK r27, Rust toolchains, Boost, and cmake.
1617
- Added `BlockTreeEntry::ancestor` to look up an ancestor block at a given height. Returns `None` if the height is out of range. This operation is O(log N).
1718
- Added `Transaction::locktime()` to retrieve a transaction's `nLockTime` value as a `u32`.
1819
- Added `TxIn::sequence()` to retrieve an input's `nSequence` value as a `u32`.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@ dependencies. Once setup, run:
3434
cargo b
3535
```
3636

37+
### Android Cross-Compilation
38+
39+
Android cross-compilation requires [Nix](https://nixos.org/).
40+
41+
Nix package outputs bundle the exact NDK version, Rust toolchains with Android
42+
targets, Boost, and cmake in a single reproducible build reduncing the support
43+
needed from the rust-bitcoinkernel side.
44+
45+
```bash
46+
nix build .#android-aarch64
47+
nix build .#android-armv7
48+
nix build .#android-x86_64
49+
```
50+
51+
The resulting libraries are placed in `result/lib/`.
52+
53+
Output targets Android API 24+ (Nougat) minimum.
54+
3755
## MSRV (Minimum Supported Rust Version)
3856

3957
The minimum supported Rust version is 1.71. Users on rustc older than

0 commit comments

Comments
 (0)