Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()
# Project definition.

project(OpenColorIO
VERSION 2.4.0
VERSION 2.4.1
DESCRIPTION "OpenColorIO (OCIO) is a complete color management solution"
HOMEPAGE_URL https://github.com/AcademySoftwareFoundation/OpenColorIO
LANGUAGES CXX C)
Expand Down
10 changes: 9 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,15 @@
}

master_doc = "index"
exclude_patterns = ["build", "*-prefix", "api/python", "site"]
exclude_patterns = [
"INSTALL.md",
"README*",
"CHANGELOG.md",
"build",
"*-prefix",
"api/python",
"site"
]

rst_prolog = """
.. |OCIO| replace:: *OCIO*
Expand Down
49 changes: 35 additions & 14 deletions docs/guides/contributing/documentation_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,37 @@ Installation of requirements
Scripts are available, for each platform, to install the documentation
requirements.

The ``install_docs_env.sh`` script in the share/ci/scripts/<Platform> directory
The ``install_docs_env.sh`` script in the ``share/ci/scripts/<Platform>`` directory
will install the Python-related requirements for building the documentation
(Sphinx, six, testresources, recommonmark, sphinx-press-theme, sphinx-tabs,
and breathe) and Doxygen.

**Note:** If you are on Linux using yum and don't already have Doxygen installed, you will have to
uncomment the relevant line in ``share/ci/scripts/linux/yum/install_docs_env.sh``

Use GitBash (`provided with Git for Windows <https://gitforwindows.org/>`_) to
execute the script on Windows.

Python 3 is required to build the documentation. If you have multiple Python
installs you'll need to make sure pip and CMake find the correct version. You
can manually inform CMake of which to use by adding this option to the below
`cmake` command, which configures the documentation build:
`cmake` command, which configures the documentation build::

-DPython_ROOT=<Path to Python 3 root directory>

For the Python packages, ensure their locations are in your ``PYTHONPATH``
environment variable prior to configuring the build.
You need to make sure these Python package locations are in your ``PYTHONPATH``
environment variable prior to configuring the build. A good way to accomplish this is
with a virtual environment, which would look like::

$ python3 -m venv venv
$ source venv/bin/activate
$ share/ci/scripts/<platform>/install_docs_env.sh # macos or windows
or
$ share/ci/scripts/linux/<tool>install_docs_env.sh # for linux, tool is apt or yum
$ export PYTHONPATH=</path/to>/venv/lib/python<version>/site-packages

Obviously, adjust for specific paths and python versions. Also, the above assumes a ``bash``
environment - the commands may be slightly different for other shells.

Building the docs
*****************
Expand All @@ -58,25 +72,32 @@ Initial run::

Then after each change you wish to preview::

$ cmake -D OCIO_BUILD_DOCS=ON .. && make docs
$ cmake -D OCIO_BUILD_DOCS=ON ../ && make docs

Tip:
The ``-j`` option to ``make`` is your friend, eg, ``make -j 8`` will make things go much faster.
The exact number will depend on the resources of your particular machine. The ``nproc`` command (linux) will help you decide.

Updating the Python docs
************************

If a contributor makes changes to any part of OCIO which affects the Python API docs
(so, public headers, Python bindings, any documentation process code, etc.) they should
do a local build with the new CMake option -DOCIO_BUILD_FROZEN_DOCS=ON, and add the
modified rST files under docs/api/python/frozen to their PR.
do a local build with the new CMake option -DOCIO_BUILD_FROZEN_DOCS=ON::

$ cmake -DOCIO_BUILD_FROZEN_DOCS=ON ../

and add the modified rST files found under ``docs/api/python/frozen`` to their PR.

Note: If you run the scripts on Linux, the freezing process should work well. On other
**Note:** If you run the scripts on Linux, the freezing process should work well. On other
platforms, the process may sometimes make spurious deltas to rST files unrelated to your
changes. Please don't add these files to your PR.

The OCIO conf.py module has a switch that detects when docs are being built on GH Actions
(CI env var == true) it will backup the frozen folder to a sibling backup folder on Sphinx
init, and following Sphinx build completion will do a file-by-file comparison of the new
frozen and the backup folders. If there are differences, the CI job may fail with an error
explaining where the differences were found and with instructions on how to fix them.
(CI env var == true); in that case it will backup the "frozen" folder to a sibling backup
folder on Sphinx init, and following Sphinx build completion will do a file-by-file comparison
of the new "frozen" and backup folders. If there are differences, the CI job may fail with
an error explaining where the differences were found and with instructions on how to fix them.

The conf.py also has a switch that detects when it is being run on RTD, and in that case
will itself run Doxygen to generate the XML needed by breathe prior to building the docs,
Expand All @@ -88,14 +109,14 @@ nothing more. Right now that only works when the READTHEDOCS env var == True, bu
be easily exposed another way if needed.

These features required several custom Sphinx extensions tuned for our project which are
located under share/docs.
located under ``share/docs``.

Building the docs -- Excluding the API docs
*******************************************

If you don't need to build the API documentation, there is a quick and dirty way to
do a docs build. This approach does not need to compile the C++ code but is not ideal
since it modifies files in the source directory rather than the build directory:
since it modifies files in the source directory rather than the build directory::

export READTHEDOCS=True
cd docs (in the source directory)
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/contributing/doxygen_style_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Where possible please try to split the tag and names from the descriptive text.
*
* Compresses an input string using the foobar algorithm.
*
* \param
* Uncompressed The input string.
* \param uncompressed
* The input string.
* \return
* A compressed version of the input string.
*/
Expand Down
27 changes: 20 additions & 7 deletions docs/guides/using_ocio/compatible_software.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,23 @@ CryEngine is a real-time game engine, targeting applications in the motion-pictu
Website: `<https://www.cryengine.com/>`__


Disguise
********

Disguise is an integrated hardware and software platform powering the world's biggest live events, immersive experiences and virtual production stages. OpenColorIO is integrated into the Designer software, allowing users to manage the color spaces of all content sources and physical output devices.

Website: `<http://disguise.one/>`__

Supported version: >= 29.1

Documentation:


- `OpenColorIO Support <http://help.disguise.one/designer/colour-management/ocio.html>`__

- `Color Management <http://help.disguise.one/designer/colour-management/colour-management-overview.html>`__


DJV
***

Expand Down Expand Up @@ -336,17 +353,13 @@ PhotoFlow supports OCIO via a dedicated tool that can load a given configuration
Website : `<https://github.com/aferrero2707/PhotoFlow>`__


Photoshop (beta)
****************

OCIO can be enabled via a technology preview checkbox in preferences. For more details see `OpenColorIO and 32-bit Editing now available in Photoshop Beta <https://community.adobe.com/t5/photoshop-beta-discussions/new-feature-opencolorio-and-32-bit-editing-now-available-in-photoshop-beta/td-p/14767506>`__.

Photoshop
*********

OpenColorIO display luts can be exported as ICC profiles for use in photoshop. The core idea is to create an .icc profile, with a valid description, and then to save it to the proper OS icc directory. (On OSX, ``~/Library/ColorSync/Profiles/``). Upon a Photoshop relaunch, Edit->Assign Profile, and then select your new OCIO lut.
OCIO can be enabled via OpenColorIO settings. For more details see `OpenColorIO and tools with 32-bit mode <https://helpx.adobe.com/photoshop/using/opencolorio-transform.html>`__.

Website : `<https://www.adobe.com/products/photoshop.html>`__
Photoshop Fnordware plugin
**************************

An OpenColorIO plugin is also available for use in Photoshop. The plug-in can perform color operations to an image as a filter and can also export LUTs and ICC profiles to be used by Photoshop.

Expand Down
Loading