1+ # yaml-language-server: $schema=https://json.schemastore.org/github-action.json
2+
3+ name : CI
4+
5+ on :
6+ push :
7+ branches : [main]
8+ pull_request :
9+ branches : [main]
10+
11+ env :
12+ CARGO_TERM_COLOR : always
13+
14+ jobs :
15+ run-tests :
16+ name : Run tests on ${{ matrix.os }}
17+ strategy :
18+ matrix :
19+ os : ["ubuntu-latest", "windows-latest"]
20+ runs-on : ${{ matrix.os }}
21+ steps :
22+ - uses : actions/checkout@v4
23+ - uses : actions-rust-lang/setup-rust-toolchain@v1
24+ - uses : Swatinem/rust-cache@v2
25+ - name : Install cargo-hyperlight
26+ shell : bash
27+ run : cargo install cargo-hyperlight --path .
28+ - name : Build guest demo
29+ shell : bash
30+ run : |
31+ cargo hyperlight build --manifest-path demo/guest/Cargo.toml
32+ - name : Run demo
33+ shell : bash
34+ run : cargo run --manifest-path demo/host/Cargo.toml -- src/guest/target/x86_64-hyperlight-none/debug/guest
35+
36+ spelling :
37+ name : Spell check with typos
38+ runs-on : ubuntu-latest
39+ steps :
40+ - uses : actions/checkout@v4
41+ - name : Spell Check Repo
42+ uses : crate-ci/typos@master
43+
44+ check :
45+ name : Lint on ${{ matrix.os }}
46+ strategy :
47+ matrix :
48+ os : ["ubuntu-latest", "windows-latest"]
49+ runs-on : ${{ matrix.os }}
50+ steps :
51+ - uses : actions/checkout@v4
52+ - uses : actions-rust-lang/setup-rust-toolchain@v1
53+ with :
54+ components : rustfmt, clippy
55+ - name : Setup nightly toolchain
56+ shell : bash
57+ run : rustup toolchain install nightly --component rustfmt # needed to run rustfmt in nightly toolchain
58+ - name : Check formatting
59+ shell : bash
60+ run : cargo +nightly fmt -- --check
61+ - name : Check clippy
62+ shell : bash
63+ run : cargo clippy -- -D warnings
0 commit comments