Skip to content

Commit 4417555

Browse files
committed
Updating dep_rust.yaml to run clippy and other code checks as a seperate
job Signed-off-by: Mark Rossett <[email protected]>
1 parent 8ef999c commit 4417555

File tree

1 file changed

+43
-16
lines changed

1 file changed

+43
-16
lines changed

.github/workflows/dep_rust.yml

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,49 @@ defaults:
3131
shell: bash
3232

3333
jobs:
34+
code-checks:
35+
if: ${{ inputs.docs_only == 'false' }}
36+
timeout-minutes: 60
37+
strategy:
38+
fail-fast: true
39+
matrix:
40+
hypervisor: ['hyperv-ws2025', kvm]
41+
config: [debug, release]
42+
runs-on: ${{ fromJson(
43+
format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-amd"]',
44+
(matrix.hypervisor == 'hyperv-ws2025') && 'Windows' || 'Linux',
45+
matrix.hypervisor == 'hyperv-ws2025' && 'win2025' || 'kvm')) }}
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- uses: hyperlight-dev/[email protected]
50+
with:
51+
rust-toolchain: "1.85"
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
55+
# Does not check for updated Cargo.lock files for test rust guests as this causes an issue with this checkwhen deoendabot updates dependencies in common crates
56+
- name: Ensure up-to-date Cargo.lock
57+
run: |
58+
cargo fetch --locked
59+
60+
- name: fmt
61+
run: just fmt-check
62+
63+
- name: clippy
64+
if: ${{ (runner.os == 'Windows' )}}
65+
run: |
66+
just clippy ${{ matrix.config }}
67+
just clippy-guests ${{ matrix.config }}
68+
69+
- name: clippy exhaustive check
70+
if: ${{ (runner.os == 'Linux' )}}
71+
run: |
72+
just clippy-exhaustive ${{ matrix.config }}
73+
74+
- name: Verify MSRV
75+
run: ./dev/verify-msrv.sh hyperlight-host hyperlight-guest hyperlight-guest-bin hyperlight-common
76+
3477
build:
3578
if: ${{ inputs.docs_only == 'false' }}
3679
timeout-minutes: 60
@@ -61,19 +104,6 @@ jobs:
61104
env:
62105
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63106

64-
- name: fmt
65-
run: just fmt-check
66-
67-
- name: clippy
68-
run: |
69-
just clippy ${{ matrix.config }}
70-
just clippy-guests ${{ matrix.config }}
71-
72-
# Does not check for updated Cargo.lock files for test rust guests as this causes an issue with this checkwhen deoendabot updates dependencies in common crates
73-
- name: Ensure up-to-date Cargo.lock
74-
run: |
75-
cargo fetch --locked
76-
77107
- name: Get gh action service name
78108
if: ${{ (runner.os == 'Windows' )}}
79109
run: (Get-Service actions.runner.*) | Foreach { $_.Name, $_.UserName, $_.ServiceType }
@@ -93,9 +123,6 @@ jobs:
93123
- name: Build
94124
run: just build ${{ matrix.config }}
95125

96-
- name: Verify MSRV
97-
run: ./dev/verify-msrv.sh hyperlight-host hyperlight-guest hyperlight-guest-bin hyperlight-common
98-
99126
- name: Run Rust tests
100127
env:
101128
CARGO_TERM_COLOR: always

0 commit comments

Comments
 (0)