Skip to content
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
30 changes: 5 additions & 25 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,16 @@ jobs:
uses: seL4/ci-actions/.github/workflows/pr.yml@master

clippy_check:
runs-on: ubuntu-latest
# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"
runs-on: [self-hosted, macos, ARM64]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Clippy
run: cd tool/microkit && cargo clippy --all-targets --all-features
# Make sure CI fails on all warnings, including Clippy lints
run: nix develop --ignore-environment -c bash -c "cd tool/microkit && cargo-clippy --all-targets --all-features -- -D warnings"

rustfmt_check:
runs-on: ubuntu-latest
runs-on: [self-hosted, macos, ARM64]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run rustfmt
run: cd tool/microkit && cargo fmt --check
run: nix develop --ignore-environment -c bash -c "cd tool/microkit && cargo-fmt --check"
4 changes: 2 additions & 2 deletions tool/microkit/src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl ElfFile {
pub fn from_path(path: &Path) -> Result<ElfFile, String> {
let bytes = match fs::read(path) {
Ok(bytes) => bytes,
Err(err) => return Err(format!("failed to read ELF: {}", err)),
Err(err) => return Err(format!("failed to read ELF: {err}")),
};

let magic = &bytes[0..4];
Expand All @@ -241,7 +241,7 @@ impl ElfFile {
hdr_size = std::mem::size_of::<ElfHeader64>();
word_size = 64;
}
_ => return Err(format!("invalid class '{}'", class)),
_ => return Err(format!("invalid class '{class}'")),
};

// Now need to read the header into a struct
Expand Down
Loading