Skip to content

Compile and Test #1

Compile and Test

Compile and Test #1

Workflow file for this run

name: Compile and Test
on:
pull_request:
merge_group:
workflow_dispatch:
push:
tags:
- '*'
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '--deny warnings'
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv7em-none-eabi
- run: cargo fmt -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv7em-none-eabi
- run: cargo clippy --no-deps -- -Dwarnings
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy, rust-src
- run: cargo test
test-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv7em-none-eabi
- run: >
cargo build
--target thumbv7m-none-eabi
--all-features
release:
runs-on: ubuntu-latest
steps:
- name: version
run: echo "version=$(cargo pkgid | cut -d '#' -f2)" >> $GITHUB_OUTPUT
id: version
- name: Release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
#body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}