Skip to content

Enable self-hosted runners #3950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 7 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ concurrency:

jobs:
ext-test:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install Rust stable toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
rustup override set stable
- name: Run externalized tests
run: |
cd ext-functional-test-demo
Expand All @@ -31,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest, windows-latest, macos-latest ]
platform: [ self-hosted, windows-latest, macos-latest ]
toolchain: [ stable, beta, 1.63.0 ] # 1.63.0 is the MSRV for all crates but `lightning-transaction-sync`.
exclude:
- platform: windows-latest
Expand All @@ -43,18 +42,13 @@ jobs:
- name: Install Rust ${{ matrix.toolchain }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
rustup override set ${{ matrix.toolchain }}
- name: Install no-std-check dependencies for ARM Embedded
if: "matrix.platform == 'ubuntu-latest'"
if: "matrix.platform == 'self-hosted'"
run: |
rustup target add thumbv7m-none-eabi
sudo apt-get -y install gcc-arm-none-eabi
sudo apt-get clean
- name: shellcheck the CI and `contrib` scripts
if: "matrix.platform == 'ubuntu-latest'"
if: "matrix.platform == 'self-hosted'"
run: |
sudo apt-get -y install shellcheck
sudo apt-get clean
shellcheck ci/*.sh -aP ci
shellcheck contrib/*.sh -aP contrib
- name: Set RUSTFLAGS to deny warnings
Expand All @@ -77,7 +71,6 @@ jobs:
- name: Install Rust ${{ matrix.toolchain }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
rustup override set ${{ matrix.toolchain }}
- name: Set RUSTFLAGS to deny warnings
if: "matrix.toolchain == '1.75.0'"
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -111,7 +104,7 @@ jobs:
coverage:
strategy:
fail-fast: false
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down Expand Up @@ -150,7 +143,6 @@ jobs:
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
rustup override set ${{ env.TOOLCHAIN }}
- name: Cache routing graph snapshot
id: cache-graph
uses: actions/cache@v4
Expand Down Expand Up @@ -206,7 +198,7 @@ jobs:
RUSTFLAGS="--cfg=ldk_bench --cfg=require_route_graph_test" cargo bench

check_commits:
runs-on: ubuntu-latest
runs-on: self-hosted
env:
TOOLCHAIN: stable
steps:
Expand All @@ -217,7 +209,6 @@ jobs:
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
rustup override set ${{ env.TOOLCHAIN }}
- name: Fetch full tree and rebase on upstream
run: |
git remote add upstream https://github.com/lightningdevkit/rust-lightning
Expand All @@ -240,7 +231,6 @@ jobs:
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
rustup override set ${{ env.TOOLCHAIN }}
- name: Run cargo check for release build.
run: |
cargo check --release
Expand All @@ -258,7 +248,7 @@ jobs:
RUSTDOCFLAGS: '--cfg=taproot'

fuzz:
runs-on: ubuntu-latest
runs-on: self-hosted
env:
TOOLCHAIN: 1.63
steps:
Expand All @@ -267,12 +257,6 @@ jobs:
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
rustup override set ${{ env.TOOLCHAIN }}
- name: Install dependencies for honggfuzz
run: |
sudo apt-get update
sudo apt-get -y install build-essential binutils-dev libunwind-dev
sudo apt-get clean
- name: Pin the regex dependency
run: |
cd fuzz && cargo update -p regex --precise "1.9.6" --verbose
Expand All @@ -295,7 +279,6 @@ jobs:
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
rustup override set ${{ env.TOOLCHAIN }}
- name: Install clippy
run: |
rustup component add clippy
Expand All @@ -313,7 +296,6 @@ jobs:
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
rustup override set ${{ env.TOOLCHAIN }}
- name: Install rustfmt
run: |
rustup component add rustfmt
Expand Down
4 changes: 2 additions & 2 deletions fuzz/ci-fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ cargo --color always hfuzz build
for TARGET in src/bin/*.rs; do
FILENAME=$(basename $TARGET)
FILE="${FILENAME%.*}"
HFUZZ_RUN_ARGS="--exit_upon_crash -v -n2"
HFUZZ_RUN_ARGS="--exit_upon_crash -v -n8"
if [ "$FILE" = "chanmon_consistency_target" ]; then
HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -F 64 -N1000"
elif [ "$FILE" = "process_network_graph_target" -o "$FILE" = "full_stack_target" -o "$FILE" = "router_target" ]; then
elif [ "$FILE" = "process_network_graph_target" -o "$FILE" = "full_stack_target" -o "$FILE" = "router_target" -o "$FILE" = "lsps_message_target" ]; then
HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N10000"
elif [ "$FILE" = "indexedmap_target" ]; then
HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N100000"
Expand Down
Loading