Skip to content

Commit 797ebc2

Browse files
committed
Add capability for plain local build
1 parent 975e3c6 commit 797ebc2

File tree

7 files changed

+57
-17
lines changed

7 files changed

+57
-17
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ __pycache__/
1212
# conan-cache content
1313
conan-cache/*
1414

15+
# Conan cluttering files
16+
conanbuild.sh
17+
conanbuildenv-release-x86_64.sh
18+
conanrun.sh
19+
conanrunenv-release-x86_64.sh
20+
deactivate_conanbuild.sh
21+
deactivate_conanbuildenv-release-x86_64.sh
22+
deactivate_conanrun.sh
23+
24+
# Build outputs
25+
conan-center-index
26+
graph.json
27+
list.json
28+
1529
# Distribution / packaging
1630
.Python
1731
build/

conan-local-recipes/recipes/oidn/all/conanfile.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,14 @@ def source(self):
5858
print(res)
5959
git.clone(
6060
"https://github.com/OpenImageDenoise/oidn.git",
61-
args=["--recursive", f"--branch v{self.version}"],
62-
target=Path(self.source_folder) / "oidn"
61+
args=[
62+
"--recursive",
63+
"--single-branch",
64+
"--depth 1",
65+
f"--branch v{self.version}",
66+
],
67+
target=Path(self.source_folder) / "oidn",
68+
hide_url=True,
6369
)
6470

6571

conan-profiles/conan-profile-Linux-X64

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ compiler=gcc
77
compiler.version={{ os.getenv("GCC_VERSION") }}
88
compiler.cppstd={{ os.getenv("CXX_VERSION") }}
99
compiler.libcxx=libstdc++11
10+
compiler.cstd=gnu17
1011

1112
[options]
1213
openvdb/*:simd=AVX
13-
gtk/system:version=3
14+
minizip-ng/*:with_libcomp=False
15+
#gtk/system:version=3
1416

1517

1618
[conf]
17-
tools.build:cflags=["-march=x86-64-v3"]
18-
tools.build:cxxflags=["-march=x86-64-v3"]
19+
tools.build:cflags+=["-march=x86-64-v3", "-Wno-error"]
20+
tools.build:cxxflags+=["-march=x86-64-v3", "-Wno-error"]
21+
tools.build:cxxflags+=["-std=c++{{ os.getenv("CXX_VERSION") }}"]
22+
tools.build:cflags+=["-std=gnu17"]
23+
tools.gnu:extra_configure_args+=["--disable-silent-rules"]
24+
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/linux-vars-X64.cmake
1925

2026
{% if 'SANITIZE' in os.environ -%}
2127

@@ -33,3 +39,5 @@ openvdb/*:tools.cmake.cmaketoolchain:extra_variables={ 'USE_CCACHE':'OFF' }
3339
{% endif %}
3440

3541
onetbb/*:tools.cmake.cmaketoolchain:extra_variables={ 'CMAKE_VERBOSE_MAKEFILE': 'ON' }
42+
43+
# vim: ft=conf

conan-profiles/conan-profile-Windows-X64

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ xapian-core/*:tools.build:cflags=!
2727
[options]
2828
openvdb/*:simd=AVX
2929
embree/*:shared=True
30+
31+
# vim: ft=conf

conan-profiles/conan-profile-common

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ doxygen/*:build_type=Release
1818
tools.system.package_manager:mode=install
1919
tools.deployer:symlinks=True
2020
tools.build:skip_test=True
21+
openimageio/*:tools.cmake.cmaketoolchain:extra_variables={ 'OIIO_BUILD_TOOLS':'OFF' }
22+
opencolorio/*:tools.cmake.cmaketoolchain:extra_variables={ 'OCIO_BUILD_APPS':'OFF' }
23+
2124

2225
[platform_tool_requires]
2326
cmake/*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This file injects CMake variables in Linux build
2+
MESSAGE(STATUS "Injecting Conan CMake variables")
3+
4+
# Place here your supplementary code to be injected in Linux build

run-conan.sh

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ function debug() {
2828
# Script starts here
2929

3030
# 0. Initialize: set globals and install conan and ninja
31-
set -euxo pipefail
31+
set -exo pipefail
3232

3333
if [[ "$RUNNER_OS" == "Linux" ]]; then
34-
cache_dir=/conan-cache
34+
cache_dir=/tmp/conan-cache
3535
else
3636
cache_dir=$WORKSPACE/conan-cache
3737
fi
3838

3939
echo "::group::CIBW_BEFORE_BUILD: pip"
40-
pip install conan
41-
pip install ninja
40+
pipx install conan
41+
pipx install ninja
4242
echo "::endgroup::"
4343

4444
# 1. Clone conancenter at a specific commit and add this cloned repo as a
@@ -50,22 +50,25 @@ echo "::endgroup::"
5050
# updates
5151
# https://docs.conan.io/2/devops/devops_local_recipes_index.html
5252
echo "::group::CIBW_BEFORE_BUILD: local recipes index repository"
53-
git clone https://github.com/conan-io/conan-center-index
54-
cd conan-center-index
55-
git reset --hard 73bae27b468ae37f5bacd4991d1113aefcf23b2b
56-
git clean -df # cleans any untracked files/folders
57-
cd ..
58-
conan remote add mycenter ./conan-center-index
53+
# Delete conan-center-index if exists
54+
if [ ! -d "conan-center-index" ]; then
55+
git clone https://github.com/conan-io/conan-center-index
56+
cd conan-center-index
57+
git reset --hard 73bae27b468ae37f5bacd4991d1113aefcf23b2b
58+
git clean -df # cleans any untracked files/folders
59+
cd ..
60+
fi
61+
conan remote add mycenter ./conan-center-index --force
5962

6063
# 2. Add local recipe repository (as a remote)
61-
conan remote add mylocal ./conan-local-recipes
64+
conan remote add mylocal ./conan-local-recipes --force
6265
conan list -r mylocal
6366
echo "::endgroup::"
6467

6568
if [[ "$RUNNER_OS" == "Linux" ]]; then
6669
# ispc
6770
echo "::group::CIBW_BEFORE_BUILD: ispc"
68-
source /opt/intel/oneapi/ispc/latest/env/vars.sh
71+
source /opt/intel/oneapi/setvars.sh
6972
echo "::endgroup::"
7073
fi
7174

0 commit comments

Comments
 (0)