diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd9b9f63553..3f14bceacdf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,11 +17,13 @@ jobs: include: - toolchain: stable build-net-tokio: true + check-fmt: true - toolchain: beta build-net-tokio: true - toolchain: 1.39.0 build-net-tokio: true coverage: true + - toolchain: 1.34.2 runs-on: ubuntu-latest steps: - name: Checkout source code @@ -32,6 +34,9 @@ jobs: toolchain: ${{ matrix.toolchain }} override: true profile: minimal + - name: Check formatting + if: matrix.check-fmt + run: rustup component add rustfmt && cargo fmt --all -- --check && cd fuzz && cargo fmt --all -- --check - name: Build on Rust ${{ matrix.toolchain }} with net-tokio if: matrix.build-net-tokio run: RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always diff --git a/.travis.yml b/.travis.yml index 0c36806c63c..01617475ec7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,9 @@ before_install: - sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev script: + # Check formatting + - if [ "$(rustup show | grep stable)" != "" ]; then rustup component add rustfmt && cargo fmt --all -- --check; fi + - if [ "$(rustup show | grep 1.34.2)" != "" ]; then rustup component add rustfmt && cd fuzz && cargo fmt --all -- --check && cd ../; fi # Support lightning-net-tokio only on Rust stable, beta, and 1.39.0 - if [ "$(rustup show | grep default | grep '1.39.0')" != "" ]; then export BUILD_NET_TOKIO=1; fi - if [ "$(rustup show | grep default | grep '1\.')" == "" ]; then export BUILD_NET_TOKIO=1; fi