Moved from GPL to dual (#98) #1422
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: Basic Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| jobs: | |
| test: | |
| name: Rust ${{matrix.rust}} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: [beta, stable, 1.94.1] | |
| # include: | |
| # - rust: nightly | |
| # rustflags: --cfg thiserror_nightly_testing | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{matrix.rust}} | |
| components: rust-src | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test --all | |
| env: | |
| RUSTFLAGS: ${{matrix.rustflags}} ${{env.RUSTFLAGS}} | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| # - name: Check semver | |
| # uses: obi1kenobi/cargo-semver-checks-action@v2 | |
| - name: Read toolchain from rust-toolchain.toml | |
| id: toolchain | |
| run: | | |
| version=$(grep '^channel' rust-toolchain.toml | tr -d ' "' | cut -d= -f2) | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ steps.toolchain.outputs.version }} | |
| components: clippy, rust-src | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy -- -Dclippy::all -Dclippy::pedantic | |
| fmt: | |
| name: Fmt | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Read toolchain from rust-toolchain.toml | |
| id: toolchain | |
| run: | | |
| version=$(grep '^channel' rust-toolchain.toml | tr -d ' "' | cut -d= -f2) | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ steps.toolchain.outputs.version }} | |
| components: rustfmt, rust-src | |
| - run: cargo fmt --all -- --check | |
| doc: | |
| name: Doc | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: rust-src | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo doc --no-deps | |
| env: | |
| RUSTDOCFLAGS: -Dwarnings | |
| no-default-features: | |
| name: No-default-features | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Read toolchain from rust-toolchain.toml | |
| id: toolchain | |
| run: | | |
| version=$(grep '^channel' rust-toolchain.toml | tr -d ' "' | cut -d= -f2) | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| - uses: dtolnay/rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ steps.toolchain.outputs.version }} | |
| components: rust-src | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo check --no-default-features --lib --tests | |
| - run: cargo check --no-default-features --features hand-histories --lib --tests | |
| - run: cargo check --no-default-features --features bot-profiles --lib --tests | |
| - run: cargo check --no-default-features --features player-stats --lib --tests | |
| - run: cargo check --no-default-features --features player-stats-persistence --lib --tests |