Merge pull request 'add basic CI' (#5) from add-basic-ci into main
Some checks failed
ci / Check build (push) Has been cancelled
ci / Check formatting (push) Has been cancelled
ci / Check Documentation Build (push) Has been cancelled
ci / Clippy (push) Has been cancelled

Reviewed-on: #5
This commit is contained in:
2025-06-26 20:27:15 +02:00
5 changed files with 55 additions and 10 deletions

47
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: ci
on: [push, pull_request]
jobs:
check:
name: Check build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-src
# Copy config file for rustflags and to build core/alloc.
- run: cp .cargo/def-config.toml .cargo/config.toml
- run: cargo check --target armv7a-none-eabihf -p zynq7000
- run: cargo check --target armv7a-none-eabihf -p zynq7000-rt
fmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all -- --check
docs:
name: Check Documentation Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p zynq7000-rt --all-features
- run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p zynq7000 --all-features
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rust-src
# Copy config file for rustflags and to build core/alloc.
- run: cp .cargo/def-config.toml .cargo/config.toml
- run: cargo clippy --target armv7a-none-eabihf -- -D warnings

View File

@ -16,7 +16,7 @@ zynq7000-rt = { path = "../../zynq7000-rt" }
zynq7000 = { path = "../../zynq7000" } zynq7000 = { path = "../../zynq7000" }
zynq7000-hal = { path = "../../zynq7000-hal" } zynq7000-hal = { path = "../../zynq7000-hal" }
zynq7000-embassy = { path = "../../zynq7000-embassy" } zynq7000-embassy = { path = "../../zynq7000-embassy" }
dht-sensor = { git = "https://github.com/robamu/dht-sensor.git", branch = "bump-embedded-hal-deps-update-async", features = ["async"] } dht-sensor = { git = "https://github.com/michaelbeaumont/dht-sensor.git", rev = "10319bdeae9ace3bb0fc79a15da2869c5bf50f52", features = ["async"] }
static_cell = "2" static_cell = "2"
critical-section = "1" critical-section = "1"
heapless = "0.8" heapless = "0.8"
@ -25,12 +25,11 @@ embedded-hal = "1"
fugit = "0.3" fugit = "0.3"
log = "0.4" log = "0.4"
embassy-executor = { git = "https://github.com/us-irs/embassy", branch = "add-cortex-ar-support", features = [ embassy-executor = { git = "https://github.com/embassy-rs/embassy.git", branch = "main", features = [
"arch-cortex-ar", "arch-cortex-ar",
"executor-thread", "executor-thread",
"task-arena-size-65536"
]} ]}
embassy-time = { git = "https://github.com/us-irs/embassy", branch = "add-cortex-ar-support", version = "0.4", features = ["tick-hz-1_000_000"] } embassy-time = { git = "https://github.com/embassy-rs/embassy.git", branch = "main", version = "0.4", features = ["tick-hz-1_000_000"] }
[profile.release] [profile.release]
codegen-units = 1 codegen-units = 1

View File

@ -141,7 +141,7 @@ async fn main(_spawner: Spawner) -> ! {
let mut led = Output::new_for_mio(mio_pins.mio7, PinState::Low); let mut led = Output::new_for_mio(mio_pins.mio7, PinState::Low);
loop { loop {
if DHT22_AT_MIO0 { if DHT22_AT_MIO0 {
let result = dht_sensor::dht22::asynch::read(&mut delay, &mut one_wire_pin).await; let result = dht_sensor::dht22::r#async::read(&mut delay, &mut one_wire_pin).await;
match result { match result {
Ok(reading) => { Ok(reading) => {
info!("Temperature: {} C", reading.temperature); info!("Temperature: {} C", reading.temperature);

View File

@ -28,12 +28,11 @@ embedded-hal-async = "1"
fugit = "0.3" fugit = "0.3"
log = "0.4" log = "0.4"
embassy-executor = { git = "https://github.com/us-irs/embassy", branch = "add-cortex-ar-support", features = [ embassy-executor = { git = "https://github.com/embassy-rs/embassy.git", branch = "main", features = [
"arch-cortex-ar", "arch-cortex-ar",
"executor-thread", "executor-thread",
"task-arena-size-65536"
]} ]}
embassy-time = { git = "https://github.com/us-irs/embassy", branch = "add-cortex-ar-support", version = "0.4", features = ["tick-hz-1_000_000"] } embassy-time = { git = "https://github.com/embassy-rs/embassy.git", branch = "main", version = "0.4", features = ["tick-hz-1_000_000"] }
heapless = "0.8" heapless = "0.8"
axi-uartlite = { git = "https://egit.irs.uni-stuttgart.de/rust/axi-uartlite.git" } axi-uartlite = { git = "https://egit.irs.uni-stuttgart.de/rust/axi-uartlite.git" }
axi-uart16550 = { git = "https://egit.irs.uni-stuttgart.de/rust/axi-uart16550.git" } axi-uart16550 = { git = "https://egit.irs.uni-stuttgart.de/rust/axi-uart16550.git" }

View File

@ -15,5 +15,5 @@ critical-section = "1"
once_cell = { version = "1", default-features = false, features = ["critical-section"] } once_cell = { version = "1", default-features = false, features = ["critical-section"] }
zynq7000-hal = { path = "../zynq7000-hal" } zynq7000-hal = { path = "../zynq7000-hal" }
embassy-time-driver = { git = "https://github.com/us-irs/embassy", branch = "add-cortex-ar-support", version = "0.2" } embassy-time-driver = { git = "https://github.com/embassy-rs/embassy.git", branch = "main", version = "0.2" }
embassy-time-queue-utils = { git = "https://github.com/us-irs/embassy", branch = "add-cortex-ar-support", version = "0.1" } embassy-time-queue-utils = { git = "https://github.com/embassy-rs/embassy.git", branch = "main", version = "0.1" }