Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion ci-base/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-baseos-gl-conan/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-baseqt/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-common/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-imath/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-materialx/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-ocio/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-oiio/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-opencue/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-openexr/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-openfx/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-openrv/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-openvdb/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-osl/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-otio/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-rawtoaces/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-usd/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion ci-vfxall/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions packages/common/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ENV ASWF_NINJA_VERSION=${ASWF_NINJA_VERSION}
ARG ASWF_CLANG_VERSION
ENV ASWF_CLANG_VERSION=${ASWF_CLANG_VERSION}
ARG ASWF_PYSIDE_CLANG_VERSION
ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_CLANG_VERSION}
ENV ASWF_PYSIDE_CLANG_VERSION=${ASWF_PYSIDE_CLANG_VERSION}
ARG ASWF_CPYTHON_VERSION
ENV ASWF_CPYTHON_VERSION=${ASWF_CPYTHON_VERSION}
ARG ASWF_PYTHON_MAJOR_MINOR_VERSION
Expand Down Expand Up @@ -132,10 +132,12 @@ ENV ASWF_PKG_YML=${ASWF_PKG_DIR}/config.yml
# --mount=type=bind,rw,target=${ASWF_CONAN_HOME}/recipes,source=packages/conan/recipes \
# conan list "fmt/11.2.0@aswftesting/vfx2026:*"

RUN --mount=type=cache,target=${ASWF_CONAN_HOME}/d \
--mount=type=cache,target=${CCACHE_DIR} \
RUN --mount=type=cache,id=aswf-conan-cache,target=${ASWF_CONAN_HOME}/d \
--mount=type=cache,id=aswf-ccache,target=${CCACHE_DIR} \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/.conan2,source=packages/conan/settings \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/recipes,source=packages/conan/recipes \
--mount=type=bind,source=packages/common/export_profile_recipes.sh,target=/tmp/export_profile_recipes.sh \
/tmp/export_profile_recipes.sh && \
conan create \
${ASWF_CONAN_BUILD_MISSING} \
${ASWF_CONAN_NO_REMOTE} \
Expand All @@ -147,8 +149,8 @@ RUN --mount=type=cache,target=${ASWF_CONAN_HOME}/d \
"${ASWF_PKG_DIR}"/$(if [[ -f "${ASWF_PKG_YML}" ]] ; then yq '.versions["'"${ASWF_PKG_VERSION}"'"].folder' "${ASWF_PKG_YML}" ; fi)

# Upload build to repository if called for
RUN --mount=type=cache,target=${ASWF_CONAN_HOME}/d \
--mount=type=cache,target=${CCACHE_DIR} \
RUN --mount=type=cache,id=aswf-conan-cache,target=${ASWF_CONAN_HOME}/d \
--mount=type=cache,id=aswf-ccache,target=${CCACHE_DIR} \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/.conan2,source=packages/conan/settings \
--mount=type=bind,rw,target=${ASWF_CONAN_HOME}/recipes,source=packages/conan/recipes \
--mount=type=secret,id=conan_login_username,env=CONAN_LOGIN_USERNAME \
Expand Down
71 changes: 71 additions & 0 deletions packages/common/export_profile_recipes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env bash
# Copyright (c) Contributors to the aswf-docker Project. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Pre-export all recipes referenced in the Conan profile's [replace_requires]
# section so that --build=missing can build them from source even when the
# BuildKit cache mount is empty (cache mounts don't persist between separate
# docker buildx bake invocations).

set -e

PROFILE_FILE="${ASWF_CONAN_HOME}/.conan2/profiles_${ASWF_PKG_ORG}/${ASWF_CONAN_CHANNEL}"
RECIPES_DIR="${ASWF_CONAN_HOME}/recipes"

if [ ! -f "${PROFILE_FILE}" ]; then
echo "Profile ${PROFILE_FILE} not found, skipping recipe pre-export"
exit 0
fi

# Also process included profiles (e.g. "include(ci_common6)")
PROFILES="${PROFILE_FILE}"
INCLUDED=$(grep '^include(' "${PROFILE_FILE}" | sed 's/include(\(.*\))/\1/')
for inc in ${INCLUDED}; do
inc_file="${ASWF_CONAN_HOME}/.conan2/profiles_${ASWF_PKG_ORG}/${inc}"
if [ -f "${inc_file}" ]; then
PROFILES="${PROFILES} ${inc_file}"
fi
done

# Parse [replace_requires] entries from all profiles
# Format: "name/*: name/version@user/channel"
for profile in ${PROFILES}; do
grep -E '^[a-z].*: [a-z].*/.*@' "${profile}" 2>/dev/null || true
done | sort -u | while IFS=': ' read -r _pattern ref; do
# Skip entries without a proper reference
[ -z "${ref}" ] && continue

# Parse name/version@user/channel
name_version="${ref%%@*}"
user_channel="${ref#*@}"
name="${name_version%%/*}"
version="${name_version#*/}"
user="${user_channel%%/*}"
channel="${user_channel#*/}"

