summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorhuntc <huntchr@gmail.com>2020-12-26 14:41:53 +1100
committerhuntc <huntchr@gmail.com>2020-12-26 14:41:53 +1100
commitd04fbf1c255278c717c99ba9e4dd719c61863f73 (patch)
treefb05422d7a7a39f451f5e0473d9b7fa43fde02ab /.github
parent12ac220af0c53d1ae19e5ae89f080190e44591f9 (diff)
downloadnrf-softdevice-d04fbf1c255278c717c99ba9e4dd719c61863f73.zip
Improvements to CI
Introduces a cache for builds and invokes `rustfmt`, failing if there are formatting issues.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/rust.yml13
1 files changed, 13 insertions, 0 deletions
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
+