Add support for Windows ARM64 #3516
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: BSD-3-Clause | |
# Copyright Contributors to the OpenColorIO Project. | |
# | |
# GitHub Actions workflow file | |
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
name: CI | |
on: | |
push: | |
# Versioned branches and tags are ignored for OCIO <= 1.x.x | |
branches-ignore: | |
- RB-0.* | |
- RB-1.* | |
- gh-pages | |
tags-ignore: | |
- v0.* | |
- v1.* | |
pull_request: | |
branches-ignore: | |
- RB-0.* | |
- RB-1.* | |
- gh-pages | |
tags-ignore: | |
- v0.* | |
- v1.* | |
jobs: | |
# Linux jobs run in Docker containers, so the latest OS version is OK. macOS | |
# and Windows jobs need to be locked to specific virtual environment | |
# versions to mitigate issues from OS updates, and will require maintenance | |
# as OS versions are retired. | |
# | |
# GH Actions (Free plan) supports 20 concurrent jobs, with 5 concurrent macOS | |
# jobs. This workflow tries to utilize (but not exceed) that budget to | |
# promote timely CI. | |
# --------------------------------------------------------------------------- | |
# Linux | |
# --------------------------------------------------------------------------- | |
linux: | |
name: 'Linux VFX CY${{ matrix.vfx-cy }} | |
<${{ matrix.compiler-desc }} | |
config=${{ matrix.build-type }}, | |
shared=${{ matrix.build-shared }}, | |
simd=${{ matrix.use-simd }}, | |
cxx=${{ matrix.cxx-standard }}, | |
docs=${{ matrix.build-docs }}, | |
oiio=${{ matrix.use-oiio }}>' | |
# Avoid duplicated checks when a pull_request is opened from a local branch. | |
if: | | |
github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
# GH-hosted VM. The build runs in ASWF 'container' defined below. | |
runs-on: ubuntu-latest | |
container: | |
# DockerHub: https://hub.docker.com/u/aswf | |
# Source: https://github.com/AcademySoftwareFoundation/aswf-docker | |
image: aswf/ci-ocio:${{ matrix.vfx-cy }} | |
strategy: | |
fail-fast: true | |
matrix: | |
build: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] | |
include: | |
# ------------------------------------------------------------------- | |
# VFX CY2024 (Python 3.11) | |
# ------------------------------------------------------------------- | |
- build: 12 | |
build-type: Debug | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'ON' | |
use-simd: 'ON' | |
use-oiio: 'ON' | |
cxx-standard: 17 | |
cxx-compiler: clang++ | |
cc-compiler: clang | |
compiler-desc: Clang | |
vfx-cy: 2024 | |
install-ext-packages: MISSING | |
- build: 11 | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'ON' | |
build-openfx: 'ON' | |
use-simd: 'OFF' | |
use-oiio: 'OFF' | |
cxx-standard: 17 | |
cxx-compiler: g++ | |
cc-compiler: gcc | |
compiler-desc: GCC | |
vfx-cy: 2024 | |
install-ext-packages: ALL | |
- build: 10 | |
build-type: Release | |
build-shared: 'OFF' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
cxx-compiler: g++ | |
cc-compiler: gcc | |
compiler-desc: GCC | |
vfx-cy: 2024 | |
install-ext-packages: ALL | |
# ------------------------------------------------------------------- | |
# VFX CY2023 (Python 3.10) | |
# ------------------------------------------------------------------- | |
- build: 9 | |
build-type: Debug | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'ON' | |
use-simd: 'ON' | |
use-oiio: 'ON' | |
cxx-standard: 17 | |
cxx-compiler: clang++ | |
cc-compiler: clang | |
compiler-desc: Clang | |
vfx-cy: 2023 | |
install-ext-packages: MISSING | |
- build: 8 | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'ON' | |
build-openfx: 'ON' | |
use-simd: 'OFF' | |
use-oiio: 'OFF' | |
cxx-standard: 17 | |
cxx-compiler: g++ | |
cc-compiler: gcc | |
compiler-desc: GCC | |
vfx-cy: 2023 | |
install-ext-packages: ALL | |
- build: 7 | |
build-type: Release | |
build-shared: 'OFF' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
cxx-compiler: g++ | |
cc-compiler: gcc | |
compiler-desc: GCC | |
vfx-cy: 2023 | |
install-ext-packages: ALL | |
# ------------------------------------------------------------------- | |
# VFX CY2022 (Python 3.9) | |
# ------------------------------------------------------------------- | |
- build: 6 | |
build-type: Debug | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'ON' | |
use-simd: 'ON' | |
use-oiio: 'ON' | |
cxx-standard: 17 | |
cxx-compiler: clang++ | |
cc-compiler: clang | |
compiler-desc: Clang | |
vfx-cy: 2022 | |
install-ext-packages: ALL | |
- build: 5 | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'ON' | |
build-openfx: 'ON' | |
use-simd: 'OFF' | |
use-oiio: 'OFF' | |
cxx-standard: 17 | |
cxx-compiler: g++ | |
cc-compiler: gcc | |
compiler-desc: GCC | |
vfx-cy: 2022 | |
install-ext-packages: MISSING | |
- build: 4 | |
build-type: Release | |
build-shared: 'OFF' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
cxx-compiler: g++ | |
cc-compiler: gcc | |
compiler-desc: GCC | |
vfx-cy: 2022 | |
install-ext-packages: ALL | |
# ------------------------------------------------------------------- | |
# VFX CY2021 (Python 3.7) | |
# ------------------------------------------------------------------- | |
- build: 3 | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'ON' | |
cxx-standard: 17 | |
cxx-compiler: clang++ | |
cc-compiler: clang | |
compiler-desc: Clang | |
vfx-cy: 2021 | |
install-ext-packages: MISSING | |
- build: 2 | |
build-type: Release | |
build-shared: 'OFF' | |
build-docs: 'OFF' | |
build-openfx: 'ON' | |
use-simd: 'OFF' | |
use-oiio: 'OFF' | |
cxx-standard: 14 | |
cxx-compiler: clang++ | |
cc-compiler: clang | |
compiler-desc: Clang | |
vfx-cy: 2021 | |
install-ext-packages: ALL | |
- build: 1 | |
build-type: Debug | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
cxx-compiler: g++ | |
cc-compiler: gcc | |
compiler-desc: GCC | |
vfx-cy: 2021 | |
install-ext-packages: ALL | |
env: | |
CXX: ${{ matrix.cxx-compiler }} | |
CC: ${{ matrix.cc-compiler }} | |
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install docs env | |
run: share/ci/scripts/linux/yum/install_docs_env.sh | |
if: matrix.build-docs == 'ON' | |
- name: Install tests env | |
run: share/ci/scripts/linux/yum/install_tests_env.sh | |
- name: Create build directories | |
run: | | |
mkdir _install | |
mkdir _build | |
- name: Configure | |
run: | | |
cmake ../. \ | |
-DCMAKE_INSTALL_PREFIX=../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \ | |
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \ | |
-DOCIO_BUILD_DOCS=${{ matrix.build-docs }} \ | |
-DOCIO_BUILD_OPENFX=${{ matrix.build-openfx }} \ | |
-DOCIO_BUILD_GPU_TESTS=OFF \ | |
-DOCIO_USE_SIMD=${{ matrix.use-simd }} \ | |
-DOCIO_USE_OIIO_FOR_APPS=${{ matrix.use-oiio }} \ | |
-DOCIO_INSTALL_EXT_PACKAGES=${{ matrix.install-ext-packages }} \ | |
-DOCIO_WARNING_AS_ERROR=ON \ | |
-DPython_EXECUTABLE=$(which python) | |
working-directory: _build | |
- name: Build | |
run: | | |
cmake --build . \ | |
--target install \ | |
--config ${{ matrix.build-type }} \ | |
-- -j$(nproc) | |
echo "ocio_build_path=$(pwd)" >> $GITHUB_ENV | |
working-directory: _build | |
- name: Test | |
run: ctest -V -C ${{ matrix.build-type }} | |
working-directory: _build | |
- name: Test CMake Consumer with shared OCIO | |
if: matrix.build-shared == 'ON' | |
run: | | |
cmake . \ | |
-DCMAKE_PREFIX_PATH=../../../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} | |
cmake --build . \ | |
--config ${{ matrix.build-type }} | |
./consumer | |
working-directory: _build/tests/cmake-consumer-dist | |
- name: Test CMake Consumer with static OCIO | |
if: matrix.build-shared == 'OFF' | |
# The yaml-cpp_VERSION is set below because Findyaml-cpp.cmake needs it but is unable to | |
# extract it from the headers, like the other modules. | |
# | |
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY. | |
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to | |
# the static version of the package. | |
run: | | |
cmake . \ | |
-DCMAKE_PREFIX_PATH=../../../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-Dexpat_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dexpat_STATIC_LIBRARY=ON \ | |
-DImath_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-DImath_STATIC_LIBRARY=ON \ | |
-Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dyaml-cpp_STATIC_LIBRARY=ON \ | |
-Dyaml-cpp_VERSION=0.7.0 \ | |
-DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-DZLIB_STATIC_LIBRARY=ON \ | |
-Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dminizip-ng_STATIC_LIBRARY=ON | |
cmake --build . \ | |
--config ${{ matrix.build-type }} | |
./consumer | |
working-directory: _build/tests/cmake-consumer-dist | |
# --------------------------------------------------------------------------- | |
# macOS | |
# --------------------------------------------------------------------------- | |
macos: | |
name: 'macOS 12 | |
<AppleClang | |
arch=${{ matrix.arch-type }}, | |
config=${{ matrix.build-type }}, | |
shared=${{ matrix.build-shared }}, | |
simd=${{ matrix.use-simd }}, | |
cxx=${{ matrix.cxx-standard }}, | |
python=${{ matrix.python-version }}, | |
docs=${{ matrix.build-docs }}, | |
oiio=${{ matrix.use-oiio}}>' | |
# Avoid duplicated checks when a pull_request is opened from a local branch. | |
if: | | |
github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: macos-12 | |
strategy: | |
matrix: | |
build: [1, 2, 3, 4] | |
include: | |
- build: 5 | |
arch-type: "x86_64" | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'ON' | |
use-simd: 'ON' | |
use-oiio: 'ON' | |
cxx-standard: 17 | |
python-version: '3.11' | |
# Keeping one universal build | |
- build: 4 | |
arch-type: "x86_64;arm64" | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
python-version: '3.10' | |
- build: 3 | |
arch-type: "x86_64" | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'ON' | |
build-openfx: 'OFF' | |
use-simd: 'OFF' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
python-version: '3.10' | |
- build: 2 | |
arch-type: "x86_64" | |
build-type: Debug | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'ON' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
python-version: '3.9' | |
- build: 1 | |
arch-type: "x86_64" | |
build-type: Release | |
build-shared: 'OFF' | |
build-docs: 'OFF' | |
build-openfx: 'ON' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 14 | |
python-version: '3.7' | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install docs env | |
run: share/ci/scripts/macos/install_docs_env.sh | |
if: matrix.build-docs == 'ON' | |
- name: Install tests env | |
run: share/ci/scripts/macos/install_tests_env.sh | |
- name: Create build directories | |
run: | | |
mkdir _install | |
mkdir _build | |
- name: Configure | |
run: | | |
cmake ../. \ | |
-DCMAKE_INSTALL_PREFIX=../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \ | |
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \ | |
-DOCIO_BUILD_DOCS=${{ matrix.build-docs }} \ | |
-DOCIO_BUILD_OPENFX=${{ matrix.build-openfx }} \ | |
-DOCIO_BUILD_GPU_TESTS=OFF \ | |
-DOCIO_USE_SIMD=${{ matrix.use-simd }} \ | |
-DOCIO_USE_OIIO_FOR_APPS=${{ matrix.use-oiio }} \ | |
-DOCIO_INSTALL_EXT_PACKAGES=ALL \ | |
-DOCIO_WARNING_AS_ERROR=ON \ | |
-DPython_EXECUTABLE=$(which python) \ | |
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch-type }}" | |
working-directory: _build | |
- name: Build | |
run: | | |
cmake --build . \ | |
--target install \ | |
--config ${{ matrix.build-type }} \ | |
-- -j$(sysctl -n hw.ncpu) | |
echo "ocio_build_path=$(pwd)" >> $GITHUB_ENV | |
working-directory: _build | |
- name: Test | |
run: ctest -V -C ${{ matrix.build-type }} | |
working-directory: _build | |
- name: Test CMake Consumer with shared OCIO | |
if: matrix.build-shared == 'ON' | |
run: | | |
cmake . \ | |
-DCMAKE_PREFIX_PATH=../../../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} | |
cmake --build . \ | |
--config ${{ matrix.build-type }} | |
./consumer | |
working-directory: _build/tests/cmake-consumer-dist | |
- name: Test CMake Consumer with static OCIO | |
if: matrix.build-shared == 'OFF' | |
# The yaml-cpp_VERSION is set below because Findyaml-cpp.cmake needs it but is unable to | |
# extract it from the headers, like the other modules. | |
# | |
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY. | |
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to | |
# the static version of the package. | |
run: | | |
cmake . \ | |
-DCMAKE_PREFIX_PATH=../../../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-Dexpat_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dexpat_STATIC_LIBRARY=ON \ | |
-DImath_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-DImath_STATIC_LIBRARY=ON \ | |
-Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dyaml-cpp_STATIC_LIBRARY=ON \ | |
-Dyaml-cpp_VERSION=0.7.0 \ | |
-DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-DZLIB_STATIC_LIBRARY=ON \ | |
-Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dminizip-ng_STATIC_LIBRARY=ON | |
cmake --build . \ | |
--config ${{ matrix.build-type }} | |
./consumer | |
working-directory: _build/tests/cmake-consumer-dist | |
# --------------------------------------------------------------------------- | |
# macOS Arm | |
# --------------------------------------------------------------------------- | |
macos-arm: | |
name: 'macOS 14 arm | |
<AppleClang | |
arch=${{ matrix.arch-type }}, | |
config=${{ matrix.build-type }}, | |
shared=${{ matrix.build-shared }}, | |
simd=${{ matrix.use-simd }}, | |
cxx=${{ matrix.cxx-standard }}, | |
python=${{ matrix.python-version }}, | |
docs=${{ matrix.build-docs }}, | |
oiio=${{ matrix.use-oiio}}>' | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
build: [1, 2] | |
include: | |
- build: 1 | |
arch-type: "arm64" | |
test-rosetta: "OFF" | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
python-version: '3.11' | |
- build: 2 | |
arch-type: "x86_64;arm64" | |
test-rosetta: "ON" | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
python-version: '3.11' | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install docs env | |
run: share/ci/scripts/macos/install_docs_env.sh | |
if: matrix.build-docs == 'ON' | |
- name: Install tests env | |
run: share/ci/scripts/macos/install_tests_env.sh | |
- name: Create build directories | |
run: | | |
mkdir _install | |
mkdir _build | |
- name: Configure | |
run: | | |
cmake ../. \ | |
-DCMAKE_INSTALL_PREFIX=../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \ | |
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \ | |
-DOCIO_BUILD_DOCS=${{ matrix.build-docs }} \ | |
-DOCIO_BUILD_OPENFX=${{ matrix.build-openfx }} \ | |
-DOCIO_BUILD_GPU_TESTS=OFF \ | |
-DOCIO_USE_SIMD=${{ matrix.use-simd }} \ | |
-DOCIO_USE_OIIO_FOR_APPS=${{ matrix.use-oiio }} \ | |
-DOCIO_INSTALL_EXT_PACKAGES=ALL \ | |
-DOCIO_WARNING_AS_ERROR=ON \ | |
-DPython_EXECUTABLE=$(which python) \ | |
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch-type }}" | |
working-directory: _build | |
- name: Build | |
run: | | |
cmake --build . \ | |
--target install \ | |
--config ${{ matrix.build-type }} \ | |
-- -j$(sysctl -n hw.ncpu) | |
echo "ocio_build_path=$(pwd)" >> $GITHUB_ENV | |
working-directory: _build | |
- name: Test | |
run: ctest -V -C ${{ matrix.build-type }} | |
working-directory: _build | |
- name: Test Rosetta | |
if: matrix.test-rosetta == 'ON' | |
run: | | |
/usr/bin/arch -x86_64 /bin/zsh -c "ctest -V -C ${{ matrix.build-type }}" | |
working-directory: _build | |
- name: Test CMake Consumer with shared OCIO | |
if: matrix.build-shared == 'ON' | |
run: | | |
cmake . \ | |
-DCMAKE_PREFIX_PATH=../../../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} | |
cmake --build . \ | |
--config ${{ matrix.build-type }} | |
./consumer | |
working-directory: _build/tests/cmake-consumer-dist | |
- name: Test CMake Consumer with static OCIO | |
if: matrix.build-shared == 'OFF' | |
# The yaml-cpp_VERSION is set below because Findyaml-cpp.cmake needs it but is unable to | |
# extract it from the headers, like the other modules. | |
# | |
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY. | |
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to | |
# the static version of the package. | |
run: | | |
cmake . \ | |
-DCMAKE_PREFIX_PATH=../../../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-Dexpat_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dexpat_STATIC_LIBRARY=ON \ | |
-DImath_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-DImath_STATIC_LIBRARY=ON \ | |
-Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dyaml-cpp_STATIC_LIBRARY=ON \ | |
-Dyaml-cpp_VERSION=0.7.0 \ | |
-DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-DZLIB_STATIC_LIBRARY=ON \ | |
-Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dminizip-ng_STATIC_LIBRARY=ON | |
cmake --build . \ | |
--config ${{ matrix.build-type }} | |
./consumer | |
working-directory: _build/tests/cmake-consumer-dist | |
# --------------------------------------------------------------------------- | |
# Windows | |
# --------------------------------------------------------------------------- | |
# TODO: Install pythonXX_d.lib (or work around it being needed) to support | |
# Debug build testing with Python bindings and docs enabled. | |
windows: | |
name: 'Windows 2019 | |
<MSVC | |
config=${{ matrix.build-type }}, | |
shared=${{ matrix.build-shared }}, | |
simd=${{ matrix.use-simd }}, | |
cxx=${{ matrix.cxx-standard }}, | |
python=${{ matrix.python-version }}, | |
docs=${{ matrix.build-docs }}, | |
oiio=${{ matrix.use-oiio }}>' | |
# Avoid duplicated checks when a pull_request is opened from a local branch. | |
if: | | |
github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
build: [1, 2, 3, 4] | |
include: | |
- build: 4 | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'ON' | |
use-simd: 'OFF' | |
use-oiio: 'ON' | |
cxx-standard: 17 | |
python-version: '3.11' | |
- build: 3 | |
build-type: Release | |
build-shared: 'OFF' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
python-version: '3.9' | |
- build: 2 | |
build-type: Debug | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'OFF' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 11 | |
python-version: '3.8' | |
# C++14, OpenEXR, OpenFX | |
- build: 1 | |
build-type: Release | |
build-shared: 'ON' | |
build-docs: 'OFF' | |
build-openfx: 'ON' | |
use-simd: 'ON' | |
use-oiio: 'OFF' | |
cxx-standard: 14 | |
python-version: '3.7' | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install docs env | |
run: | | |
DOXYGEN_PATH=$GITHUB_WORKSPACE/doxygen | |
share/ci/scripts/windows/install_docs_env.sh "$DOXYGEN_PATH" | |
echo "$DOXYGEN_PATH" >> $GITHUB_PATH | |
shell: bash | |
if: matrix.build-docs == 'ON' | |
- name: Install tests env | |
run: share/ci/scripts/windows/install_tests_env.sh | |
shell: bash | |
- name: Create build directories | |
run: | | |
mkdir _install | |
mkdir _build | |
shell: bash | |
- name: Configure | |
run: | | |
cmake ../. \ | |
-DCMAKE_INSTALL_PREFIX=../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \ | |
-DCMAKE_GENERATOR_PLATFORM=x64 \ | |
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \ | |
-DOCIO_BUILD_DOCS=${{ matrix.build-docs }} \ | |
-DOCIO_BUILD_OPENFX=${{ matrix.build-openfx }} \ | |
-DOCIO_BUILD_GPU_TESTS=OFF \ | |
-DOCIO_USE_SIMD=${{ matrix.use-simd }} \ | |
-DOCIO_USE_OIIO_FOR_APPS=${{ matrix.use-oiio }} \ | |
-DOCIO_INSTALL_EXT_PACKAGES=ALL \ | |
-DOCIO_WARNING_AS_ERROR=ON \ | |
-DPython_EXECUTABLE=$(which python) | |
shell: bash | |
working-directory: _build | |
- name: Build | |
run: | | |
cmake --build . \ | |
--target install \ | |
--config ${{ matrix.build-type }} | |
echo "ocio_build_path=$(pwd)" >> $GITHUB_ENV | |
shell: bash | |
working-directory: _build | |
- name: Test | |
run: ctest -V -C ${{ matrix.build-type }} | |
shell: bash | |
working-directory: _build | |
- name: Test CMake Consumer with shared OCIO | |
if: matrix.build-shared == 'ON' | |
run: | | |
cmake . \ | |
-DCMAKE_PREFIX_PATH=../../../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} | |
cmake --build . \ | |
--config ${{ matrix.build-type }} | |
export PATH=../../../_install/bin:$PATH | |
./${{ matrix.build-type }}/consumer | |
shell: bash | |
working-directory: _build/tests/cmake-consumer-dist | |
- name: Test CMake Consumer with static OCIO | |
if: matrix.build-shared == 'OFF' | |
# The yaml-cpp_VERSION is set below because Findyaml-cpp.cmake needs it but is unable to | |
# extract it from the headers, like the other modules. | |
# | |
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY. | |
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to | |
# the static version of the package. | |
run: | | |
cmake . \ | |
-DCMAKE_PREFIX_PATH=../../../_install \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-Dexpat_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dexpat_STATIC_LIBRARY=ON \ | |
-DImath_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-DImath_STATIC_LIBRARY=ON \ | |
-Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dyaml-cpp_STATIC_LIBRARY=ON \ | |
-Dyaml-cpp_VERSION=0.7.0 \ | |
-DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-DZLIB_STATIC_LIBRARY=ON \ | |
-Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \ | |
-Dminizip-ng_STATIC_LIBRARY=ON | |
cmake --build . \ | |
--config ${{ matrix.build-type }} | |
export PATH=../../../_install/bin:$PATH | |
./${{ matrix.build-type }}/consumer | |
shell: bash | |
working-directory: _build/tests/cmake-consumer-dist |