Skip to content

Commit 9956d8f

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 a051e0b commit 9956d8f

File tree

1 file changed

+45
-16
lines changed

1 file changed

+45
-16
lines changed

.github/workflows/dep_rust.yml

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,51 @@ 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+
sudo apt-get install -y jq || true
73+
sudo dnf install -y jq || true
74+
just clippy-exhaustive ${{ matrix.config }}
75+
76+
- name: Verify MSRV
77+
run: ./dev/verify-msrv.sh hyperlight-host hyperlight-guest hyperlight-guest-bin hyperlight-common
78+
3479
build:
3580
if: ${{ inputs.docs_only == 'false' }}
3681
timeout-minutes: 60
@@ -61,19 +106,6 @@ jobs:
61106
env:
62107
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63108

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-
77109
- name: Get gh action service name
78110
if: ${{ (runner.os == 'Windows' )}}
79111
run: (Get-Service actions.runner.*) | Foreach { $_.Name, $_.UserName, $_.ServiceType }
@@ -93,9 +125,6 @@ jobs:
93125
- name: Build
94126
run: just build ${{ matrix.config }}
95127

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

0 commit comments

Comments
 (0)