name: Build

on:
  pull_request:
    types: [opened, synchronize, edited, enqueued]
  push:
  release:
    types: [created, prereleased, published]

jobs:
  default-debug:
    runs-on: ubuntu-latest
    name: Debug
    steps:
      - uses: actions-rust-lang/setup-rust-toolchain@v1
      - uses: actions/checkout@v5
      - run: cargo build

  default-release:
    runs-on: ubuntu-latest
    name: Release
    steps:
      - uses: actions-rust-lang/setup-rust-toolchain@v1
      - uses: actions/checkout@v5
      - run: cargo build --release

  all-features-debug:
    runs-on: ubuntu-latest
    name: All Features Debug
    steps:
      - uses: actions-rust-lang/setup-rust-toolchain@v1
      - uses: actions/checkout@v5
      - run: cargo build --all-features

  all-features-release:
    runs-on: ubuntu-latest
    name: All Features Debug
    steps:
      - uses: actions-rust-lang/setup-rust-toolchain@v1
      - uses: actions/checkout@v5
      - run: cargo build --release --all-features
