|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main, develop ] |
| 6 | + pull_request: |
| 7 | + branches: [ main ] |
| 8 | + schedule: |
| 9 | + - cron: '0 0 * * *' # Run nightly to catch regressions |
| 10 | + |
| 11 | +env: |
| 12 | + CARGO_TERM_COLOR: always |
| 13 | + RUST_BACKTRACE: 1 |
| 14 | + |
| 15 | +# TODO: Add Clippy and mock Funderberker testing |
| 16 | + |
| 17 | +jobs: |
| 18 | + check: |
| 19 | + name: Check |
| 20 | + runs-on: ubuntu-latest |
| 21 | + strategy: |
| 22 | + matrix: |
| 23 | + crate: [macros, utils] |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v4 |
| 26 | + - uses: dtolnay/rust-toolchain@stable |
| 27 | + - uses: Swatinem/rust-cache@v2 |
| 28 | + with: |
| 29 | + key: crate-${{ matrix.crate }} |
| 30 | + - name: Check ${{ matrix.crate }} |
| 31 | + run: cargo +nightly check --manifest-path="${{ matrix.crate }}/Cargo.toml" --verbose |
| 32 | + |
| 33 | + unit_tests: |
| 34 | + name: Unit Test Individual Crates |
| 35 | + runs-on: ubuntu-latest |
| 36 | + strategy: |
| 37 | + matrix: |
| 38 | + crate: [macros, utils] |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v4 |
| 41 | + - uses: dtolnay/rust-toolchain@stable |
| 42 | + - uses: Swatinem/rust-cache@v2 |
| 43 | + with: |
| 44 | + key: crate-${{ matrix.crate }} |
| 45 | + - name: Test ${{ matrix.crate }} |
| 46 | + run: cargo +nightly test --manifest-path="${{ matrix.crate }}/Cargo.toml" --verbose |
| 47 | + |
| 48 | + docs: |
| 49 | + name: Documentation |
| 50 | + runs-on: ubuntu-latest |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v4 |
| 53 | + - uses: dtolnay/rust-toolchain@stable |
| 54 | + - uses: Swatinem/rust-cache@v2 |
| 55 | + - name: Build docs |
| 56 | + run: cargo --manifest-path=kernel/Cargo.toml doc --no-deps --all-features |
| 57 | + - name: Deploy to GitHub Pages |
| 58 | + if: github.ref == 'refs/heads/main' |
| 59 | + uses: peaceiris/actions-gh-pages@v3 |
| 60 | + with: |
| 61 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 62 | + publish_dir: ./target/doc |
| 63 | + |
0 commit comments