Skip to content

rename feature embedded_hal to embedded-hal-02 #248

rename feature embedded_hal to embedded-hal-02

rename feature embedded_hal to embedded-hal-02 #248

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: CI
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo check
test:
name: Test Suite
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test
- run: cargo test --no-default-features
- run: cargo test --no-default-features --features=alloc
- run: cargo test --no-default-features --features=embedded-hal-02
- run: cargo test --no-default-features --features=embedded-hal-02,alloc
- run: cargo test --no-default-features --features=embedded-hal-02,alloc,std
- run: cargo test --no-default-features --features=embedded-hal-02,alloc,std,serde
build_examples:
name: Build Examples
runs-on: ubuntu-latest
steps:
- run: sudo apt install libudev-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build -p sml-rs-serialport-example
build_esp_examples:
name: ESP Examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- esp32c3-power-meter-mock
- esp32c3-sml-reader
- esp32c3-sml-reader-async
action:
- command: build
args: --release
- command: build
args: --release --all-features
- command: fmt
args: --all -- --check --color always
- command: clippy
args: --all-features --workspace -- -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
target: riscv32imc-unknown-none-elf
toolchain: nightly
components: rust-src, rustfmt, clippy
- name: Build
working-directory: examples/embedded/${{ matrix.project }}
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings
semver_checks:
name: Semver Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: obi1kenobi/cargo-semver-checks-action@v2
check_subtrees_up_to_date:
name: Check subtrees are up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: check libsml-testing subtree
run: |
git subtree pull \
--prefix tests/libsml-testing \
https://github.com/devZer0/libsml-testing.git \
master --squash 2>&1 | tee output.txt
cat output.txt | grep -q "Subtree is already at commit"