diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b2e37105c73..0511d7bddbe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 @@ -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" @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 @@ -258,7 +248,7 @@ jobs: RUSTDOCFLAGS: '--cfg=taproot' fuzz: - runs-on: ubuntu-latest + runs-on: self-hosted env: TOOLCHAIN: 1.63 steps: @@ -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 @@ -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 @@ -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 diff --git a/fuzz/ci-fuzz.sh b/fuzz/ci-fuzz.sh index e3bb1910b2c..c9af45637e3 100755 --- a/fuzz/ci-fuzz.sh +++ b/fuzz/ci-fuzz.sh @@ -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"