Skip to content

Commit

Permalink
Merge branch 'main' into add-arm64-support
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-walker authored Dec 19, 2024
2 parents 65a39b2 + 6fa40a4 commit 8cbdf78
Show file tree
Hide file tree
Showing 39 changed files with 855 additions and 227 deletions.
136 changes: 131 additions & 5 deletions .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
strategy:
fail-fast: true
matrix:
build: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
build: [7, 8, 9, 10, 11, 12]
include:
# -------------------------------------------------------------------
# VFX CY2024 (Python 3.11)
Expand Down Expand Up @@ -147,6 +147,118 @@ jobs:
compiler-desc: GCC
vfx-cy: 2023
install-ext-packages: ALL
env:
CXX: ${{ matrix.cxx-compiler }}
CC: ${{ matrix.cc-compiler }}
steps:
- name: Checkout
uses: actions/checkout@v4
- 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

# ---------------------------------------------------------------------------
# Linux (unsupported Node.js)
# ---------------------------------------------------------------------------

linux-old:
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 }}
volumes:
- /node20217:/node20217:rw,rshared
- /node20217:/__e/node20:ro,rshared
strategy:
fail-fast: true
matrix:
build: [1, 2, 3, 4, 5, 6]
include:
# -------------------------------------------------------------------
# VFX CY2022 (Python 3.9)
# -------------------------------------------------------------------
Expand Down Expand Up @@ -234,9 +346,23 @@ jobs:
env:
CXX: ${{ matrix.cxx-compiler }}
CC: ${{ matrix.cc-compiler }}
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
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
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
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
# Note: can't upgrade to actions/checkout 4.0 because it needs newer
# glibc than these containers have.
- name: Checkout
uses: actions/checkout@v3
- name: Install docs env
Expand Down Expand Up @@ -319,7 +445,7 @@ jobs:
# ---------------------------------------------------------------------------

macos:
name: 'macOS 12
name: 'macOS 13
<AppleClang
arch=${{ matrix.arch-type }},
config=${{ matrix.build-type }},
Expand All @@ -333,7 +459,7 @@ jobs:
if: |
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name != github.repository
runs-on: macos-12
runs-on: macos-13
strategy:
matrix:
build: [1, 2, 3, 4]
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/wheel_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.1
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_BUILD: ${{ matrix.python }}
CIBW_ARCHS: ${{ matrix.arch }}
Expand All @@ -192,7 +192,7 @@ jobs:

macos:
name: Build wheels on macOS
runs-on: macos-12
runs-on: macos-13
# Don't run on OCIO forks
if: |
github.event_name != 'schedule' ||
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
python-version: '3.9'

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.1
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_BUILD: ${{ matrix.python }}
CIBW_ARCHS: ${{ matrix.arch }}
Expand Down Expand Up @@ -286,7 +286,7 @@ jobs:
python-version: '3.9'

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.1
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_BUILD: ${{ matrix.python }}
CIBW_ARCHS: ${{ matrix.arch }}
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
python-version: '3.9'

- name: Build wheels
uses: pypa/cibuildwheel@v2.21.1
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_BUILD: ${{ matrix.python }}
CIBW_ARCHS: ${{ matrix.arch }}
Expand Down
8 changes: 4 additions & 4 deletions docs/quick_start/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Required components:
- CMake >= 3.14
- \*Expat >= 2.4.1 (XML parser for CDL/CLF/CTF)
- \*yaml-cpp >= 0.7.0 (YAML parser for Configs)
- \*Imath >= 3.0 (for half domain LUTs)
- \*Imath >= 3.1.1 (for half domain LUTs)
- \*pystring >= 1.1.3
- \*minizip-ng >= 3.0.7 (for config archiving)
- \*ZLIB >= 1.2.13 (for config archiving)
Expand All @@ -135,14 +135,14 @@ Optional OCIO functionality also depends on:

- \*Little CMS >= 2.2 (for ociobakelut ICC profile baking)
- \*OpenGL GLUT & GLEW (for ociodisplay)
- \*OpenEXR >= 3.0 (for apps including ocioconvert)
- OpenImageIO >= 2.1.9 (for apps including ocioconvert)
- \*OpenEXR >= 3.0.5 (for apps including ocioconvert)
- OpenImageIO >= 2.2.14 (for apps including ocioconvert)
- \*OpenFX >= 1.4 (for the OpenFX plug-ins)
- OpenShadingLanguage >= 1.11 (for the OSL unit tests)
- Doxygen (for the docs)
- NumPy (optionally used in the Python test suite)
- \*pybind11 >= 2.9.2 (for the Python binding)
- Python >= 2.7 (for the Python binding only)
- Python >= 3.7 (for the Python binding only)
- Python 3.7 - 3.9 (for building the documentation)

Building the documentation requires the following packages, available via PyPI:
Expand Down
2 changes: 1 addition & 1 deletion docs/site/homepage/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ baseURL = "https://opencolorio.org/"
title = "OpenColorIO"
theme = "site"
# post pagination
paginate = "6"
pagination.pagerSize = "6"
# post excerpt
summaryLength = "15"
# disqus short name
Expand Down
2 changes: 1 addition & 1 deletion docs/site/layouts/partials/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

