use serde_json::Value instead of target-spec-json for compatibility #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # yaml-language-server: $schema=https://json.schemastore.org/github-action.json | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| run-tests: | |
| name: Run tests on ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest", "windows-latest"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-hyperlight | |
| shell: bash | |
| run: cargo install cargo-hyperlight --path . | |
| - name: Build guest demo | |
| shell: bash | |
| run: | | |
| cargo hyperlight build --manifest-path demo/guest/Cargo.toml | |
| - name: Run demo | |
| shell: bash | |
| run: cargo run --manifest-path demo/host/Cargo.toml -- src/guest/target/x86_64-hyperlight-none/debug/guest | |
| spelling: | |
| name: Spell check with typos | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Spell Check Repo | |
| uses: crate-ci/typos@master | |
| check: | |
| name: Lint on ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest", "windows-latest"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: rustfmt, clippy | |
| - name: Setup nightly toolchain | |
| shell: bash | |
| run: rustup toolchain install nightly --component rustfmt # needed to run rustfmt in nightly toolchain | |
| - name: Check formatting | |
| shell: bash | |
| run: cargo +nightly fmt -- --check | |
| - name: Check clippy | |
| shell: bash | |
| run: cargo clippy -- -D warnings |