Skip to content

Commit

Permalink
Merge pull request #648 from mkroening/ci-clippy
Browse files Browse the repository at this point in the history
ci: unify and fix clippy jobs
  • Loading branch information
jounathaen authored Feb 20, 2024
2 parents f4817a6 + ab7d47e commit 269b217
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
22 changes: 4 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,18 @@ jobs:

clippy:
name: Clippy
runs-on: ${{ matrix.os }}
strategy:
matrix:
arch: [x86_64, aarch64]
os: [ubuntu-latest, macos-latest]
exclude:
- arch: aarch64
os: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Detect target
run: |
case ${{ matrix.os }} in
ubuntu*) suffix=unknown-linux-gnu ;;
macos*) suffix=apple-darwin ;;
esac
echo "target=${{ matrix.arch }}-$suffix" >> $GITHUB_OUTPUT
id: detect_target
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ steps.detect_target.outputs.target }}
targets: x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin
components: clippy
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
run: cargo clippy --all-targets --target x86_64-unknown-linux-gnu --target x86_64-apple-darwin --target aarch64-apple-darwin -- -D warnings

clippy-test-kernel:
name: Clippy test-kernels
Expand Down
2 changes: 1 addition & 1 deletion src/macos/aarch64/vcpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ impl VirtualCPU for UhyveCPU {

let data_addr = self.vcpu.read_register(Register::X8)?;
if let Some(hypercall) =
unsafe { self.address_to_hypercall(port, data_addr as usize) }
unsafe { self.address_to_hypercall(addr, data_addr as usize) }
{
match hypercall {
Hypercall::SerialWriteByte(_char) => {
Expand Down

0 comments on commit 269b217

Please sign in to comment.