Skip to content

Commit aecac0b

Browse files
committed
Add seperate job to dep_rust.yaml for running clippy
Signed-off-by: Mark Rossett <[email protected]>
1 parent 0dbd6ff commit aecac0b

File tree

1 file changed

+36
-15
lines changed

1 file changed

+36
-15
lines changed

.github/workflows/dep_rust.yml

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,42 @@ defaults:
3131
shell: bash
3232

3333
jobs:
34+
clippy:
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+
- name: clippy
56+
if: ${{ (runner.os == 'Windows' )}}
57+
run: |
58+
just clippy ${{ matrix.config }}
59+
just clippy-guests ${{ matrix.config }}
60+
61+
# note: this is just temporary to check if we caught all the clippy warnings
62+
# I plan to move out of dep_rust in this PR with a follow-up commit.
63+
- name: clippy exhaustive check
64+
if: ${{ (runner.os == 'Linux' )}}
65+
run: |
66+
sudo apt-get install -y jq || true
67+
sudo dnf install -y jq || true
68+
just clippy-exhaustive ${{ matrix.config }}
69+
3470
build:
3571
if: ${{ inputs.docs_only == 'false' }}
3672
timeout-minutes: 60
@@ -64,21 +100,6 @@ jobs:
64100
- name: fmt
65101
run: just fmt-check
66102

67-
- name: clippy
68-
if: ${{ (runner.os == 'Windows' )}}
69-
run: |
70-
just clippy ${{ matrix.config }}
71-
just clippy-guests ${{ matrix.config }}
72-
73-
# note: this is just temporary to check if we caught all the clippy warnings
74-
# I plan to move out of dep_rust in this PR with a follow-up commit.
75-
- name: clippy exhaustive check
76-
if: ${{ (runner.os == 'Linux' )}}
77-
run: |
78-
sudo apt-get install -y jq || true
79-
sudo dnf install -y jq || true
80-
just clippy-exhaustive ${{ matrix.config }}
81-
82103
# 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
83104
- name: Ensure up-to-date Cargo.lock
84105
run: |

0 commit comments

Comments
 (0)