Skip to content

Commit 6d22f98

Browse files
committed
Move embedded-hal to a subdir, add workspace, simplify CI.
1 parent 3b6b07d commit 6d22f98

File tree

25 files changed

+55
-187
lines changed

25 files changed

+55
-187
lines changed

.github/workflows/ci-async.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/ci-bus.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/clippy-async.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/clippy-bus.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/clippy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ on:
55

66
name: Clippy check
77
jobs:
8-
clippy_check:
8+
clippy:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
1212
- uses: actions-rs/toolchain@v1
1313
with:
1414
profile: minimal
15-
toolchain: stable
15+
# embedded-hal-async needs nightly.
16+
# Use a pinned version to avoid spontaneous breakages (new clippy lints are added often)
17+
toolchain: nightly-2022-09-05
1618
override: true
1719
components: clippy
1820
- uses: actions-rs/clippy-check@v1

.github/workflows/rustfmt.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,4 @@ jobs:
1616
toolchain: nightly
1717
override: true
1818
components: rustfmt
19-
- uses: actions-rs/cargo@v1
20-
with:
21-
command: fmt
22-
args: --all -- --check
23-
- run: cargo fmt --all -- --check
24-
working-directory: embedded-hal-async
19+
- run: cargo fmt --check

.github/workflows/test.yml

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,41 @@ on:
33
branches: [ staging, trying, master ]
44
pull_request:
55

6-
name: Test Suite
6+
name: Continuous integration
77

88
env:
99
RUSTFLAGS: '--deny warnings'
1010

1111
jobs:
12-
ci-linux-test:
12+
test:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
rust: [stable]
16+
# All generated code should be running on stable now
17+
rust:
18+
- stable
19+
- 1.54.0 # MSRV
20+
- nightly
1721

18-
include:
19-
- rust: 1.54.0
20-
TARGET: x86_64-unknown-linux-gnu
21-
22-
# Test nightly but don't fail
23-
- rust: nightly
24-
experimental: true
25-
TARGET: x86_64-unknown-linux-gnu
22+
# The default target we're compiling on and for
23+
target:
24+
- x86_64-unknown-linux-gnu
25+
- thumbv6m-none-eabi
26+
- thumbv7m-none-eabi
2627

2728
steps:
2829
- uses: actions/checkout@v2
2930
- uses: actions-rs/toolchain@v1
3031
with:
3132
profile: minimal
3233
toolchain: ${{ matrix.rust }}
33-
target: ${{ matrix.TARGET }}
34+
target: ${{ matrix.target }}
3435
override: true
35-
- uses: actions-rs/cargo@v1
36-
with:
37-
command: test
36+
37+
- run: sed -i '/nightly-only/d' Cargo.toml
38+
if: matrix.toolchain != 'nightly'
39+
40+
- run: cargo check --target=${{ matrix.target }}
41+
42+
- run: cargo test --target=${{ matrix.target }}
43+
if: contains(matrix.target, 'linux')

Cargo.toml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
[package]
2-
authors = [
3-
"The Embedded HAL Team <embedded-hal@teams.rust-embedded.org>",
4-
"Jorge Aparicio <jorge@japaric.io>",
5-
"Jonathan 'theJPster' Pallant <github@thejpster.org.uk>"
1+
[workspace]
2+
3+
# CI removes lines containing 'nightly-only' when not building with nightly.
4+
members = [
5+
"embedded-hal",
6+
"embedded-hal-async", # nightly-only
7+
"embedded-hal-nb",
8+
"embedded-hal-bus",
9+
"embedded-can",
610
]
7-
categories = ["asynchronous", "embedded", "hardware-support", "no-std"]
8-
description = " A Hardware Abstraction Layer (HAL) for embedded systems "
9-
documentation = "https://docs.rs/embedded-hal"
10-
edition = "2018"
11-
keywords = ["hal", "IO"]
12-
license = "MIT OR Apache-2.0"
13-
name = "embedded-hal"
14-
readme = "README.md"
15-
repository = "https://github.com/rust-embedded/embedded-hal"
16-
version = "1.0.0-alpha.8"

embedded-can/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ readme = "README.md"
1212
repository = "https://github.com/rust-embedded/embedded-hal"
1313

1414
[dependencies]
15-
embedded-hal = { version = "=1.0.0-alpha.8", path = ".." }
15+
embedded-hal = { version = "=1.0.0-alpha.8", path = "../embedded-hal" }
1616
nb = "1"

0 commit comments

Comments
 (0)