update CI
This commit is contained in:
parent
3b4dd9d5c3
commit
c39694e3cc
76
va416xx/.github/workflows/ci.yml
vendored
76
va416xx/.github/workflows/ci.yml
vendored
@ -1,64 +1,44 @@
|
|||||||
on: [push]
|
name: ci
|
||||||
|
on: [push, pull_request]
|
||||||
name: build
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Check
|
name: Check build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
targets: "thumbv7em-none-eabihf"
|
||||||
toolchain: stable
|
- run: cargo check --target thumbv7em-none-eabihf
|
||||||
target: thumbv7em-none-eabihf
|
- run: cargo check --target thumbv7em-none-eabihf --examples
|
||||||
override: true
|
- run: cargo check -p va416xx --target thumbv7em-none-eabihf --all-features
|
||||||
- uses: actions-rs/cargo@v1
|
- run: cargo check -p va416xx-hal --target thumbv7em-none-eabihf --features "defmt"
|
||||||
with:
|
|
||||||
use-cross: true
|
|
||||||
command: check
|
|
||||||
args: --target thumbv7em-none-eabihf
|
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
name: Rustfmt
|
name: Check formatting
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
- run: cargo fmt --all -- --check
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
docs:
|
||||||
override: true
|
name: Check Documentation Build
|
||||||
- run: rustup component add rustfmt
|
runs-on: ubuntu-latest
|
||||||
- uses: actions-rs/cargo@v1
|
steps:
|
||||||
with:
|
- uses: actions/checkout@v4
|
||||||
command: fmt
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
args: --all -- --check
|
- run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx --all-features
|
||||||
|
- run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p va416xx-hal --features "defmt va41630"
|
||||||
|
- run: RUSTDOCFLAGS="--cfg docsrs --generate-link-to-definition -Z unstable-options" cargo +nightly doc -p vorago-peb1
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
name: Clippy
|
name: Clippy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
targets: "thumbv7em-none-eabihf"
|
||||||
toolchain: stable
|
- run: cargo clippy --target thumbv7em-none-eabihf -- -D warnings
|
||||||
target: thumbv7em-none-eabihf
|
|
||||||
override: true
|
|
||||||
- run: rustup component add clippy
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
use-cross: true
|
|
||||||
command: clippy
|
|
||||||
args: --target thumbv7em-none-eabihf -- -D warnings
|
|
||||||
|
|
||||||
ci:
|
|
||||||
if: ${{ success() }}
|
|
||||||
# all new jobs must be added to this list
|
|
||||||
needs: [check, fmt, clippy]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: CI succeeded
|
|
||||||
run: exit 0
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user