X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=.github%2Fworkflows%2Fbuild.yml;h=37443c288168bd746f3863ece6a80b99e6d20043;hb=a8bd4c097f7ae6620eee66c1cb49144e38568439;hp=cff105470d23d1455ca4479a23b63b365c29b4a0;hpb=a854ccb9b5dfa762ae22e2e547630eb3f8e4235b;p=rust-lightning diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cff10547..37443c28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -191,13 +191,10 @@ jobs: - name: Pin the regex dependency run: | cd fuzz && cargo update -p regex --precise "1.9.6" --verbose && cd .. - cd lightning-invoice/fuzz && cargo update -p regex --precise "1.9.6" --verbose - name: Sanity check fuzz targets on Rust ${{ env.TOOLCHAIN }} - run: cd fuzz && RUSTFLAGS="--cfg=fuzzing" cargo test --verbose --color always + run: cd fuzz && RUSTFLAGS="--cfg=fuzzing --cfg=secp256k1_fuzz --cfg=hashes_fuzz" cargo test --verbose --color always - name: Run fuzzers run: cd fuzz && ./ci-fuzz.sh && cd .. - - name: Run lightning-invoice fuzzers - run: cd lightning-invoice/fuzz && RUSTFLAGS="--cfg=fuzzing" cargo test --verbose && ./ci-fuzz.sh linting: runs-on: ubuntu-latest @@ -216,3 +213,20 @@ jobs: - name: Run default clippy linting run: | cargo clippy -- -Aclippy::erasing_op -Aclippy::never_loop -Aclippy::if_same_then_else -Dclippy::try_err + + rustfmt: + runs-on: ubuntu-latest + env: + TOOLCHAIN: 1.63.0 + steps: + - name: Checkout source code + uses: actions/checkout@v3 + - 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 rustfmt + run: | + rustup component add rustfmt + - name: Run rustfmt checks + run: ci/rustfmt.sh