+ benchmark:
+ runs-on: ubuntu-latest
+ env:
+ TOOLCHAIN: nightly
+ steps:
+ - name: Checkout source code
+ uses: actions/checkout@v2
+ - name: Install Rust ${{ env.TOOLCHAIN }} toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ env.TOOLCHAIN }}
+ override: true
+ profile: minimal
+ - name: Cache routing graph snapshot
+ id: cache-graph
+ uses: actions/cache@v2
+ with:
+ path: lightning/net_graph-2021-05-31.bin
+ key: ldk-net_graph-v0.0.15-2021-05-31.bin
+ - name: Fetch routing graph snapshot
+ if: steps.cache-graph.outputs.cache-hit != 'true'
+ run: |
+ wget -O lightning/net_graph-2021-05-31.bin https://bitcoin.ninja/ldk-net_graph-v0.0.15-2021-05-31.bin
+ if [ "$(sha256sum lightning/net_graph-2021-05-31.bin | awk '{ print $1 }')" != "05a5361278f68ee2afd086cc04a1f927a63924be451f3221d380533acfacc303" ]; then
+ echo "Bad hash"
+ exit 1
+ fi
+ - name: Test with Network Graph on Rust ${{ matrix.toolchain }}
+ run: |
+ cd lightning
+ RUSTFLAGS="--cfg=require_route_graph_test" cargo test
+ RUSTFLAGS="--cfg=require_route_graph_test" cargo test --features hashbrown
+ cd ..
+ - name: Run benchmarks on Rust ${{ matrix.toolchain }}
+ run: |
+ cargo bench --features unstable
+
+ check_commits:
+ runs-on: ubuntu-latest
+ env:
+ # rustc 1.53 regressed and panics when building our (perfectly fine) docs.
+ # See https://github.com/rust-lang/rust/issues/84738
+ TOOLCHAIN: 1.52.1
+ steps:
+ - name: Checkout source code
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Install Rust ${{ env.TOOLCHAIN }} toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ env.TOOLCHAIN }}
+ override: true
+ profile: minimal
+ - name: Fetch full tree and rebase on upstream
+ run: |
+ git remote add upstream https://github.com/rust-bitcoin/rust-lightning
+ git fetch upstream
+ export GIT_COMMITTER_EMAIL="rl-ci@example.com"
+ export GIT_COMMITTER_NAME="RL CI"
+ git rebase upstream/main
+ - name: For each commit, run cargo check (including in fuzz)
+ run: ci/check-each-commit.sh upstream/main
+