Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: unify and fix clippy jobs #648

Merged
merged 2 commits into from
Feb 20, 2024
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
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