# Skip if recipe directory doesn't exist
recipe_dir="${RECIPES_DIR}/${name}"
[ ! -d "${recipe_dir}" ] && continue

# Determine recipe subfolder from config.yml if present
config_yml="${recipe_dir}/config.yml"
if [ -f "${config_yml}" ]; then
subfolder=$(yq ".versions[\"${version}\"].folder" "${config_yml}" 2>/dev/null)
if [ -n "${subfolder}" ] && [ "${subfolder}" != "null" ]; then
recipe_dir="${recipe_dir}/${subfolder}"
fi
fi

[ ! -f "${recipe_dir}/conanfile.py" ] && continue

# Export the recipe to the Conan cache
echo "Pre-exporting ${name}/${version}@${user}/${channel}"
conan export \
--name "${name}" \
--version "${version}" \
--user "${user}" \
--channel "${channel}" \
"${recipe_dir}" 2>/dev/null || true
done

echo "Recipe pre-export complete"
22 changes: 17 additions & 5 deletions packages/conan/recipes/clang/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,23 @@ def package(self):
rmdir(self, self._package_folder_path / "share")
if self.options.shared:
rm(self, "*.a", self._package_folder_path / "lib")
# ASWF: since we remove the static components from the installed package, disable the check for
# those in LLVMExports.cmake
replace_in_file(self, cmake_folder / "LLVMExports.cmake", "if(NOT EXISTS \"${_cmake_file}\")", "if(FALSE)")
replace_in_file(self, self._package_folder_path / "lib" / "cmake" / "clang" / "ClangTargets.cmake",
"if(NOT EXISTS \"${_cmake_file}\")", "if(FALSE)")
# ASWF: since we remove the static components from the installed package, disable all
# file-existence checks in the cmake export files. There are two types of checks:
# 1. if(NOT EXISTS "${_cmake_file}") - file include guard
# 2. foreach(_target ${_cmake_import_check_targets}) - imported location verification
# We disable both by patching the guard and clearing the import check targets list.
for cmake_export_file in [
cmake_folder / "LLVMExports.cmake",
cmake_folder / "LLVMExports-release.cmake",
self._package_folder_path / "lib" / "cmake" / "clang" / "ClangTargets.cmake",
self._package_folder_path / "lib" / "cmake" / "clang" / "ClangTargets-release.cmake",
]:
if cmake_export_file.exists():
replace_in_file(self, cmake_export_file,
"if(NOT EXISTS \"${_cmake_file}\")", "if(FALSE)", strict=False)
# Disable the IMPORTED_LOCATION file checks by clearing the targets list
replace_in_file(self, cmake_export_file,
"set(_cmake_import_check_targets ", "set(_cmake_import_check_targets ) #", strict=False)

self._create_cmake_build_module(
build_info,
Expand Down
2 changes: 1 addition & 1 deletion packages/conan/settings/profiles_aswf/vfx2024
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mpg123/*: mpg123/system@aswf/vfx2024
nanobind/*: nanobind/2.11.0@aswf/vfx2024
nlohmann_json/*: nlohmann_json/3.12.0@aswf/vfx2024
nspr/*: nspr/system@aswf/vfx2024
nss/*: nss/3.112.0@aswf/vfx2024
nss/*: nss/3.101.0@aswf/vfx2024
ocio/*: ocio/2.3.2@aswf/vfx2024
ogg/*: ogg/system@aswf/vfx2024
oiio/*: oiio/2.5.19.0@aswf/vfx2024
Expand Down
2 changes: 1 addition & 1 deletion packages/conan/settings/profiles_aswf/vfx2025
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mpg123/*: mpg123/system@aswf/vfx2025
nanobind/*: nanobind/2.11.0@aswf/vfx2025
nlohmann_json/*: nlohmann_json/3.12.0@aswf/vfx2025
nspr/*: nspr/system@aswf/vfx2025
nss/*: nss/3.112.0@aswf/vfx2025
nss/*: nss/3.101.0@aswf/vfx2025
ocio/*: ocio/2.4.2@aswf/vfx2025
oiio/*: oiio/3.1.6.2@aswf/vfx2025
ogg/*: ogg/system@aswf/vfx2025
Expand Down
2 changes: 1 addition & 1 deletion packages/conan/settings/profiles_aswf/vfx2026
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ mpg123/*: mpg123/system@aswf/vfx2026
nanobind/*: nanobind/2.11.0@aswf/vfx2026
nlohmann_json/*: nlohmann_json/3.12.0@aswf/vfx2026
nspr/*: nspr/system@aswf/vfx2026
nss/*: nss/3.112.0@aswf/vfx2026
nss/*: nss/3.101.0@aswf/vfx2026
ocio/*: ocio/2.5.1@aswf/vfx2026
oiio/*: oiio/3.1.10.0@aswf/vfx2026
ogg/*: ogg/system@aswf/vfx2026
Expand Down
Loading
Loading