Skip to content

Commit

Permalink
Integrate rustfmt into travis and Github Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinewallace committed Apr 29, 2020
1 parent 9171e38 commit 00645b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
include:
- toolchain: stable
build-net-tokio: true
check-fmt: true
- toolchain: beta
build-net-tokio: true
- toolchain: 1.39.0
Expand All @@ -32,6 +33,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
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ 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 && 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
Expand Down

0 comments on commit 00645b6

Please sign in to comment.