ORA: Avoid lifetime constraint #114
Workflow file for this run
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: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| 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 | |
| test_other_archs: | |
| # github actions does not support 32-bit or big endian systems directly, but | |
| # it does support QEMU. so we install qemu, then build and run the tests in | |
| # an emulated system. NOTE: you can also use this approach to test for big | |
| # endian locally. | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [powerpc-unknown-linux-gnu, i686-unknown-linux-gnu] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install or use cached cross-rs/cross | |
| uses: baptiste0928/cargo-install@v2 | |
| with: | |
| crate: cross | |
| - name: Cache Cargo Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| key: ${{ matrix.arch }} | |
| - name: Start Docker (required for cross-rs) | |
| run: sudo systemctl start docker | |
| - name: Cross-Run Tests using QEMU | |
| run: cross test --target ${{ matrix.arch }} | |
| msrv_minimal_versions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: 1.89.0 | |
| - name: Cache Cargo Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: build | |
| run: cargo build -v | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: clippy | |
| - name: Cache Clippy | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| shared-key: cargo-check | |
| - run: cargo clippy --all-features --all-targets -- -D warnings | |
| rustfmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Run rustfmt check | |
| run: cargo fmt -- --check | |
| features: | |
| # make sure that features compile individually | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: taiki-e/install-action@cargo-hack | |
| - run: cargo hack check --each-feature --no-dev-deps | |
| cargo-deny: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: EmbarkStudios/cargo-deny-action@v2 |