run: |
rustup target add thumbv7m-none-eabi
sudo apt-get -y install gcc-arm-none-eabi
+ - name: Check for unknown cfg tags
+ run: ci/check-cfg-flags.py
- name: shellcheck the CI script
if: "matrix.platform == 'ubuntu-latest'"
run: |
sudo apt-get -y install shellcheck
shellcheck ci/ci-tests.sh
+ - name: Set RUSTFLAGS to deny warnings
+ if: "matrix.toolchain == '1.63.0'"
+ run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
- name: Run CI script
shell: bash # Default on Winblows is powershell
run: CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
fuzz:
runs-on: ubuntu-latest
env:
- TOOLCHAIN: 1.58
+ TOOLCHAIN: 1.63
steps:
- name: Checkout source code
uses: actions/checkout@v3
run: |
sudo apt-get update
sudo apt-get -y install build-essential binutils-dev libunwind-dev
+ - 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
- name: Run fuzzers
- 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