Rust CI #18
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: Rust CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| schedule: | |
| - cron: '5 16 * * 6' | |
| jobs: | |
| main: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: build | |
| run: cargo build | |
| - name: test | |
| run: cargo test | |
| nightly: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - name: Cache Cargo Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: build | |
| run: cargo build --all-features | |
| - name: test | |
| run: cargo test --all-features | |
| miri: | |
| runs-on: ubuntu-latest | |
| needs: [main] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| crate: ['alloc-traits', 'static-alloc', 'unsize', 'without-alloc' ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - name: Install Miri | |
| run: rustup component add --toolchain nightly miri | |
| - name: Miri Test | |
| run: | | |
| cd ${{ matrix.crate }} | |
| rustup run nightly cargo miri test --all-features | |
| doc: | |
| runs-on: ubuntu-latest | |
| needs: [main] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - name: Cache Cargo Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Generate Documentation | |
| run: | | |
| cargo doc --no-deps --document-private-items --all-features |