Skip to content

Commit 5efaeae

Browse files
authored
Rework CI (#19)
.. and update some versions.
1 parent c5fbe5e commit 5efaeae

File tree

3 files changed

+24
-32
lines changed

3 files changed

+24
-32
lines changed

.github/workflows/ci.yml

+11-16
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ on:
99

1010
name: CI
1111

12+
env:
13+
RUSTFLAGS: "-D warnings"
14+
RUST_BACKTRACE: 1
15+
1216
jobs:
1317
build:
1418
name: Build
1519
runs-on: ubuntu-latest
16-
env:
17-
RUSTFLAGS: "-D warnings"
1820
steps:
1921
- name: Checkout sources
2022
uses: actions/checkout@v4
@@ -30,8 +32,6 @@ jobs:
3032
build_examples:
3133
name: Build examples
3234
runs-on: ubuntu-latest
33-
env:
34-
RUSTFLAGS: "-D warnings"
3535
steps:
3636
- name: Checkout sources
3737
uses: actions/checkout@v4
@@ -47,8 +47,6 @@ jobs:
4747
build_examples_release:
4848
name: Build examples (release)
4949
runs-on: ubuntu-latest
50-
env:
51-
RUSTFLAGS: "-D warnings"
5250
steps:
5351
- name: Checkout sources
5452
uses: actions/checkout@v4
@@ -64,9 +62,6 @@ jobs:
6462
tests:
6563
name: Run tests (x86_64)
6664
runs-on: ubuntu-latest
67-
env:
68-
RUSTFLAGS: "-D warnings"
69-
RUST_BACKTRACE: 1
7065
steps:
7166
- name: Checkout sources
7267
uses: actions/checkout@v4
@@ -103,7 +98,7 @@ jobs:
10398
run: cargo +stable fmt --all -- --check
10499

105100
- name: Run cargo clippy
106-
run: cargo clippy --all-features --examples -- -D warnings
101+
run: cargo clippy --all-features --examples --lib --bins -- -D warnings
107102

108103
docs:
109104
name: Documentation
@@ -120,13 +115,11 @@ jobs:
120115
- name: Run cargo doc
121116
env:
122117
RUSTDOCFLAGS: "-Dwarnings"
123-
run: cargo doc --no-deps --examples
118+
run: cargo doc --no-deps --all-features
124119

125120
msrv:
126121
name: Minimum Supported Rust Version
127122
runs-on: ubuntu-latest
128-
env:
129-
RUSTFLAGS: "-D warnings"
130123
steps:
131124
- name: Checkout sources
132125
uses: actions/checkout@v4
@@ -142,9 +135,9 @@ jobs:
142135
#- uses: Swatinem/rust-cache@v1
143136

144137
- name: Check MSRV
145-
#run: cargo msrv --log-target=stdout --log-level debug --output-format json --features "imxrt-hal/imxrt1060,imxrt-ral/imxrt1062" --target=thumbv7em-none-eabihf
146-
#run: cargo msrv --log-target=stdout --log-level debug --output-format json --features "imxrt-hal/imxrt1060,imxrt-ral/imxrt1062" --target=thumbv7em-none-eabihf verify
147-
run: cargo msrv --output-format json --features "imxrt-hal/imxrt1060,imxrt-ral/imxrt1062" --target=thumbv7em-none-eabihf verify
138+
#run: cargo msrv --log-target=stdout --log-level debug --output-format json --all-features --target=thumbv7em-none-eabihf
139+
#run: cargo msrv --log-target=stdout --log-level debug --output-format json --all-features --target=thumbv7em-none-eabihf verify
140+
run: cargo msrv --output-format json --all-features --target=thumbv7em-none-eabihf verify
148141

149142
semver:
150143
name: Semantic Versioning
@@ -161,6 +154,8 @@ jobs:
161154
targets: thumbv7em-none-eabihf
162155
- name: Check semver
163156
uses: obi1kenobi/cargo-semver-checks-action@v2
157+
with:
158+
feature-group: "all-features"
164159

165160
release:
166161
name: Publish version

Cargo.toml

+9-12
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,29 @@ exclude = ["/.gitignore", "/.github/", "/.vscode/"]
1717
default = []
1818

1919
# Do not use; internally required for Github CI
20-
github_ci = ["teensy4-bsp"]
21-
20+
_ci = ["imxrt-ral/imxrt1062"]
2221

2322
[dependencies]
2423
# Hardware
2524
imxrt-dma = "0.1.1"
26-
imxrt-iomuxc = "0.2.6"
27-
imxrt-ral = "0.5.1"
25+
imxrt-iomuxc = "0.2.7"
26+
imxrt-ral = "0.5.3"
2827

2928
# Common
30-
log = "0.4.19"
29+
log = "0.4.21"
3130
critical-section = "1.1.2"
32-
paste = "1.0.12"
31+
paste = "1.0.15"
3332
snafu = { version = "0.8.3", default-features = false }
3433

3534
# Pixel types
36-
palette = { version = "0.7.2", default-features = false, features = ["libm"] }
35+
palette = { version = "0.7.6", default-features = false, features = ["libm"] }
3736

3837
# Async reactor, for executing DMA actions
3938
cassette = "0.3.0"
40-
futures = { version = "0.3.29", default-features = false, features = [
39+
futures = { version = "0.3.30", default-features = false, features = [
4140
"async-await",
4241
] }
4342

44-
# Additional CI dependencies
45-
teensy4-bsp = { version = "0.5", optional = true }
46-
4743

4844
[dev-dependencies]
4945
cortex-m = "0.7.7"
@@ -53,9 +49,10 @@ rtic = { version = "2.1.1", features = ["thumbv7-backend"] }
5349

5450
# Board support package
5551
teensy4-bsp = { version = "0.5.0", features = ["rt"] }
56-
imxrt-hal = "0.5.5"
52+
#imxrt-hal = "0.5.5"
5753

5854
# Allow docsrs options
5955
[package.metadata.docs.rs]
56+
default-target = "thumbv7em-none-eabihf"
6057
all-features = true
6158
rustdoc-args = ["--cfg", "docsrs"]

examples/triple_332_dma_rtic.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ mod app {
122122
let mut neopixel_dma = dma[0].take().unwrap();
123123
neopixel_dma.set_interrupt_on_completion(true);
124124
unsafe {
125-
cortex_m::peripheral::NVIC::unmask(imxrt_ral::interrupt::DMA0_DMA16);
125+
cortex_m::peripheral::NVIC::unmask(ral::interrupt::DMA0_DMA16);
126126
}
127127

128128
// Ws2812 driver
@@ -138,7 +138,7 @@ mod app {
138138
let mut neopixel = WS2812Driver::init(flexio2, (pins.p6, pins.p7, pins.p8)).unwrap();
139139
let neopixel_interrupt_handler = neopixel.take_interrupt_handler(cx.local.ws2812_data);
140140
unsafe {
141-
cortex_m::peripheral::NVIC::unmask(imxrt_ral::interrupt::FLEXIO2);
141+
cortex_m::peripheral::NVIC::unmask(ral::interrupt::FLEXIO2);
142142
}
143143
log::debug!("FlexIO initialized.");
144144

@@ -160,8 +160,8 @@ mod app {
160160
#[task(priority = 10, binds = DMA0_DMA16)]
161161
fn on_dma(_cx: on_dma::Context) {
162162
unsafe {
163-
imxrt_hal::dma::DMA.on_interrupt(0);
164-
imxrt_hal::dma::DMA.on_interrupt(16);
163+
hal::dma::DMA.on_interrupt(0);
164+
hal::dma::DMA.on_interrupt(16);
165165
}
166166
}
167167

0 commit comments

Comments
 (0)