Skip to content

Commit

Permalink
Add Github Actions workflow (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbeaumont authored Feb 15, 2021
1 parent 5896b49 commit c18aaea
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on: pull_request

jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features -- -D warnings
build_and_test:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: thumbv6m-none-eabi
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- name: Build example
uses: actions-rs/cargo@v1
with:
command: build
args: --release --example stm32f042 --target thumbv6m-none-eabi
use-cross: true
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --lib

0 comments on commit c18aaea

Please sign in to comment.