Skip to content

Commit

Permalink
Move embedded-hal to a subdir, add workspace, simplify CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Sep 26, 2022
1 parent 3b6b07d commit 6d22f98
Show file tree
Hide file tree
Showing 25 changed files with 55 additions and 187 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/ci-async.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/ci-bus.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/ci.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/clippy-async.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/clippy-bus.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ on:

name: Clippy check
jobs:
clippy_check:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
# embedded-hal-async needs nightly.
# Use a pinned version to avoid spontaneous breakages (new clippy lints are added often)
toolchain: nightly-2022-09-05
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,4 @@ jobs:
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check
working-directory: embedded-hal-async
- run: cargo fmt --check
36 changes: 21 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,41 @@ on:
branches: [ staging, trying, master ]
pull_request:

name: Test Suite
name: Continuous integration

env:
RUSTFLAGS: '--deny warnings'

jobs:
ci-linux-test:
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
# All generated code should be running on stable now
rust:
- stable
- 1.54.0 # MSRV
- nightly

include:
- rust: 1.54.0
TARGET: x86_64-unknown-linux-gnu

# Test nightly but don't fail
- rust: nightly
experimental: true
TARGET: x86_64-unknown-linux-gnu
# The default target we're compiling on and for
target:
- x86_64-unknown-linux-gnu
- thumbv6m-none-eabi
- thumbv7m-none-eabi

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.TARGET }}
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test

- run: sed -i '/nightly-only/d' Cargo.toml
if: matrix.toolchain != 'nightly'

- run: cargo check --target=${{ matrix.target }}

- run: cargo test --target=${{ matrix.target }}
if: contains(matrix.target, 'linux')
24 changes: 9 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
[package]
authors = [
"The Embedded HAL Team <embedded-hal@teams.rust-embedded.org>",
"Jorge Aparicio <jorge@japaric.io>",
"Jonathan 'theJPster' Pallant <github@thejpster.org.uk>"
[workspace]

# CI removes lines containing 'nightly-only' when not building with nightly.
members = [
"embedded-hal",
"embedded-hal-async", # nightly-only
"embedded-hal-nb",
"embedded-hal-bus",
"embedded-can",
]
categories = ["asynchronous", "embedded", "hardware-support", "no-std"]
description = " A Hardware Abstraction Layer (HAL) for embedded systems "
documentation = "https://docs.rs/embedded-hal"
edition = "2018"
keywords = ["hal", "IO"]
license = "MIT OR Apache-2.0"
name = "embedded-hal"
readme = "README.md"
repository = "https://github.com/rust-embedded/embedded-hal"
version = "1.0.0-alpha.8"
2 changes: 1 addition & 1 deletion embedded-can/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ readme = "README.md"
repository = "https://github.com/rust-embedded/embedded-hal"

[dependencies]
embedded-hal = { version = "=1.0.0-alpha.8", path = ".." }
embedded-hal = { version = "=1.0.0-alpha.8", path = "../embedded-hal" }
nb = "1"
2 changes: 1 addition & 1 deletion embedded-hal-async/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ repository = "https://github.com/rust-embedded/embedded-hal"
version = "0.1.0-alpha.1"

[dependencies]
embedded-hal = { version = "=1.0.0-alpha.8", path = ".." }
embedded-hal = { version = "=1.0.0-alpha.8", path = "../embedded-hal" }
2 changes: 1 addition & 1 deletion embedded-hal-bus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ repository = "https://github.com/rust-embedded/embedded-hal"
version = "0.1.0-alpha.0"

[dependencies]
embedded-hal = { version = "=1.0.0-alpha.8", path = ".." }
embedded-hal = { version = "=1.0.0-alpha.8", path = "../embedded-hal" }
2 changes: 1 addition & 1 deletion embedded-hal-nb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ readme = "README.md"
repository = "https://github.com/rust-embedded/embedded-hal"

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

[dev-dependencies.stm32f1]
Expand Down
File renamed without changes.
16 changes: 16 additions & 0 deletions embedded-hal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
authors = [
"The Embedded HAL Team <embedded-hal@teams.rust-embedded.org>",
"Jorge Aparicio <jorge@japaric.io>",
"Jonathan 'theJPster' Pallant <github@thejpster.org.uk>"
]
categories = ["asynchronous", "embedded", "hardware-support", "no-std"]
description = " A Hardware Abstraction Layer (HAL) for embedded systems "
documentation = "https://docs.rs/embedded-hal"
edition = "2018"
keywords = ["hal", "IO"]
license = "MIT OR Apache-2.0"
name = "embedded-hal"
readme = "README.md"
repository = "https://github.com/rust-embedded/embedded-hal"
version = "1.0.0-alpha.8"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.

0 comments on commit 6d22f98

Please sign in to comment.