Skip to content

Commit c2ee8b0

Browse files
benthecarmanclaude
andcommitted
Split CI between self-hosted and GitHub runners
Run the Rust build/test matrix, linting, docs, and benchmarks on the self-hosted runner, but keep jobs the runner cannot serve on GitHub's ubuntu-latest: - Docker-based integration tests (cln, eclair, lnd, python, kotlin) and the Postgres/VSS service-container jobs, since the self-hosted runner has no Docker installed. - Third-party node-action jobs (semver checks, security audit, nightly rustfmt), since the runner is too old to load actions that require the node24 runtime. For the jobs that stay self-hosted, adapt to the runner environment: - Pin actions/checkout to v4 and actions/cache to v4; their newer releases run on node24, which the self-hosted runner does not support. - Install the Rust toolchain in its own step so rustup and cargo land on PATH for the steps that follow; invoking them in the same step as the rustup install fails because PATH is not refreshed mid-step. Assisted by Claude Code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 83f71f0 commit c2ee8b0

4 files changed

Lines changed: 20 additions & 18 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,26 @@ concurrency:
99
jobs:
1010
benchmark:
1111
timeout-minutes: 60
12-
runs-on: ubuntu-latest
12+
runs-on: self-hosted
1313
env:
1414
TOOLCHAIN: stable
1515
steps:
1616
- name: Checkout source code
17-
uses: actions/checkout@v6
17+
uses: actions/checkout@v4
1818
- name: Install Rust toolchain
1919
run: |
2020
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
21-
rustup override set stable
21+
- name: Set Rust override
22+
run: rustup override set stable
2223
- name: Enable caching for bitcoind
2324
id: cache-bitcoind
24-
uses: actions/cache@v5
25+
uses: actions/cache@v4
2526
with:
2627
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
2728
key: bitcoind-29.0-${{ runner.os }}-${{ runner.arch }}
2829
- name: Enable caching for electrs
2930
id: cache-electrs
30-
uses: actions/cache@v5
31+
uses: actions/cache@v4
3132
with:
3233
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
3334
key: electrs-${{ runner.os }}-${{ runner.arch }}

.github/workflows/cron-weekly-rustfmt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
format:
1313
name: Nightly rustfmt
1414
timeout-minutes: 60
15-
runs-on: ubuntu-24.04
15+
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v6
1818
- uses: dtolnay/rust-toolchain@nightly

.github/workflows/hrn-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ concurrency:
99
jobs:
1010
build-and-test:
1111
timeout-minutes: 60
12-
runs-on: ubuntu-latest
12+
runs-on: self-hosted
1313

1414
steps:
1515
- name: Checkout source code

.github/workflows/rust.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
platform: [
15-
ubuntu-latest,
15+
self-hosted,
1616
macos-latest,
1717
windows-latest,
1818
]
@@ -25,7 +25,7 @@ jobs:
2525
- toolchain: stable
2626
check-fmt: true
2727
build-uniffi: true
28-
platform: ubuntu-latest
28+
platform: self-hosted
2929
- toolchain: stable
3030
platform: macos-latest
3131
- toolchain: stable
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ${{ matrix.platform }}
3636
steps:
3737
- name: Checkout source code
38-
uses: actions/checkout@v6
38+
uses: actions/checkout@v4
3939
- name: Install Rust ${{ matrix.toolchain }} toolchain
4040
run: |
4141
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
@@ -51,13 +51,13 @@ jobs:
5151
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
5252
- name: Enable caching for bitcoind
5353
id: cache-bitcoind
54-
uses: actions/cache@v5
54+
uses: actions/cache@v4
5555
with:
5656
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
5757
key: bitcoind-29.0-${{ runner.os }}-${{ runner.arch }}
5858
- name: Enable caching for electrs
5959
id: cache-electrs
60-
uses: actions/cache@v5
60+
uses: actions/cache@v4
6161
with:
6262
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
6363
key: electrs-${{ runner.os }}-${{ runner.arch }}
@@ -94,14 +94,15 @@ jobs:
9494
linting:
9595
name: Linting
9696
timeout-minutes: 60
97-
runs-on: ubuntu-latest
97+
runs-on: self-hosted
9898
steps:
9999
- name: Checkout source code
100-
uses: actions/checkout@v6
101-
- name: Install Rust and clippy
100+
uses: actions/checkout@v4
101+
- name: Install Rust stable toolchain
102102
run: |
103103
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
104-
rustup component add clippy
104+
- name: Add clippy component
105+
run: rustup component add clippy
105106
- name: Ban `unwrap` in library code
106107
run: |
107108
cargo clippy --lib --verbose --color always -- -A warnings -D clippy::unwrap_used -A clippy::tabs_in_doc_comments
@@ -110,11 +111,11 @@ jobs:
110111
doc:
111112
name: Documentation
112113
timeout-minutes: 60
113-
runs-on: ubuntu-latest
114+
runs-on: self-hosted
114115
env:
115116
RUSTDOCFLAGS: -Dwarnings
116117
steps:
117-
- uses: actions/checkout@v6
118+
- uses: actions/checkout@v4
118119
- uses: dtolnay/rust-toolchain@nightly
119120
- uses: dtolnay/install@cargo-docs-rs
120121
- run: cargo docs-rs

0 commit comments

Comments
 (0)