-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7176d1b
commit 9325f76
Showing
3 changed files
with
31 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,127 +3,55 @@ on: [push, pull_request] | |
name: CI | ||
|
||
jobs: | ||
check: | ||
name: Build | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- stable | ||
# msrv | ||
- 1.56.0 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --all | ||
|
||
test: | ||
name: Test Suite | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --all | ||
toolchain: ${{ matrix.toolchain }} | ||
|
||
# TODO: Enable Miri | ||
# test_miri: | ||
# name: Miri Test | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions-rs/toolchain@v1 | ||
# with: | ||
# toolchain: nightly | ||
# override: true | ||
# components: miri | ||
# - run: cargo miri test | ||
# | ||
# test_miri_big_endian: | ||
# name: Miri Test Big Endian | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions-rs/toolchain@v1 | ||
# with: | ||
# toolchain: nightly | ||
# override: true | ||
# components: miri | ||
# target: armebv7r-none-eabi | ||
# - run: cargo miri test --target armebv7r-none-eabi | ||
|
||
examples: | ||
name: Examples | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
# build | ||
- run: cargo build --all | ||
# test | ||
- run: cargo test --all | ||
# run examples | ||
- run: cargo run --example 2>&1 | grep -P ' ' | awk '{print $1}' | xargs -i cargo run --example {} | ||
|
||
fmt: | ||
name: Rustfmt | ||
fmt-clippy-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- run: rustup component add clippy | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings | ||
- run: cargo clippy -- -D warnings | ||
- run: cargo fmt --all -- --check | ||
|
||
ensure_no_std: | ||
name: Ensure no_std | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master | ||
with: | ||
toolchain: nightly | ||
override: true | ||
target: thumbv7em-none-eabihf | ||
- run: cd ensure_no_std && cargo build --release --target thumbv7em-none-eabihf | ||
|
||
ensure_wasm: | ||
name: Ensure wasm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master | ||
with: | ||
toolchain: nightly | ||
override: true | ||
- uses: jetli/[email protected] | ||
with: | ||
version: 'latest' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters