Skip to content

Commit

Permalink
Adjust ext versions
Browse files Browse the repository at this point in the history
Signed-off-by: Rémi Achard <remiachard@gmail.com>
  • Loading branch information
remia committed Nov 9, 2021
1 parent 84682bc commit 816188d
Show file tree
Hide file tree
Showing 23 changed files with 267 additions and 116 deletions.
119 changes: 94 additions & 25 deletions .github/workflows/analysis_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ on:
schedule:
# Nightly build
- cron: "0 0 * * *"
pull_request:
branches-ignore:
- RB-0.*
- RB-1.*
- gh-pages
tags-ignore:
- v0.*
- v1.*

jobs:
# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -86,19 +94,23 @@ jobs:
if: matrix.build-docs == 'ON'
- name: Install tests env
run: share/ci/scripts/linux/yum/install_tests_env.sh
- name: Install indirect dependencies
run: |
share/ci/scripts/multi/install_pugixml.sh latest
- name: Install fixed ext package versions
run: |
share/ci/scripts/multi/install_expat.sh 2.4.1
share/ci/scripts/multi/install_lcms2.sh 2.2
share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0
share/ci/scripts/multi/install_pystring.sh 1.1.3
share/ci/scripts/multi/install_pybind11.sh 2.6.1
- name: Install latest ext package versions
run: |
share/ci/scripts/linux/install_expat.sh latest
share/ci/scripts/linux/install_lcms2.sh latest
share/ci/scripts/linux/install_yaml-cpp.sh latest
share/ci/scripts/linux/install_pystring.sh latest
share/ci/scripts/linux/install_pybind11.sh latest
share/ci/scripts/linux/install_openexr.sh latest
share/ci/scripts/linux/install_imath.sh latest
share/ci/scripts/linux/install_oiio.sh latest
share/ci/scripts/linux/install_pugixml.sh latest
share/ci/scripts/linux/install_osl.sh latest
share/ci/scripts/linux/install_openfx.sh latest
share/ci/scripts/multi/install_openexr.sh latest
share/ci/scripts/multi/install_imath.sh latest
share/ci/scripts/multi/install_oiio.sh latest
share/ci/scripts/multi/install_osl.sh latest
share/ci/scripts/multi/install_openfx.sh latest
- name: Create build directories
run: |
mkdir _install
Expand All @@ -112,10 +124,10 @@ jobs:
-DOCIO_BUILD_DOCS=${{ matrix.build-docs }} \
-DOCIO_BUILD_OPENFX=${{ matrix.build-openfx }} \
-DOCIO_BUILD_GPU_TESTS=OFF \
-DOCIO_INSTALL_EXT_PACKAGES=ALL \
-DOCIO_INSTALL_EXT_PACKAGES_LATEST=ON \
-DOCIO_INSTALL_EXT_PACKAGES=NONE \
-DOCIO_WARNING_AS_ERROR=OFF \
-DPython_EXECUTABLE=$(which python)
-DPython_EXECUTABLE=$(which python) \
-DOCIO_USE_OIIO_CMAKE_CONFIG=ON
working-directory: _build
- name: Build
run: |
Expand Down Expand Up @@ -178,9 +190,25 @@ jobs:
if: matrix.build-docs == 'ON'
- name: Install tests env
run: share/ci/scripts/macos/install_tests_env.sh
- name: Install indirect dependencies
run: |
share/ci/scripts/macos/install_bison.sh latest
share/ci/scripts/macos/install_boost.sh latest
share/ci/scripts/multi/install_pugixml.sh latest
- name: Install fixed ext package versions
run: |
share/ci/scripts/multi/install_expat.sh 2.4.1
share/ci/scripts/multi/install_lcms2.sh 2.2
share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0
share/ci/scripts/multi/install_pystring.sh 1.1.3
share/ci/scripts/multi/install_pybind11.sh 2.6.1
- name: Install latest ext package versions
run: |
share/ci/scripts/macos/install_oiio.sh latest
share/ci/scripts/multi/install_openexr.sh latest
share/ci/scripts/multi/install_imath.sh latest
share/ci/scripts/multi/install_oiio.sh latest
share/ci/scripts/multi/install_osl.sh latest
share/ci/scripts/multi/install_openfx.sh latest
- name: Create build directories
run: |
mkdir _install
Expand All @@ -194,10 +222,10 @@ jobs:
-DOCIO_BUILD_DOCS=${{ matrix.build-docs }} \
-DOCIO_BUILD_OPENFX=${{ matrix.build-openfx }} \
-DOCIO_BUILD_GPU_TESTS=OFF \
-DOCIO_INSTALL_EXT_PACKAGES=ALL \
-DOCIO_INSTALL_EXT_PACKAGES_LATEST=ON \
-DOCIO_INSTALL_EXT_PACKAGES=NONE \
-DOCIO_WARNING_AS_ERROR=OFF \
-DPython_EXECUTABLE=$(which python)
-DPython_EXECUTABLE=$(which python) \
-DOCIO_USE_OIIO_CMAKE_CONFIG=ON
working-directory: _build
- name: Build
run: |
Expand All @@ -207,7 +235,7 @@ jobs:
-- -j$(sysctl -n hw.ncpu)
working-directory: _build
- name: Test
run: ctest -V
run: ctest -V -C Release
working-directory: _build
- name: Test CMake Consumer
run: |
Expand Down Expand Up @@ -263,7 +291,45 @@ jobs:
- name: Install tests env
run: share/ci/scripts/windows/install_tests_env.sh
shell: bash
# TODO: install OIIO through a package manager or manual install.
- name: Setup ext environment
run: |
EXT_PATH=$GITHUB_WORKSPACE/_ext
VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT/installed/x64-windows
echo "EXT_PATH=$EXT_PATH" >> $GITHUB_ENV
echo "CMAKE_PREFIX_PATH=$VCPKG_ROOT;$EXT_PATH" >> $GITHUB_ENV
echo "$VCPKG_ROOT/bin" >> $GITHUB_PATH
echo "$EXT_PATH/bin" >> $GITHUB_PATH
mkdir $EXT_PATH
shell: bash
- name: Install indirect dependencies
run: |
vcpkg install zlib:x64-windows
vcpkg install tiff:x64-windows
vcpkg install boost-asio:x64-windows
vcpkg install boost-container:x64-windows
vcpkg install boost-filesystem:x64-windows
vcpkg install boost-math:x64-windows
vcpkg install boost-stacktrace:x64-windows
vcpkg install boost-system:x64-windows
vcpkg install boost-thread:x64-windows
share/ci/scripts/multi/install_pugixml.sh latest $EXT_PATH
shell: bash
- name: Install fixed ext package versions
run: |
share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH
share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH
share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH
share/ci/scripts/multi/install_pybind11.sh 2.6.1 $EXT_PATH
share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH
shell: bash
# OSL not installed due to LLVM compilation time.
- name: Install latest ext package versions
run: |
share/ci/scripts/multi/install_openexr.sh latest $EXT_PATH
share/ci/scripts/multi/install_imath.sh latest $EXT_PATH
share/ci/scripts/multi/install_oiio.sh latest $EXT_PATH
share/ci/scripts/multi/install_openfx.sh latest $EXT_PATH
shell: bash
- name: Create build directories
run: |
mkdir _install
Expand All @@ -275,13 +341,15 @@ jobs:
-DCMAKE_INSTALL_PREFIX=../_install \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \
-DOCIO_BUILD_DOCS=${{ matrix.build-docs }} \
-DCMAKE_GENERATOR_PLATFORM=x64 \
-DOCIO_BUILD_DOCS=OFF \
-DOCIO_BUILD_OPENFX=${{ matrix.build-openfx }} \
-DOCIO_BUILD_GPU_TESTS=OFF \
-DOCIO_INSTALL_EXT_PACKAGES=ALL \
-DOCIO_INSTALL_EXT_PACKAGES_LATEST=ON \
-DOCIO_INSTALL_EXT_PACKAGES=NONE \
-DOCIO_WARNING_AS_ERROR=OFF \
-DPython_EXECUTABLE=$(which python)
-DPython_EXECUTABLE=$(which python) \
-DOCIO_BUILD_PYTHON=OFF \
-DOCIO_USE_OIIO_CMAKE_CONFIG=ON
shell: bash
working-directory: _build
- name: Build
Expand All @@ -293,7 +361,8 @@ jobs:
shell: bash
working-directory: _build
- name: Test
run: ctest -V
run: |
ctest -V -C Release
shell: bash
working-directory: _build
- name: Test CMake Consumer
Expand Down
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ option(OCIO_USE_WINDOWS_UNICODE "On Windows only, compile with Unicode support"

option(OCIO_USE_SSE "Specify whether to enable SSE CPU performance optimizations" ON)
option(OCIO_USE_OPENEXR_HALF "Specify whether to use an OpenEXR/IlmBase install of the Half library (<=v2.5) instead of the newer Imath library (>=v3.0)" OFF)
option(OCIO_USE_OIIO_CMAKE_CONFIG "Specify whether to look for OIIO using the generated CMake Config script instead of the custom FindOpenImageIO.cmake script" OFF)


###############################################################################
Expand Down Expand Up @@ -261,13 +262,6 @@ include(FindExtPackages)
###############################################################################
# Progress to other sources

# The presence of OpenImageIO allows additional ocio apps and the OSL translation unit tests
# to be built.

# OpenImageIO
# https://github.com/OpenImageIO/oiio
find_package(OpenImageIO 2.1.9)

add_subdirectory(vendor)
if(OCIO_BUILD_DOCS)
add_subdirectory(docs)
Expand Down Expand Up @@ -329,4 +323,3 @@ install(
FILES "${OCIO_PROJECT_CONFIG}" "${OCIO_VERSION_CONFIG}"
DESTINATION "${OCIO_CONFIG_INSTALL_DIR}"
)

13 changes: 13 additions & 0 deletions share/ci/scripts/macos/install_bison.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.

set -ex

BISON_VERSION="$1"

if [ "$BISON_VERSION" == "latest" ]; then
brew install bison
else
brew install bison@${BISON_VERSION}
fi
13 changes: 13 additions & 0 deletions share/ci/scripts/macos/install_boost.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.

set -ex

BOOST_VERSION="$1"

if [ "$BOOST_VERSION" == "latest" ]; then
brew install boost
else
brew install boost@${BOOST_VERSION}
fi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
set -ex

EXPAT_VERSION="$1"
INSTALL_TARGET="$2"

EXPAT_MAJOR_MINOR=$(echo "${EXPAT_VERSION}" | cut -d. -f-2)
EXPAT_MAJOR=$(echo "${EXPAT_VERSION}" | cut -d. -f-1)
EXPAT_MINOR=$(echo "${EXPAT_MAJOR_MINOR}" | cut -d. -f2-)
Expand All @@ -25,16 +27,18 @@ mkdir build
cd build

cmake -DCMAKE_BUILD_TYPE=Release \
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \
-DEXPAT_BUILD_TOOLS=OFF \
-DEXPAT_BUILD_EXAMPLES=OFF \
-DEXPAT_BUILD_TESTS=OFF \
-DEXPAT_SHARED_LIBS=ON \
-DEXPAT_BUILD_DOCS=OFF \
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_CXX_FLAGS="-fPIC" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
../expat/.
make -j4
sudo make install
cmake --build . \
--target install \
--config Release \
--parallel 2

cd ../..
rm -rf libexpat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
set -ex

IMATH_VERSION="$1"
INSTALL_TARGET="$2"

git clone https://github.com/AcademySoftwareFoundation/Imath.git
cd Imath
Expand All @@ -20,13 +21,15 @@ fi
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \
-DBUILD_TESTING=OFF \
-DPYTHON=OFF \
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_CXX_FLAGS="-fPIC" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
../.
make -j4
sudo make install
cmake --build . \
--target install \
--config Release \
--parallel 2

cd ../..
rm -rf Imath
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
set -ex

LCMS2_VERSION="$1"
INSTALL_TARGET="$2"

git clone https://github.com/mm2/Little-CMS.git
cd Little-CMS
Expand All @@ -21,11 +22,14 @@ cp ../share/cmake/projects/Buildlcms2.cmake CMakeLists.txt
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
../.
make -j4
sudo make install
cmake --build . \
--target install \
--config Release \
--parallel 2

cd ../..
rm -rf Little-CMS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
set -ex

OIIO_VERSION="$1"
INSTALL_TARGET="$2"

git clone https://github.com/OpenImageIO/oiio.git
cd oiio
Expand All @@ -18,16 +19,20 @@ fi

mkdir build
cd build
# Disable python bindings to avoid build issues on Windows
cmake -DCMAKE_BUILD_TYPE=Release \
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \
-DOIIO_BUILD_TOOLS=OFF \
-DOIIO_BUILD_TESTS=OFF \
-DVERBOSE=ON \
-DSTOP_ON_WARNING=OFF \
-DBoost_NO_BOOST_CMAKE=ON \
-DPYTHON_EXECUTABLE=$(which python) \
-DUSE_PYTHON=OFF \
../.
make -j4
sudo make install
cmake --build . \
--target install \
--config Release \
--parallel 2

cd ../..
rm -rf oiio
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
set -ex

OPENEXR_VERSION="$1"
INSTALL_TARGET="$2"

git clone https://github.com/AcademySoftwareFoundation/openexr.git
cd openexr
Expand All @@ -20,16 +21,18 @@ fi
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release \
${INSTALL_TARGET:+"-DCMAKE_INSTALL_PREFIX="${INSTALL_TARGET}""} \
-DBUILD_TESTING=OFF \
-DOPENEXR_BUILD_UTILS=OFF \
-DOPENEXR_VIEWERS_ENABLE=OFF \
-DINSTALL_OPENEXR_EXAMPLES=OFF \
-DPYILMBASE_ENABLE=OFF \
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_CXX_FLAGS="-fPIC" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
../.
make -j4
sudo make install
cmake --build . \
--target install \
--config Release \
--parallel 2

cd ../..
rm -rf openexr
Loading

0 comments on commit 816188d

Please sign in to comment.