Skip to content

Commit 039b4a0

Browse files
committed
[just] Bring just like-ci in line with CI changes
Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
1 parent 151cf04 commit 039b4a0

2 files changed

Lines changed: 56 additions & 17 deletions

File tree

Justfile

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,10 @@ test-like-ci config=default-target hypervisor="kvm":
9999
@# test the tracing related features
100100
{{ if os() == "linux" { "just test-rust-tracing " + config + " " + if hypervisor == "mshv3" { "mshv3" } else { "kvm" } } else { "" } }}
101101

102-
like-ci config=default-target hypervisor="kvm":
102+
code-checks-like-ci config=default-target hypervisor="kvm":
103103
@# Ensure up-to-date Cargo.lock
104104
cargo fetch --locked
105105

106-
@# typos
107-
typos
108-
109-
@# check licence headers
110-
just check-license-headers
111-
112106
@# fmt
113107
just fmt-check
114108

@@ -122,6 +116,17 @@ like-ci config=default-target hypervisor="kvm":
122116
@# Verify MSRV
123117
./dev/verify-msrv.sh hyperlight-common hyperlight-guest hyperlight-guest-bin hyperlight-host hyperlight-component-util hyperlight-component-macro hyperlight-guest-tracing
124118

119+
@# Check 32-bit guests
120+
{{ if os() == "linux" { "just check-i686 " + config } else { "" } }}
121+
122+
@# Check cargo features compile
123+
just check
124+
125+
@# Check compilation with no default features
126+
just test-compilation-no-default-features debug
127+
just test-compilation-no-default-features release
128+
129+
build-guests-like-ci config=default-target hypervisor="kvm":
125130
@# Build and move Rust guests
126131
just build-rust-guests {{config}}
127132
just move-rust-guests {{config}}
@@ -130,29 +135,62 @@ like-ci config=default-target hypervisor="kvm":
130135
just build-c-guests {{config}}
131136
just move-c-guests {{config}}
132137

138+
build-test-like-ci config=default-target hypervisor="kvm":
133139
@# Build
134140
just build {{config}}
135141

142+
@# Run Miri tests
143+
{{ if os() == "linux" { "just miri-tests" } else { "" } }}
144+
136145
@# Run Rust tests
137-
just test-like-ci {{config}} {{hypervisor}}
146+
just test {{config}}
147+
148+
@# Run Rust tests with single driver
149+
{{ if os() == "linux" { "just test " + config+ " " + if hypervisor == "mshv3" { "mshv3" } else { "kvm" } } else { "" } }}
138150

151+
@# Run Rust Gdb tests
152+
just test-rust-gdb-debugging {{config}}
153+
154+
@# Run Rust Crashdump tests
155+
just test-rust-crashdump {{config}}
156+
157+
@# Run Rust Tracing tests
158+
{{ if os() == "linux" { "just test-rust-tracing " + config } else { "" } }}
159+
160+
run-examples-like-ci config=default-target hypervisor="kvm":
139161
@# Run Rust examples - Windows
140162
{{ if os() == "windows" { "just run-rust-examples " + config } else { "" } }}
141163

142164
@# Run Rust examples - linux
143-
{{ if os() == "linux" { "just run-rust-examples-linux " + config + " " + if hypervisor == "mshv3" { "mshv3" } else { "kvm" } } else { "" } }}
165+
{{ if os() == "linux" { "just run-rust-examples-linux " + config + " " } else { "" } }}
144166

145-
@# Run Rust Gdb tests
146-
just test-rust-gdb-debugging {{ config }} {{ if hypervisor == "mshv3" { "mshv3" } else { "kvm" } }}
167+
benchmarks-like-ci config=default-target hypervisor="$vm":
168+
@# Run benchmarks
169+
{{ if config == "release" { "just bench-ci main" } else { "" } }}
147170

148-
@# Run Rust Crashdump tests
149-
just test-rust-crashdump {{config}} {{ if hypervisor == "mshv3" { "mshv3" } else { "kvm" } }}
171+
like-ci config=default-target hypervisor="kvm":
172+
@# .github/workflows/dep_code_checks.yml
173+
just code-checks-like-ci {{config}} {{hypervisor}}
150174

151-
@# Run Rust Tracing tests - linux
152-
{{ if os() == "linux" { "just test-rust-tracing " + config + " " + if hypervisor == "mshv3" { "mshv3" } else { "kvm" } } else { "" } }}
175+
@# .github/workflows/dep_build_guests.yml
176+
just build-guests-like-ci {{config}} {{hypervisor}}
153177

154-
@# Run benchmarks
155-
{{ if config == "release" { "just bench-ci main " + if hypervisor == "mshv3" { "mshv3" } else { "kvm" } } else { "" } }}
178+
@# .github/workflows/dep_build_test.yml
179+
just build-test-like-ci {{config}} {{hypervisor}}
180+
181+
@# .github/workflows/dep_run_examples.yml
182+
just run-examples-like-ci {{config}} {{hypervisor}}
183+
184+
@# .github/workflows/dep_benchmarks.yml
185+
just benchmarks-like-ci {{config}} {{hypervisor}}
186+
187+
@# can't run fuzzing locally
188+
189+
@# spelling
190+
typos
191+
192+
@# license-headers
193+
just check-license-headers
156194

157195
# runs all tests
158196
test target=default-target features="": (test-unit target features) (test-isolated target features) (test-integration "rust" target features) (test-integration "c" target features) (test-doc target features)

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"x86_64-unknown-linux-gnu"
6868
"x86_64-pc-windows-msvc" "x86_64-unknown-none"
6969
"wasm32-wasip1" "wasm32-wasip2" "wasm32-unknown-unknown"
70+
"i686-unknown-linux-gnu"
7071
];
7172
extensions = [ "rust-src" ] ++ (if args.channel == "nightly" then [ "miri-preview" ] else []);
7273
});

0 commit comments

Comments
 (0)