Skip to content

Commit

Permalink
Add CI via GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kesyog committed Jun 1, 2024
1 parent f704058 commit 48dc2e1
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Rust

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
device:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
targets: "thumbv7em-none-eabihf"
- name: Build nrf52832
run: cargo build --verbose --release --bin proto1_0 --bin calibration_p1 --bin blinky_p1 --features nrf52832
working-directory: hangman
- name: Build nrf52840
run: cargo build --release --bin proto0_0 --bin calibration_p0 --bin blinky_p0 --bin dongle --features nrf52840 --no-default-features
working-directory: hangman
- name: Clippy nrf52832
run: cargo clippy --bin proto1_0 --bin calibration_p1 --bin blinky_p1 --features nrf52832
working-directory: hangman
- name: Clippy nrf52840
run: cargo clippy --bin proto0_0 --bin calibration_p0 --bin blinky_p0 --bin dongle --features nrf52840 --no-default-features
working-directory: hangman
host:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Build hangman_utils
run: cargo build
working-directory: hangman_utils
- name: Clippy hangman_utils
run: cargo clippy
working-directory: hangman_utils
- name: Test
run: cargo test --verbose
working-directory: hangman_utils
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: rustfmt hangman
run: cargo fmt --check
working-directory: hangman
- name: rustfmt hangman_utils
run: cargo fmt --check
working-directory: hangman_utils

0 comments on commit 48dc2e1

Please sign in to comment.