From d04fbf1c255278c717c99ba9e4dd719c61863f73 Mon Sep 17 00:00:00 2001 From: huntc Date: Sat, 26 Dec 2020 14:41:53 +1100 Subject: Improvements to CI Introduces a cache for builds and invokes `rustfmt`, failing if there are formatting issues. --- .github/workflows/rust.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.github') diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b2505e8..955c1bb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,10 +16,23 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/toolchain@v1 with: toolchain: nightly target: thumbv7em-none-eabihf override: true + components: rustfmt + - name: Build run: ./test-build.sh + + - name: Format + run: cargo fmt --verbose + -- cgit v1.2.3