ocio 0.3.1

A pure Rust port of OpenColorIO, the color management framework for visual effects and animation.
Documentation
name: CI

on:
  push:
  pull_request:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - run: cargo build --all-targets
      - run: cargo test --all-targets
      - run: cargo test --doc

  wgsl:
    name: WGSL shaders
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: |
            .
            wgpu-example
      # Optimized builds validate and run the WGSL shaders of the whole test
      # corpus and the full images of the ported OpenColorIO GPU unit tests
      # (debug builds test a subset).
      - run: cargo test --release --test gpu_wgsl --test 'gpu_unit_*'
      # The wgpu example is not part of the workspace: check it builds.
      - run: cargo clippy --manifest-path wgpu-example/Cargo.toml -- -D warnings

  package:
    name: Package
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      # Builds the .crate and runs its test suite from the packaged sources,
      # so tests and fixtures keep working for downstream packagers.
      - run: cargo package
      - run: cargo test --manifest-path target/package/ocio-*/Cargo.toml --all-targets
      - run: cargo test --manifest-path target/package/ocio-*/Cargo.toml --doc

  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --all -- --check
      - run: cargo clippy --all-targets -- -D warnings