forte 1.0.0-alpha.4

A low-overhead thread-pool with support for non-static async closures
Documentation
name: Cargo Build & Test

on:
  merge_group:
  pull_request:

env:
  # Only include the debug info necessary for backtraces (file names and line numbers). Any extra
  # debug info provided by `debuginfo=1` or `debuginfo=2` require an interactive debugger like
  # `lldb` or `gdb`.
  RUSTFLAGS: -C debuginfo=line-tables-only

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - name: Cache build artifacts
        uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}
      - uses: dtolnay/rust-toolchain@stable
      - name: Build & run tests
        run: cargo run -p ci -- compile
        env:
          RUSTFLAGS: ${{ env.RUSTFLAGS }} -D warnings

  lints:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - name: Cache build artifacts
        uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - name: Lints
        run: cargo run -p ci -- lints

  docs:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - name: Cache build artifacts
        uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}
      - uses: dtolnay/rust-toolchain@stable
      - name: Build and check doc
        run: cargo run -p ci -- doc

  typos:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - name: Check for typos
        uses: crate-ci/typos@v1.28.4
      - name: Typos info
        if: failure()
        run: |
          echo 'To fix typos, please run `typos -w`'
          echo 'To check for a diff, run `typos`'
          echo 'You can find typos here: https://crates.io/crates/typos'