Skip to content

Update CI #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 44 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,61 @@
on:
push: # Run CI for all branches except GitHub merge queue tmp branches
branches-ignore:
- "gh-readonly-queue/**"
pull_request: # Run CI for PRs on any branch
merge_group: # Run CI for the GitHub merge queue
workflow_dispatch: # Run CI when manually requested

name: Continuous integration

jobs:
ci:
check:
runs-on: ubuntu-latest
env: {"RUSTFLAGS": "-D warnings"}
strategy:
matrix:
target:
- thumbv6m-none-eabi
- thumbv7m-none-eabi
toolchain:
- stable
- nightly

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
targets: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- run: cargo check --target=${{ matrix.target }} --examples
- if: ${{ matrix.toolchain == 'nightly' }}
run: cargo check --target=${{ matrix.target }} --examples --all-features

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
toolchain: nightly
targets: thumbv6m-none-eabi
- run: cargo clippy --all-features --examples --target=thumbv6m-none-eabi -- --deny warnings

format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
command: check
args: --target=${{ matrix.target }} --examples
components: rustfmt
- run: cargo fmt -- --check

rustdoc:
name: rustdoc
runs-on: ubuntu-latest
env: {"RUSTDOCFLAGS": "-D warnings"}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: rustdoc
run: cargo rustdoc --all-features
28 changes: 0 additions & 28 deletions .github/workflows/clippy.yml

This file was deleted.

16 changes: 5 additions & 11 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,12 @@ jobs:
ci-cron:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
target: thumbv6m-none-eabi
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --examples --target thumbv6m-none-eabi
- uses: imjohnbo/issue-bot@v2
targets: thumbv6m-none-eabi
- run: cargo check --examples --target thumbv6m-none-eabi
- uses: imjohnbo/issue-bot@v3
if: failure()
with:
title: CI Failure
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/rustfmt.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ Please refer to the documentation of [`critical-section`](https://docs.rs/critic
Licensed under either of

- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
<http://www.apache.org/licenses/LICENSE-2.0>)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)

at your option.

Expand Down
1 change: 1 addition & 0 deletions examples/global_alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fn main() -> ! {
let mut xs = Vec::new();
xs.push(1);

#[allow(clippy::empty_loop)]
loop { /* .. */ }
}

Expand Down