Skip to content

Commit

Permalink
Fixing coverage
Browse files Browse the repository at this point in the history
Also merging the no_std tasks in to the main workflow.
  • Loading branch information
ecton committed Jan 23, 2023
1 parent da7c03c commit c75207f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 40 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/nostd.yml

This file was deleted.

49 changes: 47 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,56 @@ jobs:
- name: Install Rust
uses: hecrj/setup-rust-action@v1

- name: Run clippy
- name: Run clippy (all features)
run: |
cargo clippy
cargo clippy --features heapless
- name: Run clippy (no features)
run: |
cargo clippy --no-default-features
- name: Run clippy (alloc)
run: |
cargo clippy --no-default-features --features alloc
- name: Run clippy (heapless)
run: |
cargo clippy --no-default-features --features heapless
# Do not pass --all-features, as it enables the "nightly" flag.
- name: Run unit tests
run: |
cargo test --all-targets --features heapless
build-nostd:
name: Build on no_std target (thumbv7em-none-eabi)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: thumbv7em-none-eabi
- run: cargo build --target thumbv7em-none-eabi --lib --release --no-default-features

build-alloc:
name: Build on no_std target (thumbv7em-none-eabi)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: thumbv7em-none-eabi
- run: cargo build --target thumbv7em-none-eabi --lib --release --no-default-features --features alloc

build-heapless:
name: Build on no_std target (thumbv7em-none-eabi)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: thumbv7em-none-eabi
- run: cargo build --target thumbv7em-none-eabi --lib --release --no-default-features --features heapless
3 changes: 2 additions & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ impl khonsu_tools::universal::code_coverage::Config for Config {
String::from("test"),
String::from("--workspace"),
String::from("--all-targets"),
String::from("--features heapless"),
String::from("--features"),
String::from("heapless"),
]
}
}

0 comments on commit c75207f

Please sign in to comment.