switchyard 0.3.1

Real-time compute focused async executor
Documentation
name: CI

on:
  push:
    branches-ignore: [
        # We don't need to run on renovate PRs.
        "renovate/**",
        # This is the branch the merge queue creates.
        "gh-readonly-queue/**",
      ]
  pull_request:

env:
  RUSTFLAGS: -D warnings
  RUSTDOCFLAGS: -D warnings
  CI_RUST_VERSION: "1.85"
  MSRV: "1.65"

jobs:
  build:
    timeout-minutes: 5

    strategy:
      matrix:
        include:
          # wasm stable
          - name: "stable wasm"
            os: "ubuntu-latest"
            target: "wasm32-unknown-unknown"

          # native stable
          - name: "stable linux"
            os: "ubuntu-latest"
            target: "x86_64-unknown-linux-gnu"

          - name: "stable mac"
            os: "macos-latest"
            target: "x86_64-apple-darwin"

          - name: "stable windows"
            os: "windows-latest"
            target: "x86_64-pc-windows-msvc"

      fail-fast: false

    runs-on: ${{ matrix.os }}
    name: ${{ matrix.name }}

    steps:
      - uses: actions/checkout@v4

      - name: install rust
        shell: bash
        run: |
          set -e

          rustup toolchain install ${{ env.CI_RUST_VERSION }} --no-self-update --profile=minimal --component clippy
          rustup override set ${{ env.CI_RUST_VERSION }}
          rustup target add ${{ matrix.target }}
          cargo -V

      - uses: Swatinem/rust-cache@v2

      - name: clippy
        shell: bash
        run: cargo clippy --all-features --target ${{ matrix.target }}

      - name: test
        shell: bash
        if: matrix.name != 'stable wasm'
        run: cargo test --all-features --target ${{ matrix.target }}

  msrv:
    runs-on: ubuntu-latest
    steps:
      - name: checkout repo
        uses: actions/checkout@v4

      - uses: Swatinem/rust-cache@v2

      - name: install rust
        run: |
          set -e

          rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal
          rustup override set ${{ env.MSRV }}
          cargo -V

      - name: check msrv
        run: |
          set -e

          cargo check
          cargo check --no-default-features

  cargo-fmt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Rust toolchain
        run: |
          rustup component add rustfmt

      - name: Rustfmt
        run: |
          cargo fmt -- --check

  cargo-deny:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: EmbarkStudios/cargo-deny-action@v2
        with:
          log-level: warn
          command: check
          arguments: --all-features