Skip to content

Commit

Permalink
Remove actions-rs from CI
Browse files Browse the repository at this point in the history
It's easy enough to use rustup and cargo directly. As of this commit, CI
will promote clippy warnings in examples.
  • Loading branch information
mciantyre committed Jun 20, 2024
1 parent 36dba8f commit 9a0f37f
Showing 1 changed file with 22 additions and 59 deletions.
81 changes: 22 additions & 59 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- uses: actions-rs/cargo@v1
name: Check formatting
with:
command: fmt
args: --all -- --check
- name: Install a stable toolchain with rustfmt
run: rustup toolchain install stable --no-self-update --profile minimal --component rustfmt
- name: Check formatting
run: cargo fmt --all -- --check

# Checks the common HAL for all chips supported by imxrt-ral.
lint-hal:
Expand All @@ -37,16 +31,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- uses: actions-rs/clippy-check@v1
name: Lint imxrt-hal
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --features=${{ matrix.chips }} --package=imxrt-hal -- -D warnings
- name: Install a stable toolchain with clippy
run: rustup toolchain install stable --no-self-update --profile minimal --component clippy
- name: Lint imxrt-hal
run: cargo clippy --features=${{ matrix.chips }} --package=imxrt-hal -- -D warnings

# Indirectly checks & lints the HAL with the HAL's chip feature, and also
# checks & lints the imxrt-log package.
Expand All @@ -65,16 +53,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- uses: actions-rs/clippy-check@v1
name: Lint imxrt-log
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --features=${{ matrix.chips }} --package=imxrt-log --package=imxrt-hal -- -D warnings
- name: Install a stable toolchain with clippy
run: rustup toolchain install stable --no-self-update --profile minimal --component clippy
- name: Lint imxrt-log
run: cargo clippy --features=${{ matrix.chips }} --package=imxrt-log --package=imxrt-hal -- -D warnings

# Lint and build examples for boards.
examples:
Expand Down Expand Up @@ -105,22 +87,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
target: thumbv7em-none-eabihf
- name: Install a stable toolchain, clippy, for the MCU target
run: rustup toolchain install stable --no-self-update --profile minimal --component clippy --target thumbv7em-none-eabihf
- name: Lint board and examples
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: ${{ matrix.config }} --target=thumbv7em-none-eabihf
run: cargo clippy ${{ matrix.config }} --target=thumbv7em-none-eabihf -- -D warnings
- name: Build examples
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.config }} --target=thumbv7em-none-eabihf --release
run: cargo build ${{ matrix.config }} --target=thumbv7em-none-eabihf --release

# Run unit, integration tests.
#
Expand All @@ -141,15 +113,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install a stable toolchain
run: rustup toolchain install stable --no-self-update --profile minimal
- name: Run unit, integration tests
uses: actions-rs/cargo@v1
with:
command: test
args: --features=${{ matrix.chips }} --tests --package=imxrt-hal --package=imxrt-log
run: cargo test --features=${{ matrix.chips }} --tests --package=imxrt-hal --package=imxrt-log

# Ensures that documentation builds, and that links are valid
docs:
Expand All @@ -159,13 +126,9 @@ jobs:
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install a stable toolchain
run: rustup toolchain install stable --no-self-update --profile minimal
- name: Run documentation tests
uses: actions-rs/cargo@v1
with:
command: test
args: --features=board/teensy4 --workspace --doc
run: cargo test --features=board/teensy4 --workspace --doc
- name: Check documentation, doclinks throughout workspace
run: cargo doc --workspace --no-deps --features=board/teensy4

0 comments on commit 9a0f37f

Please sign in to comment.