Skip to content

Commit

Permalink
Add GitHub actions for continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
zargony committed Jul 20, 2024
1 parent d35c68e commit 3458871
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI
on:
push:
# paths:
# - 'firmware/**'
pull_request:
# paths:
# - 'firmware/**'

env:
CARGO_TERM_COLOR: always
defaults:
run:
working-directory: firmware

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: riscv32imc-unknown-none-elf
components: clippy, rust-src, rustfmt
- name: Check out repository
uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- --deny warnings --allow deprecated

build:
name: Build
needs: [check]
runs-on: ubuntu-latest
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: riscv32imc-unknown-none-elf
- name: Check out repository
uses: actions/checkout@v4
- name: Build everything
run: cargo build --workspace --all-targets --release

0 comments on commit 3458871

Please sign in to comment.