diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6e439c..b1f985d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -214,6 +214,7 @@ jobs: export CONAN_LOG_LEVEL=${{ env.CONAN_LOG_LEVEL }} export LUXDEPS_VERSION=${{ env.LUXDEPS_VERSION }} export CMAKE_POLICY_VERSION_MINIMUM=3.5 + export CI=1 # Set Python manylinux-interpreters ensure cp313-cp313 diff --git a/.gitignore b/.gitignore index bb8bb73..ac7a5ff 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,20 @@ __pycache__/ # conan-cache content conan-cache/* +# Conan cluttering files +conanbuild.sh +conanbuildenv-release-x86_64.sh +conanrun.sh +conanrunenv-release-x86_64.sh +deactivate_conanbuild.sh +deactivate_conanbuildenv-release-x86_64.sh +deactivate_conanrun.sh + +# Build outputs +conan-center-index +graph.json +list.json + # Distribution / packaging .Python build/ diff --git a/TODO.txt b/TODO.txt index 5dde6bf..6ba630b 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,7 +1,7 @@ Remove all test building (there are still packages that build tests...) -Post PR to modify openimageio (fmt as private dep in CMake) -Remove Python requirements (there are packages that require Python, should not exist) OIIO: don't build executables (oiiotools) Address warnings Reduce embedded deps Include licenses +OIDN: add gpu plugins +Doxygen: remove (should be installed by developer) diff --git a/conan-local-recipes/recipes/imguifiledialog/all/conandata.yml b/conan-local-recipes/recipes/imguifiledialog/all/conandata.yml index fbaac32..604c5cc 100644 --- a/conan-local-recipes/recipes/imguifiledialog/all/conandata.yml +++ b/conan-local-recipes/recipes/imguifiledialog/all/conandata.yml @@ -2,3 +2,6 @@ sources: "0.6.7": url: "https://github.com/aiekick/ImGuiFileDialog/archive/refs/tags/v0.6.7.zip" sha256: "939fa922162a490353f17b4bc15e59110fc9ea81c123acc29c6e5f3c8f1bbc7c" + "0.6.8": + url: "https://github.com/aiekick/ImGuiFileDialog/archive/refs/tags/v0.6.8.zip" + sha256: "02517f9184db4301cbbe8cb1d661a5b5b942cfb95f6e3f176535e1a2d2360dc5" diff --git a/conan-local-recipes/recipes/imguifiledialog/all/conanfile.py b/conan-local-recipes/recipes/imguifiledialog/all/conanfile.py index 127a1d5..062b34b 100644 --- a/conan-local-recipes/recipes/imguifiledialog/all/conanfile.py +++ b/conan-local-recipes/recipes/imguifiledialog/all/conanfile.py @@ -27,7 +27,7 @@ class ImguiFileDialogConan(ConanFile): "fPIC": True, "use_std_filesystem": True, } - requires = "imgui/1.92.4" + requires = "imgui/[~1.92]" def config_options(self): diff --git a/conan-local-recipes/recipes/imguifiledialog/config.yml b/conan-local-recipes/recipes/imguifiledialog/config.yml index b6fc4ad..e91cceb 100644 --- a/conan-local-recipes/recipes/imguifiledialog/config.yml +++ b/conan-local-recipes/recipes/imguifiledialog/config.yml @@ -1,3 +1,5 @@ versions: "0.6.7": folder: all + "0.6.8": + folder: all diff --git a/conan-local-recipes/recipes/nvrtc/binary/conandata.yml b/conan-local-recipes/recipes/nvrtc/binary/conandata.yml index eeb4313..89b35cd 100644 --- a/conan-local-recipes/recipes/nvrtc/binary/conandata.yml +++ b/conan-local-recipes/recipes/nvrtc/binary/conandata.yml @@ -8,6 +8,7 @@ sources: x86_64: url: "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/windows-x86_64/cuda_nvrtc-windows-x86_64-12.8.93-archive.zip" sha256: "a63302a077f0248a743a1a7caa7dbd80d0fac56c6cfa9c41fa05fac9b7e5eda5" + "13.0.88": Linux: x86_64: @@ -17,3 +18,13 @@ sources: x86_64: url: "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/windows-x86_64/cuda_nvrtc-windows-x86_64-13.0.88-archive.zip" sha256: "8c50a52467826167e0dbe99936140c52d62272bfc5849fe2d6587d050c8c5d29" + + "13.1.115": + Linux: + x86_64: + url: "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/linux-x86_64/cuda_nvrtc-linux-x86_64-13.1.115-archive.tar.xz" + sha256: "86077f16674ccea3e621ade9678887a37aca8f7500091aee4cabb1915e0c527b" + Windows: + x86_64: + url: "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/windows-x86_64/cuda_nvrtc-windows-x86_64-13.1.115-archive.zip" + sha256: "4ddd5a1e34fd62bb41e78c0725edfbf5609f4ecedd7fe118eddf2148b097fc91" diff --git a/conan-local-recipes/recipes/nvrtc/config.yml b/conan-local-recipes/recipes/nvrtc/config.yml index b265703..d3abf71 100644 --- a/conan-local-recipes/recipes/nvrtc/config.yml +++ b/conan-local-recipes/recipes/nvrtc/config.yml @@ -3,3 +3,5 @@ versions: folder: "binary" "13.0.88": folder: "binary" + "13.1.115": + folder: "binary" diff --git a/conan-local-recipes/recipes/oidn/all/conanfile.py b/conan-local-recipes/recipes/oidn/all/conanfile.py index 1577051..28de73d 100644 --- a/conan-local-recipes/recipes/oidn/all/conanfile.py +++ b/conan-local-recipes/recipes/oidn/all/conanfile.py @@ -11,7 +11,7 @@ from conan.tools.scm import Git # Gather here the various dependency versions, for convenience -TBB_VERSION = "2022.2.0" +TBB_VERSION = "2022.3.0" class OidnConan(ConanFile): name = "oidn" @@ -58,8 +58,14 @@ def source(self): print(res) git.clone( "https://github.com/OpenImageDenoise/oidn.git", - args=["--recursive", f"--branch v{self.version}"], - target=Path(self.source_folder) / "oidn" + args=[ + "--recursive", + "--single-branch", + "--depth 1", + f"--branch v{self.version}", + ], + target=Path(self.source_folder) / "oidn", + hide_url=True, ) diff --git a/conan-local-recipes/recipes/oidn/config.yml b/conan-local-recipes/recipes/oidn/config.yml index aecfc13..10a5b68 100644 --- a/conan-local-recipes/recipes/oidn/config.yml +++ b/conan-local-recipes/recipes/oidn/config.yml @@ -1,3 +1,5 @@ versions: "2.3.3": folder: "all" + "2.4.1": + folder: "all" diff --git a/conan-profiles/conan-profile-Linux-X64 b/conan-profiles/conan-profile-Linux-X64 index 3393e1c..8edb615 100644 --- a/conan-profiles/conan-profile-Linux-X64 +++ b/conan-profiles/conan-profile-Linux-X64 @@ -7,15 +7,21 @@ compiler=gcc compiler.version={{ os.getenv("GCC_VERSION") }} compiler.cppstd={{ os.getenv("CXX_VERSION") }} compiler.libcxx=libstdc++11 +compiler.cstd=gnu17 [options] openvdb/*:simd=AVX -gtk/system:version=3 +minizip-ng/*:with_libcomp=False +#gtk/system:version=3 [conf] -tools.build:cflags=["-march=x86-64-v3"] -tools.build:cxxflags=["-march=x86-64-v3"] +tools.build:cflags+=["-march=x86-64-v3", "-Wno-error"] +tools.build:cxxflags+=["-march=x86-64-v3", "-Wno-error"] +tools.build:cxxflags+=["-std=c++{{ os.getenv("CXX_VERSION") }}"] +tools.build:cflags+=["-std=gnu17"] +tools.gnu:extra_configure_args+=["--disable-silent-rules"] +tools.cmake.cmaketoolchain:user_toolchain+={{os.getenv("LUX_PROFILE_DIR", profile_dir)}}/linux-vars-X64.cmake {% if 'SANITIZE' in os.environ -%} @@ -33,3 +39,5 @@ openvdb/*:tools.cmake.cmaketoolchain:extra_variables={ 'USE_CCACHE':'OFF' } {% endif %} onetbb/*:tools.cmake.cmaketoolchain:extra_variables={ 'CMAKE_VERBOSE_MAKEFILE': 'ON' } + +# vim: ft=conf diff --git a/conan-profiles/conan-profile-Windows-X64 b/conan-profiles/conan-profile-Windows-X64 index 0584fb0..097e538 100644 --- a/conan-profiles/conan-profile-Windows-X64 +++ b/conan-profiles/conan-profile-Windows-X64 @@ -13,7 +13,7 @@ xapian-core/*:compiler.cppstd=14 [conf] tools.build:cxxflags=["/openmp", "/MP", "/DEBUG:NONE", "/O2", "/arch:AVX2"] tools.build:cflags=["/openmp", "/MP", "/DEBUG:NONE", "/O2", "/arch:AVX2"] -embree/*:tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/windows-vars-X64.cmake +embree/*:tools.cmake.cmaketoolchain:user_toolchain+={{os.getenv("LUX_PROFILE_DIR", profile_dir)}}/windows-vars-X64.cmake embree/*:tools.build:cxxflags=["/DEBUG:NONE", "/O2" ] embree/*:tools.build:cflags=["/DEBUG:NONE", "/O2" ] openimageio/*:tools.build:cxxflags+=["/utf-8" ] @@ -27,3 +27,5 @@ xapian-core/*:tools.build:cflags=! [options] openvdb/*:simd=AVX embree/*:shared=True + +# vim: ft=conf diff --git a/conan-profiles/conan-profile-common b/conan-profiles/conan-profile-common index 3a9d847..13e8fe8 100644 --- a/conan-profiles/conan-profile-common +++ b/conan-profiles/conan-profile-common @@ -18,6 +18,9 @@ doxygen/*:build_type=Release tools.system.package_manager:mode=install tools.deployer:symlinks=True tools.build:skip_test=True +openimageio/*:tools.cmake.cmaketoolchain:extra_variables={ 'OIIO_BUILD_TOOLS':'OFF' } +opencolorio/*:tools.cmake.cmaketoolchain:extra_variables={ 'OCIO_BUILD_APPS':'OFF' } + [platform_tool_requires] cmake/* @@ -30,6 +33,8 @@ spdlog/*:header_only=True spdlog/*:use_std_fmt=True nvrtc/*:shared=True libtiff/*:jpeg=libjpeg-turbo +# For onetbb: +hwloc/*:shared=True openimageio/*:with_freetype=False openimageio/*:with_hdf5=False diff --git a/conan-profiles/conan-profile-macOS-ARM64 b/conan-profiles/conan-profile-macOS-ARM64 index 7f28b00..9267719 100644 --- a/conan-profiles/conan-profile-macOS-ARM64 +++ b/conan-profiles/conan-profile-macOS-ARM64 @@ -27,7 +27,7 @@ VERBOSE=1 [conf] &:tools.build:cxxflags+=["-O3"] -tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/macos-vars-ARM64.cmake +tools.cmake.cmaketoolchain:user_toolchain+={{os.getenv("LUX_PROFILE_DIR", profile_dir)}}/macos-vars-ARM64.cmake openvdb/*:tools.build:cxxflags+=["-Wno-error", "-Wno-missing-template-arg-list-after-template-kw"] diff --git a/conan-profiles/conan-profile-macOS-X64 b/conan-profiles/conan-profile-macOS-X64 index 5296950..1c5328f 100644 --- a/conan-profiles/conan-profile-macOS-X64 +++ b/conan-profiles/conan-profile-macOS-X64 @@ -23,7 +23,7 @@ MACOSX_DEPLOYMENT_TARGET=11.0 [conf] &:tools.build:cxxflags+=["-ftree-vectorize", "-march=x86-64-v3", "-O3"] -tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/macos-vars-X64.cmake +tools.cmake.cmaketoolchain:user_toolchain+={{os.getenv("LUX_PROFILE_DIR", profile_dir)}}/macos-vars-X64.cmake openvdb/*:tools.build:cxxflags+=["-Wno-error", "-Wno-missing-template-arg-list-after-template-kw"] # vim: ft=conf diff --git a/conan-profiles/linux-vars-X64.cmake b/conan-profiles/linux-vars-X64.cmake new file mode 100644 index 0000000..ae4a8bd --- /dev/null +++ b/conan-profiles/linux-vars-X64.cmake @@ -0,0 +1,4 @@ +# This file injects CMake variables in Linux build +MESSAGE(STATUS "Injecting Conan CMake variables") + +# Place here your supplementary code to be injected in Linux build diff --git a/conanfile.py b/conanfile.py index e5587b5..e8e9eee 100644 --- a/conanfile.py +++ b/conanfile.py @@ -12,31 +12,31 @@ # Gather here the various dependency versions, for convenience # (in alphabetic order) BOOST_VERSION = "1.88.0" -DOXYGEN_VERSION = "1.14.0" -EIGEN_VERSION = "5.0.0" -EMBREE_VERSION = "4.3.3" -FMT_VERSION = "12.0.0" +DOXYGEN_VERSION = "1.16.1" +EIGEN_VERSION = "5.0.1" +EMBREE_VERSION = "4.4.0" +FMT_VERSION = "12.1.0" GLFW_VERSION = "3.4" IMATH_VERSION = "3.2.1" -IMGUI_VERSION = "1.92.4" +IMGUI_VERSION = "1.92.5" IMGUIFILEDIALOG_VERSION = "0.6.7" -JSON_VERSION = "3.12.0" -LIBDEFLATE_VERSION = "1.23" +LIBDEFLATE_VERSION = "1.25" +LIBTIFF_VERSION = "4.7.1" MINIZIP_VERSION = "4.0.7" -NINJA_VERSION = "1.13.1" -NVRTC_VERSION = "13.0.88" -OCIO_VERSION = "2.5.0" -OIIO_VERSION = "3.1.6.2" +NINJA_VERSION = "1.13.2" +NLOHMANN_JSON_VERSION = "3.12.0" +NVRTC_VERSION = "13.1.115" +OCIO_VERSION = "2.5.1" +OIIO_VERSION = "3.1.10.0" OIDN_VERSION = "2.3.3" -OPENEXR_VERSION = "3.3.5" -OPENJPH_VERSION = "0.24.2" -OPENSUBDIV_VERSION = "3.6.0" -OPENVDB_VERSION = "11.0.0" +ONETBB_VERSION = "2022.3.0" +OPENEXR_VERSION = "3.4.4" +OPENJPH_VERSION = "0.25.3" +OPENSUBDIV_VERSION = "3.7.0" +OPENVDB_VERSION = "12.1.1" PYBIND11_VERSION = "3.0.1" -ROBINHOOD_VERSION = "3.11.5" -SPDLOG_VERSION = "1.16.0" -TBB_VERSION = "2022.2.0" -TIFF_VERSION = "4.7.1" +ROBIN_HOOD_HASHING_VERSION = "3.11.5" +SPDLOG_VERSION = "1.17.0" ZSTD_VERSION = "1.5.7" @@ -63,7 +63,7 @@ class LuxCoreDeps(ConanFile): def requirements(self): self.requires( - f"onetbb/{TBB_VERSION}", + f"onetbb/{ONETBB_VERSION}", override=True, libs=True, transitive_libs=True, @@ -81,7 +81,7 @@ def requirements(self): transitive_libs=True, ) self.requires( - f"libtiff/{TIFF_VERSION}", + f"libtiff/{LIBTIFF_VERSION}", override=True, ) self.requires( @@ -109,10 +109,14 @@ def requirements(self): # Header only deps - make them transitive self.requires( - f"robin-hood-hashing/{ROBINHOOD_VERSION}", transitive_headers=True + f"robin-hood-hashing/{ROBIN_HOOD_HASHING_VERSION}", + transitive_headers=True ) self.requires(f"eigen/{EIGEN_VERSION}", transitive_headers=True) - self.requires(f"nlohmann_json/{JSON_VERSION}", transitive_headers=True) + self.requires( + f"nlohmann_json/{NLOHMANN_JSON_VERSION}", + transitive_headers=True + ) self.requires(f"pybind11/{PYBIND11_VERSION}", transitive_headers=True) self.requires(f"spdlog/{SPDLOG_VERSION}", transitive_headers=True) self.requires( diff --git a/run-conan.sh b/run-conan.sh index 6c5fef2..683e4b1 100755 --- a/run-conan.sh +++ b/run-conan.sh @@ -15,6 +15,14 @@ test -n "$RUNNER_ARCH" || die "RUNNER_ARCH not set" CONAN_PROFILE=conan-profile-${RUNNER_OS}-${RUNNER_ARCH} +# The following variable contains the commit where Conan Center Index will be +# checked out. This is utterly important for maintenability that Conan Center +# Index be pinned at a given commit. Otherwise, spurious unwanted updates will +# gradually happen and finally break the build. +# To the contrary, you may need to upgrade this commit when you want to upgrade +# a given dependency. +CONAN_COMMIT=d60a35f00bf85fd1abf2df0877878f54404e3df0 + # Debug utility (install a specific package) function debug() { conan install \ @@ -28,17 +36,24 @@ function debug() { # Script starts here # 0. Initialize: set globals and install conan and ninja -set -euxo pipefail +set -exo pipefail -if [[ "$RUNNER_OS" == "Linux" ]]; then +if [[ "$RUNNER_OS" == "Linux" && -n "$CI" ]]; then + echo "Linux - CI" cache_dir=/conan-cache +elif [[ "$RUNNER_OS" == "Linux" && -z "$CI" ]]; then + # Linux - Plain local build + echo "Linux - Plain local build" + cache_dir=/tmp/conan-cache else + # Others + echo "MacOS or Windows - CI build" cache_dir=$WORKSPACE/conan-cache fi echo "::group::CIBW_BEFORE_BUILD: pip" -pip install conan -pip install ninja +pipx install conan +pipx install ninja echo "::endgroup::" # 1. Clone conancenter at a specific commit and add this cloned repo as a @@ -50,22 +65,25 @@ echo "::endgroup::" # updates # https://docs.conan.io/2/devops/devops_local_recipes_index.html echo "::group::CIBW_BEFORE_BUILD: local recipes index repository" -git clone https://github.com/conan-io/conan-center-index -cd conan-center-index -git reset --hard 73bae27b468ae37f5bacd4991d1113aefcf23b2b -git clean -df # cleans any untracked files/folders -cd .. -conan remote add mycenter ./conan-center-index +# Delete conan-center-index if exists +if [ ! -d "conan-center-index" ]; then + git clone https://github.com/conan-io/conan-center-index + cd conan-center-index + git reset --hard ${CONAN_COMMIT} + git clean -df # cleans any untracked files/folders + cd .. +fi +conan remote add mycenter ./conan-center-index --force # 2. Add local recipe repository (as a remote) -conan remote add mylocal ./conan-local-recipes +conan remote add mylocal ./conan-local-recipes --force conan list -r mylocal echo "::endgroup::" if [[ "$RUNNER_OS" == "Linux" ]]; then # ispc echo "::group::CIBW_BEFORE_BUILD: ispc" - source /opt/intel/oneapi/ispc/latest/env/vars.sh + source /opt/intel/oneapi/setvars.sh echo "::endgroup::" fi diff --git a/utils/clean-conan-files.sh b/utils/clean-conan-files.sh new file mode 100755 index 0000000..447f19c --- /dev/null +++ b/utils/clean-conan-files.sh @@ -0,0 +1,24 @@ +#!/bin/bash +echo "Cleaning Conan intermediary files" + + +files=( + "conanbuildenv-release-x86_64.sh" \ + "conanbuild.sh" \ + "conanrunenv-release-x86_64.sh" \ + "conanrun.sh" \ + "deactivate_conanbuildenv-release-x86_64.sh" \ + "deactivate_conanbuild.sh" \ + "deactivate_conanrun.sh" \ + "graph.json" \ + "list.json" \ +) + +for file in "${files[@]}"; do + echo "- Removing ${file}" + rm -f "$file" +done + + +echo "- Removing conan-center-index (folder)" +rm -rf conan-center-index diff --git a/utils/debug.sh b/utils/local-CI-build.sh similarity index 100% rename from utils/debug.sh rename to utils/local-CI-build.sh