File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 - uses : actions/checkout@v4
2323 - uses : actions-rust-lang/setup-rust-toolchain@v1
2424 - uses : Swatinem/rust-cache@v2
25+ - uses : extractions/setup-just@v3
2526 - name : Enable kvm
2627 if : runner.os == 'Linux'
2728 run : |
@@ -30,14 +31,13 @@ jobs:
3031 sudo udevadm trigger --name-match=kvm
3132 - name : Install cargo-hyperlight
3233 shell : bash
33- run : cargo install cargo-hyperlight --path .
34+ run : just install
3435 - name : Build guest example
3536 shell : bash
36- run : |
37- cargo hyperlight build --manifest-path examples/guest/Cargo.toml
37+ run : just build-guest
3838 - name : Run example
3939 shell : bash
40- run : cargo run --manifest-path examples/host/Cargo.toml -- examples/guest/target/x86_64-hyperlight-none/debug/ guest
40+ run : just run- guest
4141
4242 spelling :
4343 name : Spell check with typos
6363 run : rustup toolchain install nightly --component rustfmt # needed to run rustfmt in nightly toolchain
6464 - name : Check formatting
6565 shell : bash
66- run : cargo +nightly fmt -- --check
66+ run : just fmt
6767 - name : Check clippy
6868 shell : bash
69- run : cargo clippy -- -D warnings
69+ run : just clippy
Original file line number Diff line number Diff line change 11/target
2- /examples /* /target
2+ /examples /* /target
Original file line number Diff line number Diff line change 1+ export CARGO_TARGET_DIR := justfile_dir () / " target"
2+
3+ install :
4+ cargo install cargo-hyperlight --path .
5+
6+ fmt :
7+ cargo + nightly fmt --all -- --check
8+ cargo + nightly fmt --all --manifest-path ./ examples/ host/ Cargo.toml -- --check
9+ cargo + nightly fmt --all --manifest-path ./ examples/ guest/ Cargo.toml -- --check
10+
11+ fmt-apply :
12+ cargo + nightly fmt --all
13+ cargo + nightly fmt --all --manifest-path ./ examples/ host/ Cargo.toml
14+ cargo + nightly fmt --all --manifest-path ./ examples/ guest/ Cargo.toml
15+
16+ clippy :
17+ cargo clippy --all -- -D warnings
18+ cargo clippy --all --manifest-path ./ examples/ host/ Cargo.toml -- -D warnings
19+ cargo hyperlight clippy --all --manifest-path ./ examples/ guest/ Cargo.toml -- -D warnings
20+
21+ build-guest :
22+ cargo hyperlight build --manifest-path ./ examples/ guest/ Cargo.toml
23+
24+ run-guest : build-guest
25+ cargo run --manifest-path ./ examples/ host/ Cargo.toml -- ./ target/ x86 _64 -hyperlight-none/ debug/ guest
Original file line number Diff line number Diff line change 1+ [toolchain ]
2+ channel = " 1.89.0"
3+ profile = " default"
4+ components = [" rustfmt" , " clippy" ]
You can’t perform that action at this time.
0 commit comments