Skip to content

test(kuhn): guard sampling-distribution normalization #20

test(kuhn): guard sampling-distribution normalization

test(kuhn): guard sampling-distribution normalization #20

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# Cancel superseded runs on the same ref (e.g. PR push during in-flight build).
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_PROFILE_DEV_CODEGEN_UNITS: 256
RUST_BACKTRACE: short
# mold linker — replaces ld on link-heavy workspaces. Roughly halves
# the link step on a workspace this size.
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: clang
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS: -Clink-arg=-fuse-ld=mold
jobs:
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
- uses: taiki-e/install-action@v2
with:
tool: taplo-cli
- name: Taplo (Cargo.toml formatting)
run: taplo fmt --check
# Clippy and tests share the same compiled target/ directory — both
# need `--all-targets` worth of compilation, so doing them in one
# job cuts ~5 min vs the previous split-job setup.
lint-and-test:
name: Clippy & Test
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v5
- run: sudo apt-get update && sudo apt-get install -y mold clang
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
shared-key: robopoker-ci
cache-all-crates: true
- uses: taiki-e/install-action@nextest
- name: Clippy
run: cargo clippy --workspace --all-features --all-targets -- -D warnings
- name: Test (unit)
run: cargo nextest run --workspace --lib
compile:
name: Compile (${{ matrix.features }})
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
features:
- --no-default-features
- --features server
- --all-features
steps:
- uses: actions/checkout@v5
- run: sudo apt-get update && sudo apt-get install -y mold clang
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: robopoker-ci-${{ matrix.features }}
cache-all-crates: true
- run: cargo check ${{ matrix.features }}
docs:
name: Docs
runs-on: ubuntu-latest
timeout-minutes: 10
env:
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v5
- run: sudo apt-get update && sudo apt-get install -y mold clang
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: robopoker-ci
cache-all-crates: true
- run: cargo doc --workspace --no-deps --all-features