</ul>
<!-- Language List -->
{{- if site.IsMultiLingual }}
{{- if hugo.IsMultilingual }}
<select id="select-language" onchange="location = this.value;">
{{ $siteLanguages := site.Languages}}
{{ $pageLang := .Page.Lang}}
Expand Down
7 changes: 5 additions & 2 deletions include/OpenColorIO/OpenColorTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,14 @@ enum GpuLanguage
GPU_LANGUAGE_GLSL_1_2, ///< OpenGL Shading Language
GPU_LANGUAGE_GLSL_1_3, ///< OpenGL Shading Language
GPU_LANGUAGE_GLSL_4_0, ///< OpenGL Shading Language
GPU_LANGUAGE_HLSL_DX11, ///< DirectX Shading Language
GPU_LANGUAGE_HLSL_SM_5_0, ///< DirectX High Level Shading Language
LANGUAGE_OSL_1, ///< Open Shading Language
GPU_LANGUAGE_GLSL_ES_1_0, ///< OpenGL ES Shading Language
GPU_LANGUAGE_GLSL_ES_3_0, ///< OpenGL ES Shading Language
GPU_LANGUAGE_MSL_2_0 ///< Metal Shading Language
GPU_LANGUAGE_MSL_2_0, ///< Metal Shading Language

// Deprecated enum(s)
GPU_LANGUAGE_HLSL_DX11 = GPU_LANGUAGE_HLSL_SM_5_0
};

/// Controls which environment variables are loaded into a Context object.
Expand Down
3 changes: 3 additions & 0 deletions share/cmake/utils/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ if(USE_MSVC)
)
endif()

# Make MSVC compiler report correct __cplusplus version (otherwise reports 199711L)
set(PLATFORM_COMPILE_OPTIONS "${PLATFORM_COMPILE_OPTIONS};/Zc:__cplusplus")

# Explicitely specify the default warning level i.e. /W3.
# Note: Do not use /Wall (i.e. /W4) which adds 'informational' warnings.
set(PLATFORM_COMPILE_OPTIONS "${PLATFORM_COMPILE_OPTIONS};/W3")
Expand Down
2 changes: 1 addition & 1 deletion share/nuke/examples/colorlookup_to_spi1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def WriteSPI1D(filename, fromMin, fromMax, data):
SIZE = 2**10

data = []
for i in xrange(SIZE):
for i in range(SIZE):
x = i/(SIZE-1.0)
data.append(knob.getValueAt(x))

Expand Down
2 changes: 1 addition & 1 deletion share/nuke/examples/ocio_to_colorlookup_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def Fit(value, fromMin, fromMax, toMin, toMax):
return (value - fromMin) / (fromMax - fromMin) * (toMax - toMin) + toMin

SIZE = 2**10
for i in xrange(SIZE):
for i in range(SIZE):
x = i/(SIZE-1.0)

x = Fit(x, 0.0, 1.0, -0.125, 1.5)
Expand Down
2 changes: 1 addition & 1 deletion share/nuke/examples/ocio_to_colorlookup_rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


SIZE = 11
for i in xrange(SIZE):
for i in range(SIZE):
x = i/(SIZE-1.0)

y = processor.applyRGB((x,x,x))
Expand Down
4 changes: 3 additions & 1 deletion src/OpenColorIO/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5268,7 +5268,9 @@ void Config::Impl::checkVersionConsistency(ConstTransformRcPtr & transform) cons
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-500nit-REC2020-D60-in-REC2020-D65_2.0")
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-1000nit-REC2020-D60-in-REC2020-D65_2.0")
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-2000nit-REC2020-D60-in-REC2020-D65_2.0")
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-4000nit-REC2020-D60-in-REC2020-D65_2.0") )
|| 0 == Platform::Strcasecmp(blt->getStyle(), "ACES-OUTPUT - ACES2065-1_to_CIE-XYZ-D65 - HDR-4000nit-REC2020-D60-in-REC2020-D65_2.0")
// NB: This one was added in OCIO 2.4.1.
|| 0 == Platform::Strcasecmp(blt->getStyle(), "DISPLAY - CIE-XYZ-D65_to_DisplayP3-HDR") )
)
{
std::ostringstream os;
Expand Down
2 changes: 1 addition & 1 deletion src/OpenColorIO/GpuShaderClassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ std::unique_ptr<GpuShaderClassWrapper> GpuShaderClassWrapper::CreateClassWrapper
case GPU_LANGUAGE_GLSL_1_2:
case GPU_LANGUAGE_GLSL_1_3:
case GPU_LANGUAGE_GLSL_4_0:
case GPU_LANGUAGE_HLSL_DX11:
case GPU_LANGUAGE_HLSL_SM_5_0:
case GPU_LANGUAGE_GLSL_ES_1_0:
case GPU_LANGUAGE_GLSL_ES_3_0:
default:
Expand Down
Loading

0 comments on commit 8cbdf78

Please sign in to comment.