feat(public): proper feature gating - kernel builds clean without jar… #104
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
| name: TrustOS CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| build: | |
| name: Build Kernel | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust Nightly | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rust-src, llvm-tools-preview | |
| targets: x86_64-unknown-none | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build (release) | |
| run: cargo build --release -p trustos_kernel | |
| - name: Upload kernel binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: trustos-kernel | |
| path: target/x86_64-unknown-none/release/trustos_kernel | |
| retention-days: 7 | |
| lint: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust Nightly | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: clippy, rust-src, llvm-tools-preview | |
| targets: x86_64-unknown-none | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target/ | |
| key: ${{ runner.os }}-lint-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Clippy | |
| run: cargo clippy --release -p trustos_kernel -- -A clippy::all |