troy 0.1.0

Superfast primitives and data structures for high frequency trading
Documentation
name: build

on:
  push:
    branches: [main]
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - name: Install rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

      - name: Cache cargo artifacts
        uses: Swatinem/rust-cache@v2

      - name: Lint
        run: .dev/rs-lint

      - name: Test
        run: make rs-test

      - name: Benchmarks
        # --test runs each benchmark once instead of measuring it: enough to
        # catch a bench that stopped compiling, fast enough for every PR
        run: cargo bench --bench arithmetic -- --test

      - name: Docs
        # warnings are errors here, so a broken intra-doc link fails the build
        # rather than shipping a dead link to docs.rs
        env:
          RUSTDOCFLAGS: -Dwarnings
        run: make docs