Skip to content

Commit 41232c0

Browse files
committed
ci: Add temporary stress test for port allocation
Strip workflow down to a single ubuntu-stable job that runs integration tests 10 times to verify the deterministic port allocation fix. To be removed before merge. AI tools were used in preparing this commit.
1 parent a555133 commit 41232c0

1 file changed

Lines changed: 10 additions & 60 deletions

File tree

.github/workflows/rust.yml

Lines changed: 10 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,13 @@ concurrency:
88

99
jobs:
1010
build:
11-
strategy:
12-
matrix:
13-
platform: [
14-
ubuntu-latest,
15-
macos-latest,
16-
windows-latest,
17-
]
18-
toolchain: [
19-
stable,
20-
beta,
21-
1.85.0, # Our MSRV
22-
]
23-
include:
24-
- toolchain: stable
25-
check-fmt: true
26-
build-uniffi: true
27-
platform: ubuntu-latest
28-
- toolchain: stable
29-
platform: macos-latest
30-
- toolchain: stable
31-
platform: windows-latest
32-
- toolchain: 1.85.0
33-
msrv: true
34-
runs-on: ${{ matrix.platform }}
11+
runs-on: ubuntu-latest
3512
steps:
3613
- name: Checkout source code
3714
uses: actions/checkout@v3
38-
- name: Install Rust ${{ matrix.toolchain }} toolchain
15+
- name: Install Rust stable toolchain
3916
run: |
40-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
41-
- name: Check formatting on Rust ${{ matrix.toolchain }}
42-
if: matrix.check-fmt
43-
run: rustup component add rustfmt && cargo fmt --all -- --check
44-
- name: Set RUSTFLAGS to deny warnings
45-
if: "matrix.toolchain == 'stable'"
46-
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
17+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
4718
- name: Enable caching for bitcoind
4819
id: cache-bitcoind
4920
uses: actions/cache@v4
@@ -57,7 +28,7 @@ jobs:
5728
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
5829
key: electrs-${{ runner.os }}-${{ runner.arch }}
5930
- name: Download bitcoind/electrs
60-
if: "matrix.platform != 'windows-latest' && (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
31+
if: "steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true'"
6132
run: |
6233
source ./scripts/download_bitcoind_electrs.sh
6334
mkdir bin
@@ -67,32 +38,11 @@ jobs:
6738
run: |
6839
echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
6940
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
70-
- name: Build on Rust ${{ matrix.toolchain }}
41+
- name: Build
7142
run: cargo build --verbose --color always
72-
- name: Build with UniFFI support on Rust ${{ matrix.toolchain }}
73-
if: matrix.build-uniffi
74-
run: cargo build --features uniffi --verbose --color always
75-
- name: Check release build on Rust ${{ matrix.toolchain }}
76-
run: cargo check --release --verbose --color always
77-
- name: Check release build with UniFFI support on Rust ${{ matrix.toolchain }}
78-
if: matrix.build-uniffi
79-
run: cargo check --release --features uniffi --verbose --color always
80-
- name: Test on Rust ${{ matrix.toolchain }}
81-
if: "matrix.platform != 'windows-latest'"
82-
run: |
83-
RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test
84-
- name: Test with UniFFI support on Rust ${{ matrix.toolchain }}
85-
if: "matrix.platform != 'windows-latest' && matrix.build-uniffi"
43+
- name: Stress test port allocation (temporary)
8644
run: |
87-
RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test --features uniffi
88-
89-
doc:
90-
name: Documentation
91-
runs-on: ubuntu-latest
92-
env:
93-
RUSTDOCFLAGS: -Dwarnings
94-
steps:
95-
- uses: actions/checkout@v6
96-
- uses: dtolnay/rust-toolchain@nightly
97-
- uses: dtolnay/install@cargo-docs-rs
98-
- run: cargo docs-rs
45+
for i in $(seq 1 10); do
46+
echo "=== Iteration $i ==="
47+
RUSTFLAGS="--cfg no_download --cfg cycle_tests" cargo test --test integration_tests_rust
48+
done

0 commit comments

Comments
 (0)