X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=.github%2Fworkflows%2Fbuild.yml;h=525dcbe5f068b6eeaa3e865ee614e029f4168430;hb=89fb5a38046da60e6b9f95f2c3aaf4a6fa200e32;hp=72220d831d3bfe60085df12b16d3c0a8e5be1de2;hpb=881656ba9e981b5994b9ac7028571345bc0f466b;p=rust-lightning diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72220d83..525dcbe5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,16 @@ name: Continuous Integration Checks -on: [push, pull_request] +on: + push: + branches-ignore: + - master + pull_request: + branches-ignore: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build: @@ -27,11 +37,9 @@ jobs: - name: Checkout source code uses: actions/checkout@v3 - name: Install Rust ${{ matrix.toolchain }} toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.toolchain }} - override: true - profile: minimal + 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'" run: | @@ -91,11 +99,9 @@ jobs: - name: Checkout source code uses: actions/checkout@v3 - name: Install Rust ${{ env.TOOLCHAIN }} toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.TOOLCHAIN }} - override: true - profile: minimal + 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@v3 @@ -131,23 +137,26 @@ jobs: cd .. - name: Run benchmarks on Rust ${{ matrix.toolchain }} run: | - RUSTC_BOOTSTRAP=1 cargo bench --features _bench_unstable + cd bench + RUSTFLAGS="--cfg=ldk_bench --cfg=require_route_graph_test" cargo bench + - name: Run benchmarks with hashbrown on Rust ${{ matrix.toolchain }} + run: | + cd bench + RUSTFLAGS="--cfg=ldk_bench --cfg=require_route_graph_test" cargo bench --features hashbrown check_commits: runs-on: ubuntu-latest env: - TOOLCHAIN: 1.57.0 + TOOLCHAIN: stable steps: - name: Checkout source code uses: actions/checkout@v3 with: fetch-depth: 0 - name: Install Rust ${{ env.TOOLCHAIN }} toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.TOOLCHAIN }} - override: true - profile: minimal + 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 @@ -168,32 +177,36 @@ jobs: with: fetch-depth: 0 - name: Install Rust ${{ env.TOOLCHAIN }} toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.TOOLCHAIN }} - override: true - profile: minimal + 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 cargo check --no-default-features --features=no-std --release cargo check --no-default-features --features=futures --release cargo doc --release - RUSTDOCFLAGS="--cfg=anchors" cargo doc --release + - name: Run cargo check for Taproot build. + run: | + cargo check --release + cargo check --no-default-features --features=no-std --release + cargo check --no-default-features --features=futures --release + cargo doc --release + env: + RUSTFLAGS: '--cfg=taproot' + RUSTDOCFLAGS: '--cfg=taproot' fuzz: runs-on: ubuntu-latest env: - TOOLCHAIN: stable + TOOLCHAIN: 1.58 steps: - name: Checkout source code uses: actions/checkout@v3 - - name: Install Rust 1.58 toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.58 - override: true - profile: minimal + - 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 @@ -213,11 +226,9 @@ jobs: - name: Checkout source code uses: actions/checkout@v3 - name: Install Rust ${{ env.TOOLCHAIN }} toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.TOOLCHAIN }} - override: true - profile: minimal + 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