# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/AcademySoftwareFoundation/OpenImageIO

name: CI

on:
  push:
    # Skip jobs when only documentation files are changed
    paths:
      - '**'
      - '!**.md'
      - '!**.rst'
      - '!**/analysis.yml'
      - '!**/docs.yml'
      - '!**/scorecard.yml'
      - '!**/wheel.yml'
      - '!**.properties'
      - '!docs/**'
  pull_request:
    paths:
      - '**'
      - '!**.md'
      - '!**.rst'
      - '!docs/**'
  schedule:
    # Full nightly build
    - cron: "0 8 * * *"
      if: github.repository == 'AcademySoftwareFoundation/OpenImageIO'
  workflow_dispatch:
    # This allows manual triggering of the workflow from the web

permissions: read-all

# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true


jobs:

  aswf-old:
    if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'macos-only') }}
    name: "(old) ${{matrix.desc}}"
    strategy:
      fail-fast: false
      matrix:
        include:
          - desc: VP2021 gcc9/C++17 py3.7 exr3.1 ocio2.0
            nametag: linux-vfx2021
            runner: ubuntu-latest
            container: aswf/ci-osl:2021
            vfxyear: 2021
            old_node: 1
            cxx_std: 17
            openexr_ver: v3.1.13
            python_ver: 3.7
            simd: "avx2,f16c"
            fmt_ver: 7.1.0
            pybind11_ver: v2.7.0
            setenvs: export PUGIXML_VERSION=v1.9 WEBP_VERSION=v1.1.0 USE_OPENVDB=0
                            FREETYPE_VERSION=VER-2-10-0
          - desc: VP2021 clang10/C++17 avx2 exr3.1 ocio2.0
            nametag: linux-vfx2021.clang10.cpp14
            runner: ubuntu-latest
            container: aswf/ci-osl:2021-clang10
            vfxyear: 2021
            old_node: 1
            cc_compiler: clang
            cxx_compiler: clang++
            cxx_std: 17
            openexr_ver: v3.1.13
            pybind11_ver: v2.7.0
            python_ver: 3.7
            simd: "avx2,f16c"
            fmt_ver: 8.1.1
            setenvs: export USE_OPENVDB=0
                            FREETYPE_VERSION=VER-2-11-0
          - desc: VP2022 gcc9/C++17 py39 exr3.1 ocio2.1
            nametag: linux-vfx2022
            runner: ubuntu-latest
            container: aswf/ci-osl:2022-clang11
            vfxyear: 2022
            old_node: 1
            cxx_std: 17
            python_ver: 3.9
            simd: "avx2,f16c"
            fmt_ver: 8.1.1
            pybind11_ver: v2.9.0
            setenvs: export FREETYPE_VERSION=VER-2-12-0
          - desc: VP2022 clang13/C++17 py39 avx2 exr3.1 ocio2.1
            nametag: linux-vfx2022.clang13
            runner: ubuntu-latest
            container: aswf/ci-osl:2022-clang13
            vfxyear: 2022
            old_node: 1
            cc_compiler: clang
            cxx_compiler: clang++
            cxx_std: 17
            python_ver: 3.9
            simd: "avx2,f16c"
            fmt_ver: 9.1.0
            pybind11_ver: v2.8.1
            setenvs: export FREETYPE_VERSION=VER-2-12-0
          - desc: oldest gcc9.3/C++17 py3.7 exr-3.1
            # Oldest versions of the dependencies that we support.
            nametag: linux-oldest
            runner: ubuntu-latest
            container: aswf/ci-osl:2021
            vfxyear: 2021
            old_node: 1
            cxx_std: 17
            fmt_ver: 7.0.1
            opencolorio_ver: v2.2.1
            openexr_ver: v3.1.0
            pybind11_ver: v2.7.0
            python_ver: 3.7
            setenvs: export  CMAKE_VERSION=3.18.2
                             PTEX_VERSION=v2.3.2
                             WEBP_VERSION=v1.1.0
                             PUGIXML_VERSION=v1.8
            depcmds: sudo rm -rf /usr/local/include/OpenEXR
          - desc: hobbled gcc9.3/C++17 py3.7 exr-3.1 no-sse
            # Use the oldest supported versions of required dependencies, and
            # disable most optional dependencies and features (no SSE or
            # OpenCV, don't embed plugins).
            nametag: linux-disabled
            runner: ubuntu-latest
            container: aswf/ci-osl:2021
            vfxyear: 2021
            old_node: 1
            cxx_std: 17
            fmt_ver: 7.0.1
            opencolorio_ver: v2.2.1
            openexr_ver: v3.1.0
            pybind11_ver: v2.7.0
            python_ver: 3.7
            simd: 0
            setenvs: export  EMBEDPLUGINS=0
                             CMAKE_VERSION=3.18.2
                             PTEX_VERSION=v2.3.2
                             WEBP_VERSION=v1.1.0
                             USE_JPEGTURBO=0
                             USE_OPENCV=0
                             FREETYPE_VERSION=VER-2-10-0
                             PUGIXML_VERSION=v1.8
            depcmds: sudo rm -rf /usr/local/include/OpenEXR

    runs-on: ${{ matrix.runner }}
    container:
      image: ${{ matrix.container }}
      volumes:
        - /node20217:/node20217:rw,rshared
        - /node20217:/__e/node20:ro,rshared
    env:
      CXX: ${{matrix.cxx_compiler}}
      CC: ${{matrix.cc_compiler}}
      CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
      USE_SIMD: ${{matrix.simd}}
      FMT_VERSION: ${{matrix.fmt_ver}}
      OPENCOLORIO_VERSION: ${{matrix.opencolorio_ver}}
      OPENEXR_VERSION: ${{matrix.openexr_ver}}
      PYBIND11_VERSION: ${{matrix.pybind11_ver}}
      PYTHON_VERSION: ${{matrix.python_ver}}
      ABI_CHECK: ${{matrix.abi_check}}
    steps:
      # Install nodejs 20 with glibc 2.17, to work around the face that the
      # GHA runners are insisting on a node version that is too new for the
      # glibc in the ASWF containers prior to 2023.
      - name: install nodejs20glibc2.17
        if: matrix.old_node == '1'
        run: |
          curl --silent https://unofficial-builds.nodejs.org/download/release/v20.18.1/node-v20.18.1-linux-x64-glibc-217.tar.xz | tar -xJ --strip-components 1 -C /node20217 -f -
      # We would like to use harden-runner, but it flags too many false
      # positives, every time we download a dependency. We should use it only
      # on CI runs where we are producing artifacts that users might rely on.
      # - name: Harden Runner
      #   uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3
      #   with:
      #     egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
      - name: Checkout repo
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
      - name: Build setup
        run: |
            ${{matrix.setenvs}}
            src/build-scripts/ci-startup.bash
      - name: Prepare ccache timestamp
        id: ccache_cache_keys
        shell: bash
        run: echo "date=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" >> $GITHUB_OUTPUT
      - name: ccache-restore
        id: ccache-restore
        uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
        with:
          path: ${{ env.CCACHE_DIR }}
          # path: ./ccache
          key: ${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
          restore-keys: ${{matrix.nametag}}
      - name: Dependencies
        run: |
            ${{matrix.depcmds}}
            src/build-scripts/gh-installdeps.bash
      - name: Build
        if: matrix.skip_build != '1'
        run: src/build-scripts/ci-build.bash
      - name: ccache-save
        id: ccache-save
        uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
        with:
          path: ${{ env.CCACHE_DIR }}
          key: ${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
      - name: Testsuite
        if: matrix.skip_tests != '1'
        run: src/build-scripts/ci-test.bash
      - name: Benchmarks
        if: matrix.benchmark == '1'
        shell: bash
        run: src/build-scripts/ci-benchmark.bash
      - name: Build Docs
        if: matrix.build_docs == '1'
        run: |
            cd src/doc
            time make doxygen
            time make sphinx
      - name: Upload testsuite debugging artifacts
        uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
        if: ${{ failure() || matrix.build_docs == '1'}}
        with:
          name: oiio-${{github.job}}-${{matrix.nametag}}
          path: |
            build/cmake-save
            build/compat_reports
            build/sphinx
            build/benchmarks
            build/testsuite/*/*.*
            !build/testsuite/oiio-images
            !build/testsuite/openexr-images
            !build/testsuite/fits-images
            !build/testsuite/j2kp4files_v1_5



  #
  # Linux Tests
  #
  linux:
    if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'macos-only') }}
    name: "${{matrix.desc}}"
    uses: ./.github/workflows/build-steps.yml
    with:
      nametag: ${{ matrix.nametag || 'unnamed!' }}
      runner: ${{ matrix.runner || 'ubuntu-latest' }}
      container: ${{ matrix.container }}
      cc_compiler: ${{ matrix.cc_compiler }}
      cxx_compiler: ${{ matrix.cxx_compiler }}
      cxx_std: ${{ matrix.cxx_std || '17' }}
      build_type: ${{ matrix.build_type || 'Release' }}
      depcmds: ${{ matrix.depcmds }}
      extra_artifacts: ${{ matrix.extra_artifacts }}
      fmt_ver: ${{ matrix.fmt_ver }}
      opencolorio_ver: ${{ matrix.opencolorio_ver }}
      openexr_ver: ${{ matrix.openexr_ver }}
      pybind11_ver: ${{ matrix.pybind11_ver }}
      python_ver: ${{ matrix.python_ver }}
      setenvs: ${{ matrix.setenvs }}
      simd: ${{ matrix.simd }}
      skip_build: ${{ matrix.skip_build }}
      skip_tests: ${{ matrix.skip_tests }}
      abi_check: ${{ matrix.abi_check }}
      benchmark: ${{ matrix.benchmark }}
      build_docs: ${{ matrix.build_docs }}
      clang_format: ${{ matrix.clang_format }}
      generator: ${{ matrix.generator }}
      ctest_args: ${{ matrix.ctest_args }}
      ctest_test_timeout: ${{ matrix.ctest_test_timeout }}
      coverage: ${{ matrix.coverage || 0 }}
      sonar: ${{ matrix.sonar || 0 }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - desc: VFX2023 gcc11/C++17 py3.10 exr3.1 ocio2.2
            nametag: linux-vfx2023
            runner: ubuntu-latest
            container: aswftesting/ci-osl:2023-clang15
            python_ver: "3.10"
            simd: "avx2,f16c"
            fmt_ver: 10.1.1
            pybind11_ver: v2.10.0
            setenvs: PUGIXML_VERSION=v1.13
          - desc: VFX2023 icc/C++17 py3.10 exr3.1 ocio2.1 qt5.15
            nametag: linux-vfx2023.icc
            runner: ubuntu-latest
            container: aswf/ci-osl:2023
            opencolorio_ver: v2.2.1
            python_ver: "3.10"
            # simd: "avx2,f16c"
            fmt_ver: 7.1.3
            # icc MUST use this older FMT version
            pybind11_ver: v2.9.0
            setenvs: export USE_ICC=1 USE_OPENVDB=0
                            OIIO_EXTRA_CPP_ARGS="-fp-model=precise"
                            FREETYPE_VERSION=VER-2-13-0
                            DISABLE_libuhdr=1
            # For icc, use fp-model precise to eliminate needless LSB errors
            # that make test results differ from other platforms.
          - desc: VFX2023 icx/C++17 py3.10 exr3.1 ocio2.2 qt5.15
            nametag: linux-vfx2023.icx
            runner: ubuntu-latest
            container: aswf/ci-osl:2023
            cc_compiler: icx
            cxx_compiler: icpx
            python_ver: "3.10"
            pybind11_ver: v2.10.0
            simd: "avx2,f16c"
            benchmark: 1
            setenvs: export USE_OPENVDB=0
                            xOPENCOLORIO_CXX=g++
                            UHDR_CMAKE_C_COMPILER=gcc
                            UHDR_CMAKE_CXX_COMPILER=g++
            # Building libuhdr with icx results in test failures
            # so we force using gcc/g++.
          - desc: VFX2024 gcc11/C++17 py3.11 exr3.2 ocio2.3
            nametag: linux-vfx2024
            runner: ubuntu-latest
            container: aswftesting/ci-osl:2024-clang17
            python_ver: "3.11"
            simd: "avx2,f16c"
            fmt_ver: 10.1.1
            pybind11_ver: v2.12.0
            benchmark: 1
            setenvs: PUGIXML_VERSION=v1.14
          - desc: VFX2024 clang/C++17 py3.11 exr3.2 ocio2.3
            nametag: linux-vfx2024.clang
            runner: ubuntu-latest
            container: aswftesting/ci-osl:2024-clang17
            cc_compiler: clang
            cxx_compiler: clang++
            python_ver: "3.11"
            simd: "avx2,f16c"
            fmt_ver: 10.1.1
            pybind11_ver: v2.12.0
            benchmark: 1
            setenvs: PUGIXML_VERSION=v1.14
          - desc: VFX2025 gcc11/C++17 py3.11 exr3.3 ocio2.4
            nametag: linux-vfx2025
            runner: ubuntu-latest
            container: aswftesting/ci-oiio:2025
            python_ver: "3.11"
            simd: "avx2,f16c"
            fmt_ver: 11.1.4
            pybind11_ver: v2.13.6
            benchmark: 1
            setenvs: PUGIXML_VERSION=v1.15
          - desc: Sanitizers
            nametag: sanitizer
            runner: ubuntu-latest
            container: aswf/ci-osl:2024-clang17
            cc_compiler: clang
            cxx_compiler: clang++
            build_type: Debug
            opencolorio_ver: v2.3.2
            python_ver: "3.11"
            ctest_test_timeout: "1200"
            setenvs: export SANITIZE=address,undefined
                            OIIO_CMAKE_FLAGS="-DSANITIZE=address,undefined -DOIIO_HARDENING=3 -DUSE_PYTHON=0"
                            CTEST_EXCLUSIONS="broken|png-damaged"

          # Test ABI stability. `abi_check` is the version or commit that we
          # believe is the current standard against which we don't want to
          # break the ABI. Basically, we will build that version as well as
          # the current one, and compare the resulting libraries.
          - desc: ABI check
            nametag: abi-check
            runner: ubuntu-latest
            container: aswf/ci-osl:2024-clang17
            build_type: RelWithDebInfo
            python_ver: "3.11"
            simd: "avx2,f16c"
            skip_tests: 1
            # abi_check: v2.6.2.0
            abi_check: c1d351fea30f8e0dbe48303e702deb7436be4e9e
            setenvs: export OIIO_CMAKE_FLAGS="-DOIIO_BUILD_TOOLS=0 -DOIIO_BUILD_TESTS=0 -DUSE_PYTHON=0"
                            USE_OPENCV=0 USE_FFMPEG=0 USE_PYTHON=0 USE_FREETYPE=0

          # Test formatting. This test entry doesn't build at all, it
          # just runs clang-format on everything, and passes if nothing is
          # misformatted. Upon failure, the build artifact will be the full
          # source code with the formatting fixed (diffs will also appear in
          # the console output).
          - desc: "clang-format"
            nametag: clang-format
            runner: ubuntu-24.04
            cxx_std: 17
            extra_artifacts: "src/*.*"
            python_ver: "3.10"
            pybind11_ver: "0"
            clang_format: 1
            skip_build: 1
            skip_tests: 1
            setenvs: export SKIP_SYSTEM_DEPS_INSTALL=1 SKIP_APT_GET_UPDATE=1
                            INSTALL_OPENCV=0 QT_VERSION=0 USE_LIBHEIF=0
                            EXTRA_DEP_PACKAGES="clang-format-17"
                            CLANG_FORMAT_EXE=clang-format-17

          - desc: latest releases gcc13 C++20 py3.12 avx2 exr3.3 ocio2.4
            nametag: linux-latest-releases
            runner: ubuntu-24.04
            cc_compiler: gcc-13
            cxx_compiler: g++-13
            cxx_std: 20
            fmt_ver: 11.2.0
            opencolorio_ver: v2.4.2
            openexr_ver: v3.3.4
            pybind11_ver: v3.0.0
            python_ver: "3.12"
            simd: avx2,f16c
            setenvs: export LIBJPEGTURBO_VERSION=3.1.1
                            LIBRAW_VERSION=0.21.4
                            LIBTIFF_VERSION=v4.7.0
                            OPENJPEG_VERSION=v2.5.3
                            PTEX_VERSION=v2.4.3
                            PUGIXML_VERSION=v1.15
                            WEBP_VERSION=v1.5.0
                            FREETYPE_VERSION=VER-2-13-3
                            USE_OPENVDB=0
          - desc: bleeding edge gcc14 C++23 py3.12 OCIO/libtiff/exr-main avx2
            nametag: linux-bleeding-edge
            runner: ubuntu-24.04
            cc_compiler: gcc-14
            cxx_compiler: g++-14
            cxx_std: 23
            fmt_ver: master
            opencolorio_ver: main
            openexr_ver: main
            pybind11_ver: master
            python_ver: "3.12"
            simd: avx2,f16c
            benchmark: 1
            setenvs: export LIBJPEGTURBO_VERSION=main
                            LIBRAW_VERSION=master
                            LIBTIFF_VERSION=master
                            OPENJPEG_VERSION=master
                            PTEX_VERSION=main
                            PUGIXML_VERSION=master
                            WEBP_VERSION=main
                            OIIO_CMAKE_FLAGS="-DOIIO_HARDENING=2"
                            EXTRA_DEP_PACKAGES="python3.12-dev python3-numpy"
                            USE_OPENVDB=0
                            FREETYPE_VERSION=master
                            QT_VERSION=0 INSTALL_OPENCV=0
                            # The installed OpenVDB has a TLS conflict with Python 3.8
          - desc: all local builds gcc12 C++17 avx2 exr3.2 ocio2.3
            nametag: linux-local-builds
            runner: ubuntu-22.04
            cc_compiler: gcc-12
            cxx_compiler: g++-12
            cxx_std: 17
            python_ver: "3.10"
            simd: avx2,f16c
            setenvs: export OpenImageIO_BUILD_LOCAL_DEPS=all
                            LIBJPEGTURBO_VERSION=3.0.4
                            LIBRAW_VERSION=0.21.3
                            OPENJPEG_VERSION=v2.4.0
                            PTEX_VERSION=v2.4.2
                            PUGIXML_VERSION=v1.14
                            WEBP_VERSION=v1.4.0

          - desc: clang15 C++17 avx2 exr3.1 ocio2.2
            nametag: linux-clang15
            runner: ubuntu-22.04
            cxx_compiler: clang++-15
            cc_compiler: clang-15
            cxx_std: 17
            fmt_ver: 10.1.1
            opencolorio_ver: v2.2.1
            openexr_ver: v3.1.13
            pybind11_ver: v2.12.0
            python_ver: "3.10"
            simd: avx2,f16c
          - desc: debug gcc9/C++17, sse4.2, exr3.1
            nametag: linux-gcc9-cpp17-debug
            runner: ubuntu-22.04
            cxx_compiler: g++-9
            cxx_std: 17
            build_type: Debug
            python_ver: "3.10"
            simd: sse4.2
            openexr_ver: v3.1.13
            pybind11_ver: v2.7.0
            ctest_test_timeout: 1200
            setenvs: export PUGIXML_VERSION=v1.9
          - desc: static libs gcc9 C++17 exr3.1
            nametag: linux-static
            runner: ubuntu-22.04
            cxx_compiler: g++-9
            cxx_std: 17
            openexr_ver: v3.1.13
            python_ver: "3.10"
            pybind11_ver: v2.7.0
            setenvs: export BUILD_SHARED_LIBS=OFF
            depcmds: |
              sudo rm -rf /usr/local/include/OpenEXR
              sudo rm -rf /usr/local/lib64/cmake/{IlmBase,OpenEXR}
          - desc: Linux ARM latest releases gcc14 C++20 py3.12 exr3.3 ocio2.4
            nametag: linux-latest-releases
            runner: ubuntu-24.04-arm
            cc_compiler: gcc-14
            cxx_compiler: g++-14
            cxx_std: 20
            fmt_ver: 11.1.4
            opencolorio_ver: v2.4.2
            openexr_ver: v3.3.3
            pybind11_ver: v3.0.0
            python_ver: "3.12"
            setenvs: export LIBJPEGTURBO_VERSION=3.1.0
                            LIBRAW_VERSION=0.21.3
                            LIBTIFF_VERSION=v4.7.0
                            OPENJPEG_VERSION=v2.5.3
                            PTEX_VERSION=v2.4.3
                            PUGIXML_VERSION=v1.15
                            WEBP_VERSION=v1.5.0
                            FREETYPE_VERSION=VER-2-13-3
                            USE_OPENVDB=0
          - desc: Linux ARM latest releases clang18 C++20 py3.12 exr3.3 ocio2.4
            nametag: linux-latest-releases
            runner: ubuntu-24.04-arm
            cc_compiler: clang-18
            cxx_compiler: clang++-18
            cxx_std: 20
            fmt_ver: 11.1.4
            opencolorio_ver: v2.4.2
            openexr_ver: v3.3.3
            pybind11_ver: v3.0.0
            python_ver: "3.12"
            setenvs: export LIBJPEGTURBO_VERSION=3.1.0
                            LIBRAW_VERSION=0.21.3
                            LIBTIFF_VERSION=v4.7.0
                            OPENJPEG_VERSION=v2.5.3
                            PTEX_VERSION=v2.4.3
                            PUGIXML_VERSION=v1.15
                            WEBP_VERSION=v1.5.0
                            FREETYPE_VERSION=VER-2-13-3
                            USE_OPENVDB=0


  #
  # MacOS Tests
  #
  macos:
    if: ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'linux-only') }}
    name: "${{matrix.desc}}"
    uses: ./.github/workflows/build-steps.yml
    with:
      nametag: ${{ matrix.nametag || 'unnamed!' }}
      runner: ${{ matrix.runner || 'ubuntu-latest' }}
      container: ${{ matrix.container }}
      cc_compiler: ${{ matrix.cc_compiler || 'clang' }}
      cxx_compiler: ${{ matrix.cxx_compiler || 'clang++' }}
      cxx_std: ${{ matrix.cxx_std || '17' }}
      build_type: ${{ matrix.build_type || 'Release' }}
      depcmds: ${{ matrix.depcmds }}
      extra_artifacts: ${{ matrix.extra_artifacts }}
      fmt_ver: ${{ matrix.fmt_ver }}
      opencolorio_ver: ${{ matrix.opencolorio_ver }}
      openexr_ver: ${{ matrix.openexr_ver }}
      pybind11_ver: ${{ matrix.pybind11_ver }}
      python_ver: ${{ matrix.python_ver }}
      setenvs: ${{ matrix.setenvs }}
      simd: ${{ matrix.simd }}
      skip_build: ${{ matrix.skip_build }}
      skip_tests: ${{ matrix.skip_tests }}
      benchmark: ${{ matrix.benchmark }}
      abi_check: ${{ matrix.abi_check }}
      build_docs: ${{ matrix.build_docs }}
      generator: ${{ matrix.generator }}
      ctest_args: ${{ matrix.ctest_args }}
      ctest_test_timeout: ${{ matrix.ctest_test_timeout || '800' }}
      coverage: ${{ matrix.coverage || 0 }}
      sonar: ${{ matrix.sonar || 0 }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - desc: MacOS-13-Intel aclang14/C++17/py3.11
            runner: macos-13
            nametag: macos13-py311
            cc_compiler: clang
            cxx_compiler: clang++
            cxx_std: 17
            python_ver: "3.11"
            simd: sse4.2,avx2
            ctest_test_timeout: 1200
            setenvs: export MACOSX_DEPLOYMENT_TARGET=12.0
            benchmark: 1
          - desc: MacOS-14-ARM aclang15/C++20/py3.12
            runner: macos-14
            nametag: macos14-arm-py312
            cc_compiler: clang
            cxx_compiler: clang++
            cxx_std: 20
            python_ver: "3.12"
          - desc: MacOS-15-ARM aclang16/C++20/py3.13
            runner: macos-15
            nametag: macos15-arm-py313
            cc_compiler: clang
            cxx_compiler: clang++
            cxx_std: 20
            python_ver: "3.13"
            benchmark: 1


  #
  # Windows Tests
  #
  windows:
    if: ${{ ! contains(github.ref, 'linux-only') && ! contains(github.ref, 'macos-only') }}
    name: "${{matrix.desc}}"
    uses: ./.github/workflows/build-steps.yml
    with:
      nametag: ${{ matrix.nametag || 'unnamed!' }}
      runner: ${{ matrix.runner || 'ubuntu-latest' }}
      container: ${{ matrix.container }}
      cc_compiler: ${{ matrix.cc_compiler }}
      cxx_compiler: ${{ matrix.cxx_compiler }}
      cxx_std: ${{ matrix.cxx_std || '17' }}
      build_type: ${{ matrix.build_type || 'Release' }}
      depcmds: ${{ matrix.depcmds }}
      extra_artifacts: ${{ matrix.extra_artifacts }}
      fmt_ver: ${{ matrix.fmt_ver }}
      opencolorio_ver: ${{ matrix.opencolorio_ver }}
      openexr_ver: ${{ matrix.openexr_ver }}
      pybind11_ver: ${{ matrix.pybind11_ver }}
      python_ver: ${{ matrix.python_ver }}
      setenvs: ${{ matrix.setenvs }}
      simd: ${{ matrix.simd }}
      skip_build: ${{ matrix.skip_build }}
      skip_tests: ${{ matrix.skip_tests }}
      benchmark: ${{ matrix.benchmark }}
      abi_check: ${{ matrix.abi_check }}
      build_docs: ${{ matrix.build_docs }}
      generator: ${{ matrix.generator }}
      ctest_args: ${{ matrix.ctest_args }}
      ctest_test_timeout: ${{ matrix.ctest_test_timeout }}
      coverage: ${{ matrix.coverage || 0 }}
      sonar: ${{ matrix.sonar || 0 }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - desc: Windows-2022 VS2022
            runner: windows-2022
            nametag: windows-2022
            vsver: 2022
            generator: "Visual Studio 17 2022"
            python_ver: "3.9"
            setenvs: export OPENIMAGEIO_PYTHON_LOAD_DLLS_FROM_PATH=1
          - desc: Windows-2025 VS2022
            runner: windows-2025
            nametag: windows-2025
            vsver: 2022
            generator: "Visual Studio 17 2022"
            python_ver: "3.9"
            setenvs: export OPENIMAGEIO_PYTHON_LOAD_DLLS_FROM_PATH=1
            benchmark: 1
