Skip to content

Commit 12f1054

Browse files
Integrate rustfmt into travis and Github Actions.
1 parent 491f848 commit 12f1054

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
include:
1818
- toolchain: stable
1919
build-net-tokio: true
20+
check-fmt: true
2021
- toolchain: beta
2122
build-net-tokio: true
2223
- toolchain: 1.39.0
@@ -32,6 +33,9 @@ jobs:
3233
toolchain: ${{ matrix.toolchain }}
3334
override: true
3435
profile: minimal
36+
- name: Check formatting
37+
if: matrix.check-fmt
38+
run: rustup component add rustfmt && cargo fmt --all -- --check && cd fuzz && cargo fmt --all -- --check
3539
- name: Build on Rust ${{ matrix.toolchain }} with net-tokio
3640
if: matrix.build-net-tokio
3741
run: RUSTFLAGS="-C link-dead-code" cargo build --verbose --color always

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ before_install:
1515
- sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
1616

1717
script:
18+
# Check formatting
19+
- if [ "$(rustup show | grep stable)" != "" ]; then rustup component add rustfmt && cargo fmt --all -- --check && cd fuzz && cargo fmt --all -- --check && cd ../ ; fi
1820
# Support lightning-net-tokio only on Rust stable, beta, and 1.39.0
1921
- if [ "$(rustup show | grep default | grep '1.39.0')" != "" ]; then export BUILD_NET_TOKIO=1; fi
2022
- if [ "$(rustup show | grep default | grep '1\.')" == "" ]; then export BUILD_NET_TOKIO=1; fi

0 commit comments

Comments
 (0)