name: SCC

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v2
      - name: Debug - Build
        run: cargo build --verbose
      - name: Debug -Run tests
        run: RUST_BACKTRACE=1 cargo test --verbose -- --nocapture
      - name: Release - Build
        run: cargo build --release --verbose
      - name: Release - Run tests
        run: RUST_BACKTRACE=1 cargo test --release --verbose -- --nocapture
      - name: Bench - Run benchmarks
        run: cargo bench
      - name: Document - Generate documentation
        run: cargo doc
