Skip to content

Commit df4b547

Browse files
ci: add ubuntu-24.04-arm runner to workflows
This adds ARM64 architecture support to the CI matrix for testing on ARM-based infrastructure like AWS Graviton servers.
1 parent 71bf53d commit df4b547

File tree

1 file changed

+39
-8
lines changed

1 file changed

+39
-8
lines changed

.github/workflows/cont_integration.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ jobs:
2020
build-test:
2121
needs: prepare
2222
name: Build & Test
23-
runs-on: ubuntu-latest
23+
runs-on: ${{ matrix.os }}
2424
strategy:
2525
matrix:
26+
os:
27+
- ubuntu-latest
28+
- ubuntu-24.04-arm
2629
rust:
2730
- version: ${{ needs.prepare.outputs.rust_version }}
2831
clippy: true
@@ -58,13 +61,29 @@ jobs:
5861
- name: Build + Test
5962
env:
6063
MATRIX_RUST_VERSION: ${{ matrix.rust.version }}
64+
MATRIX_OS: ${{ matrix.os }}
6165
run: |
62-
if [ $MATRIX_RUST_VERSION = '1.63.0' ]; then
63-
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
64-
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
66+
if [ "$MATRIX_OS" = "ubuntu-24.04-arm" ]; then
67+
# On ARM, exclude both electrs-dependent tests and example_* files
68+
echo "Running on ARM architecture - excluding electrs-dependent tests"
69+
if [ "$MATRIX_RUST_VERSION" = "1.63.0" ]; then
70+
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
71+
# Run tests with --exclude patterns for electrs-dependent tests
72+
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' --exclude 'bdk_bitcoind_rpc' --exclude 'bdk_testenv' --exclude 'bdk_esplora' ${{ matrix.features }}
73+
else
74+
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
75+
# Run tests with --exclude patterns for electrs-dependent tests
76+
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' --exclude 'bdk_bitcoind_rpc' --exclude 'bdk_testenv' --exclude 'bdk_esplora' ${{ matrix.features }}
77+
fi
6578
else
66-
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
67-
cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
79+
# On x86, run tests normally
80+
if [ "$MATRIX_RUST_VERSION" = "1.63.0" ]; then
81+
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
82+
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }}
83+
else
84+
cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
85+
cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
86+
fi
6887
fi
6988
7089
check-no-std:
@@ -175,9 +194,12 @@ jobs:
175194
build-examples:
176195
needs: prepare
177196
name: Build & Test Examples
178-
runs-on: ubuntu-latest
197+
runs-on: ${{ matrix.os }}
179198
strategy:
180199
matrix:
200+
os:
201+
- ubuntu-latest
202+
- ubuntu-24.04-arm
181203
example-dir:
182204
- example_cli
183205
- example_bitcoind_rpc_polling
@@ -202,4 +224,13 @@ jobs:
202224
uses: Swatinem/[email protected]
203225
- name: Build
204226
working-directory: example-crates/${{ matrix.example-dir }}
205-
run: cargo build
227+
env:
228+
MATRIX_OS: ${{ matrix.os }}
229+
EXAMPLE_DIR: ${{ matrix.example-dir }}
230+
run: |
231+
if [ "$MATRIX_OS" = "ubuntu-24.04-arm" ] && [[ "$EXAMPLE_DIR" == *"electrum"* ]]; then
232+
echo "Skipping electrum-dependent example on ARM architecture"
233+
exit 0
234+
else
235+
cargo build
236+
fi

0 commit comments

Comments
 (0)