-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from AeroRust/ci/fix-cargo-toml-add-rust-build-…
…workflows Ci(fix): Cargo.toml & add rust build workflows
- Loading branch information
Showing
5 changed files
with
125 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Build | ||
|
||
on: [push] | ||
|
||
# Stops the running workflow of previous pushes | ||
concurrency: | ||
# cancel per workflow | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Lint, test and build rust-${{ matrix.toolchain }} ${{ matrix.target }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
toolchain: | ||
- stable | ||
- beta | ||
- nightly | ||
target: | ||
- thumbv7em-none-eabi | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Rust setup rust-${{ matrix.toolchain }} ${{ matrix.target }} | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
targets: ${{ matrix.target }} | ||
components: clippy, rustfmt | ||
|
||
- id: cache-rust | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Lint - rustfmt | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Lint - clippy | ||
run: cargo clippy --all --no-deps -- -D warnings | ||
|
||
- name: Check | ||
run: cargo check | ||
|
||
- name: Test | ||
run: cargo test --verbose --lib --bins --tests --benches --example angle | ||
|
||
- name: Add nightly to build docs | ||
run: rustup toolchain install nightly | ||
|
||
- name: Build docs with --all-features | ||
env: | ||
RUSTDOCFLAGS: -D warnings --cfg docsrs | ||
run: cargo +nightly doc --no-deps --all-features | ||
|
||
test-no_std_fixed: | ||
name: Test no_std_fixed rust-${{ matrix.toolchain }} ${{ matrix.target }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
toolchain: | ||
- nightly | ||
target: | ||
- thumbv7em-none-eabi | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
targets: ${{ matrix.target }} | ||
- run: cargo test --verbose --example no_std_fixed | ||
|
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: MSRV build | ||
|
||
on: | ||
push: | ||
# will checkout the default branch `development` | ||
schedule: | ||
# run every Friday at 17:00 | ||
- cron: '00 17 * * 5' | ||
# Or ran manually | ||
workflow_dispatch: | ||
|
||
# Stops the running workflow of previous pushes | ||
concurrency: | ||
# cancel per workflow | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
RUST_MSRV_VERSION: '1.71' | ||
|
||
jobs: | ||
build: | ||
name: Test and build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Rust setup (MSRV) | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ env.RUST_MSRV_VERSION }} | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- run: cargo check | ||
- run: cargo test --verbose --lib --bins --tests --benches --example angle |
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
File renamed without changes.
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