Skip to content

Commit

Permalink
Merge pull request #2 from jonathanpallant/add-ci
Browse files Browse the repository at this point in the history
Add some Github Actions.
  • Loading branch information
jamesmunns authored Jan 26, 2024
2 parents 4a4acb2 + e623eaf commit 7bef068
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-FileCopyrightText: 2024 Jonathan 'theJPster' Pallant <[email protected]>
#
# SPDX-License-Identifier: MIT OR Apache-2.0

name: Clippy

on: [push, pull_request]

jobs:
cargo-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clippy
run: cargo clippy
15 changes: 15 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-FileCopyrightText: 2024 Jonathan 'theJPster' Pallant <[email protected]>
#
# SPDX-License-Identifier: MIT OR Apache-2.0

name: Format

on: [push, pull_request]

jobs:
cargo-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup component add rustfmt
- run: cargo fmt -- --check
44 changes: 44 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SPDX-FileCopyrightText: 2024 Jonathan 'theJPster' Pallant <[email protected]>
#
# SPDX-License-Identifier: MIT OR Apache-2.0

name: Build and Test

on: [push, pull_request]

jobs:
cargo-build-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
cargo build
cargo build --all-features
cargo-build-cross:
runs-on: ubuntu-latest
strategy:
matrix:
target: [thumbv6m-none-eabi, riscv32i-unknown-none-elf, thumbv7m-none-eabi, thumbv7em-none-eabi, thumbv8m.base-none-eabi, thumbv8m.main-none-eabi, riscv32imac-unknown-none-elf]
steps:
- uses: actions/checkout@v4
- run: rustup target add ${{ matrix.target }}
- run: |
cargo build --target=${{ matrix.target }}
cargo build --target=${{ matrix.target }} --features=cas,critical-section
cargo-build-cross-with-cas:
runs-on: ubuntu-latest
strategy:
matrix:
target: [thumbv7m-none-eabi, thumbv7em-none-eabi, thumbv8m.base-none-eabi, thumbv8m.main-none-eabi, riscv32imac-unknown-none-elf]
steps:
- uses: actions/checkout@v4
- run: rustup target add ${{ matrix.target }}
- run: |
cargo build --target=${{ matrix.target }} --features=cas
cargo-test-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
cargo test
cargo test --all-features

0 comments on commit 7bef068

Please sign in to comment.