Skip to content

Commit d2af765

Browse files
authored
Merge pull request #695 from LuxCoreRender/for_v2.11
For v2.11
2 parents 33c964d + 7e8e185 commit d2af765

1,077 files changed

Lines changed: 30039 additions & 22568 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/sample-builder.yml

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
strategy:
4444
fail-fast: false
4545
matrix:
46-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
46+
os: [ubuntu-latest, windows-latest, macos-15, macos-15-intel]
4747
env:
4848
BUILD_TYPE: Release
4949
#CXX_VERSION: 20
@@ -96,7 +96,7 @@ jobs:
9696
version = input_version
9797
else:
9898
# Fall back to default
99-
build_settings_file = Path("build-helpers", "build-settings.json")
99+
build_settings_file = Path("build-system", "build-settings.json")
100100
with open(build_settings_file) as in_file:
101101
default_version = json.load(in_file)["DefaultVersion"]
102102
version = ".".join(default_version[i] for i in ("major", "minor", "patch"))
@@ -191,20 +191,56 @@ jobs:
191191
core.exportVariable('MACOSX_DEPLOYMENT_TARGET', target);
192192
core.exportVariable('PKG_ARCH', arch);
193193
194+
- name: Prepare MacOS
195+
if: runner.os == 'macOS'
196+
shell: bash
197+
run: |
198+
# We make conan believe we use apple-clang (see profiles), but
199+
# actually we use recent version of llvm, to get full compatibility
200+
# with C++20 (in particular: joining threads)
201+
202+
# llvm
203+
brew install llvm@20
204+
LLVM_PREFIX=$(brew --prefix llvm@20)
205+
echo "CC=clang" >> $GITHUB_ENV
206+
echo "CXX=clang++" >> $GITHUB_ENV
207+
echo "AR=llvm-ar" >> $GITHUB_ENV
208+
echo "RANLIB=llvm-ranlib" >> $GITHUB_ENV
209+
210+
# lld
211+
brew install lld@20
212+
LLD_PREFIX=$(brew --prefix lld@20)
213+
214+
# Set paths
215+
echo "PATH=${LLVM_PREFIX}/bin:${LLD_PREFIX}/bin:$PATH" >> $GITHUB_ENV
216+
echo "DYLD_LIBRARY_PATH=${LLVM_PREFIX}/lib:${LLD_PREFIX}/lib:${DYLD_LIBRARY_PATH}" >> $GITHUB_ENV
217+
218+
# Set flags
219+
echo "LDFLAGS=${LD_FLAGS} -fuse-ld=${LLD_PREFIX}/bin/ld64.lld -L${LLVM_PREFIX}/lib -L${LLD_PREFIX}/lib" >> $GITHUB_ENV
220+
echo "CPPFLAGS=${CPPFLAGS} -I${LLVM_PREFIX}/include -I${LLD_PREFIX}/include" >> $GITHUB_ENV
221+
222+
# OpenMP
223+
brew install libomp
224+
echo "OpenMP_ROOT=$(brew --prefix libomp)" >> $GITHUB_ENV
225+
194226
- name: Build (Windows)
195227
if: runner.os == 'Windows'
196228
shell: cmd
197229
env:
198230
CONAN_HOME: ${{ github.workspace }}\.conan2
199231
run: |
200-
pip install conan && make deps && make luxcore && make luxcoreui && make luxcoreconsole
232+
rem We have to install 'wheel', despite it is useless for samples,
233+
rem Otherwise 'make deps' will complain
234+
235+
pip install conan && pip install wheel && make deps && make luxcore && make luxcoreui && make luxcoreconsole
201236
202237
- name: Build (MacOS)
203238
if: runner.os == 'macOS'
204239
shell: bash
205240
run: |
206-
pip install conan
207-
make deps
241+
# We have to install 'wheel', despite it is useless for samples,
242+
# otherwise make deps will complain
243+
pip install conan && pip install wheel && make deps
208244
make luxcore
209245
make luxcoreui
210246
make luxcoreconsole
@@ -221,14 +257,19 @@ jobs:
221257
manylinux-interpreters ensure cp313-cp313
222258
PATH=/opt/python/cp313-cp313/bin:$PATH
223259
which python
260+
261+
# We have to install 'wheel', despite it is useless for samples,
262+
# otherwise make deps will complain
224263
python -m pip install conan
264+
python -m pip install wheel
225265
226266
# Install toolchain (gcc, ccache...)
227267
CC=/opt/rh/gcc-toolset-14/root/usr/bin/gcc
228268
CXX=/opt/rh/gcc-toolset-14/root/usr/bin/g++
229269
export CMAKE_C_COMPILER_LAUNCHER=ccache
230270
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
231271
export VERBOSE=1
272+
dnf install -y sudo
232273
#export CLICOLOR_FORCE=1
233274
234275
# Install conda

.github/workflows/wheel-builder.yml

Lines changed: 66 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,8 @@ jobs:
5858
strategy:
5959
fail-fast: false
6060
matrix:
61-
python-minor: [9, 10, 11, 12, 13]
62-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
63-
#python-minor: [ 9 ]
64-
#python-minor: [ 12]
65-
#os: [macos-14]
66-
#python-minor: [ 11]
67-
#os: [windows-latest]
68-
#python-minor: [ 11]
69-
#os: [macos-13]
61+
python-minor: [10, 11, 12, 13, 14]
62+
os: [ubuntu-latest, windows-latest, macos-15-intel, macos-15]
7063
env:
7164
# Reminder: report all variables here to CIBW_ENVIRONMENT_PASS_LINUX
7265
BUILD_TYPE: ${{ github.event.inputs.build-type || 'Release' }}
@@ -89,14 +82,14 @@ jobs:
8982

9083
- name: Checkout main repository (standard context)
9184
if: ${{ !env.ACT }}
92-
uses: actions/checkout@v4
85+
uses: actions/checkout@v6
9386
with:
9487
repository: ${{ inputs.repository }}
9588
ref: ${{ inputs.ref }}
9689

9790
- name: Checkout main repository (act context)
9891
if: env.ACT
99-
uses: actions/checkout@v4
92+
uses: actions/checkout@v6
10093

10194
- name: Get current commit
10295
id: current-commit
@@ -126,7 +119,7 @@ jobs:
126119
echo "CONAN_HOME=${_conan_home}" >> $GITHUB_ENV
127120
128121
- name: Configure ccache
129-
uses: actions/github-script@v7
122+
uses: actions/github-script@v8
130123
with:
131124
script: |
132125
const workspace = String.raw`${{ github.workspace }}`;
@@ -135,7 +128,7 @@ jobs:
135128
'cache-variant': String.raw`ccache`,
136129
'CMAKE_CXX_COMPILER_LAUNCHER': String.raw`ccache`,
137130
'CMAKE_C_COMPILER_LAUNCHER': String.raw`ccache`,
138-
'CCACHE_CONFIGPATH': String.raw`${workspace}/build-helpers/ccache.conf`,
131+
'CCACHE_CONFIGPATH': String.raw`${workspace}/build-system/ccache.conf`,
139132
'CCACHE_DIR': String.raw`${workspace}/.ccache`,
140133
'CCACHE_DEBUGDIR': String.raw`${workspace}/ccache-debug`,
141134
'CCACHE_LOGFILE': String.raw`${workspace}/ccache.log`
@@ -153,7 +146,7 @@ jobs:
153146
sudo apt-get update -y
154147
155148
- name: ccache
156-
uses: hendrikmuhs/ccache-action@v1.2
149+
uses: hendrikmuhs/ccache-action@v1
157150
with:
158151
create-symlink: false
159152
variant: ${{ env.cache-variant }}
@@ -181,42 +174,66 @@ jobs:
181174
182175
- name: Set MacOS deployment target and other set-ups
183176
if: runner.os == 'macOS'
184-
uses: actions/github-script@v7
177+
uses: actions/github-script@v8
185178
with:
179+
# Minimum targets driven by:
180+
# Intel: libomp
181+
# Arm: opensubdiv
186182
script: |
187183
if ('${{ runner.arch }}' == 'X64') {
188-
target = '10.15';
184+
target = '14.0'; // Required by libomp
189185
arch='x86_64';
190186
}
191-
else if ('${{ env.PYTHON_MINOR }}' != '8') {
192-
target = '11.0';
193-
arch='armv8';
194-
}
195187
else {
196-
target = '12.0';
188+
target = '15.0'; // Required by libomp
197189
arch='armv8';
198190
}
199191
core.exportVariable('MACOSX_DEPLOYMENT_TARGET', target);
192+
core.exportVariable('CMAKE_OSX_DEPLOYMENT_TARGET', target);
200193
core.exportVariable('PKG_ARCH', arch);
201194
202195
- name: Prepare MacOS
203196
if: runner.os == 'macOS'
204197
shell: bash
205198
run: |
206-
_T=$(brew --prefix llvm@15)
207-
echo "CXX=${_T}/bin/clang++" >> $GITHUB_ENV
208-
echo "CC=${_T}/bin/clang" >> $GITHUB_ENV
209-
#echo "AR=${_T}/bin/ar" >> $GITHUB_ENV
210-
#echo "RANLIB=${_T}/bin/ranlib" >> $GITHUB_ENV
211-
echo "LDFLAGS=-fuse-ld=$_T/bin/ld64.lld" >> $GITHUB_ENV
199+
# We make conan believe we use apple-clang (see profiles), but
200+
# actually we use recent version of llvm, to get full compatibility
201+
# with C++20 (in particular: joining threads)
202+
203+
# llvm
204+
brew install llvm@20
205+
brew link llvm@20 --overwrite
206+
LLVM_PREFIX=$(brew --prefix llvm@20)
207+
echo "CC=clang" >> $GITHUB_ENV
208+
echo "CXX=clang++" >> $GITHUB_ENV
209+
echo "AR=llvm-ar" >> $GITHUB_ENV
210+
echo "RANLIB=llvm-ranlib" >> $GITHUB_ENV
211+
212+
# lld
213+
brew install lld@20
214+
brew link lld@20 --overwrite
215+
LLD_PREFIX=$(brew --prefix lld@20)
216+
217+
# Set paths
218+
echo "PATH=${LLVM_PREFIX}/bin:${LLD_PREFIX}/bin:$PATH" >> $GITHUB_ENV
219+
echo "DYLD_LIBRARY_PATH=${LLVM_PREFIX}/lib:${LLD_PREFIX}/lib:${DYLD_LIBRARY_PATH}" >> $GITHUB_ENV
220+
221+
# Set flags
222+
echo "LDFLAGS=${LD_FLAGS} -fuse-ld=${LLD_PREFIX}/bin/ld64.lld -L${LLVM_PREFIX}/lib -L${LLD_PREFIX}/lib" >> $GITHUB_ENV
223+
echo "CPPFLAGS=${CPPFLAGS} -I${LLVM_PREFIX}/include -I${LLD_PREFIX}/include" >> $GITHUB_ENV
224+
225+
# OpenMP
226+
brew install libomp
227+
brew link libomp --overwrite
228+
echo "OpenMP_ROOT=$(brew --prefix libomp)" >> $GITHUB_ENV
212229
213230
214231
# TODO: The following block is an ugly hack but, at the moment (2025-02-25),
215232
# scikit-build-core lacks a preset parameter, so this is the only way
216233
# I found to pass a calculated environment var to CMake build step
217234
- name: Set M4 env var
218235
if: runner.os != 'Windows'
219-
uses: actions/github-script@v7
236+
uses: actions/github-script@v8
220237
with:
221238
script: |
222239
if ('${{ runner.arch }}' == 'X64') {
@@ -235,7 +252,7 @@ jobs:
235252
if (input_version := "${{ inputs.release-version }}"):
236253
result = input_version
237254
else:
238-
build_settings_file = Path("build-helpers", "build-settings.json")
255+
build_settings_file = Path("build-system", "build-settings.json")
239256
with open(build_settings_file) as in_file:
240257
default_version = json.load(in_file)["DefaultVersion"]
241258
result = ".".join(default_version[i] for i in ("major", "minor", "patch"))
@@ -257,7 +274,7 @@ jobs:
257274
258275
# Build wheel
259276
- name: Build wheels
260-
uses: pypa/cibuildwheel@v2.22.0
277+
uses: pypa/cibuildwheel@v3.4.0
261278
env:
262279
CIBW_BUILD_FRONTEND: build
263280
CIBW_BUILD_VERBOSITY: 1
@@ -270,6 +287,7 @@ jobs:
270287
SKBUILD_CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
271288
GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
272289
LUX_BUILD_TYPE=${{ env.BUILD_TYPE }}
290+
DEPS_WITHOUT_SUDO=1
273291
CIBW_ENVIRONMENT_PASS_LINUX: |
274292
CC
275293
CXX
@@ -295,6 +313,7 @@ jobs:
295313
dnf install -y almalinux-release-devel
296314
dnf install -y ccache
297315
dnf install -y perl-IPC-Cmd perl-Digest-SHA
316+
dnf install -y ninja-build
298317
299318
# Install gh (via conda)
300319
dnf install -y wget
@@ -313,13 +332,13 @@ jobs:
313332
fi
314333
315334
# Install dependencies
316-
pip install conan && make deps
335+
pip install "conan==2.21" && pip install wheel && make deps
317336
318337
CIBW_BEFORE_ALL_MACOS: |
319-
pip install conan && make deps
338+
pip install "conan==2.21" && pip install wheel && make deps
320339
321340
CIBW_BEFORE_ALL_WINDOWS: |
322-
pip install conan && make deps
341+
pip install "conan==2.21" && pip install wheel && make deps
323342
324343
325344
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
@@ -339,7 +358,7 @@ jobs:
339358
{wheel}
340359
341360
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: |
342-
bash.exe ${{ env.WORKSPACE }}/build-helpers/wheels/repair_wheel_windows.sh '{wheel}' '{dest_dir}' '%VCToolsRedistDir%%Platform%' '${{ env.WORKSPACE }}'
361+
bash.exe ${{ env.WORKSPACE }}/build-system/wheels/repair_wheel_windows.sh '{wheel}' '{dest_dir}' '%VCToolsRedistDir%%Platform%' '${{ env.WORKSPACE }}'
343362
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
344363
cp {wheel} ${{ env.WORKSPACE }}
345364
paths=$(find ${{ env.WORKSPACE }} -type d -wholename "*/lib" -print0 | xargs -0 realpath | tr "\n" ":")
@@ -351,9 +370,16 @@ jobs:
351370
CIBW_TEST_COMMAND_LINUX: pyluxcoretest
352371
CIBW_TEST_COMMAND_WINDOWS: pyluxcoretest
353372
CIBW_TEST_COMMAND_MACOS: |
354-
if [[ ${{ matrix.os }} == 'macos-13' ]]; then
355-
# Only for Intel: ARM runner raises an OpenCL driver issue
373+
if [[ ${{ matrix.os }} == 'macos-15-intel' ]]; then
374+
# Full test for Intel
375+
echo "Testing x86_64"
356376
pyluxcoretest
377+
elif [[ ${{ matrix.os }} == 'macos-15' ]]; then
378+
# Light test, as ARM runner raises an OpenCL driver issue otherwise
379+
echo "Testing arm"
380+
python -c "import pyluxcore"
381+
else
382+
echo "UNHANDLED OS"
357383
fi
358384
CIBW_CONTAINER_ENGINE: >
359385
docker;
@@ -369,7 +395,7 @@ jobs:
369395
- name: Save dependency cache
370396
if: always()
371397
id: cache-deps-save
372-
uses: actions/cache/save@v4
398+
uses: actions/cache/save@v5
373399
with:
374400
path: conan-cache
375401
key: deps-${{ matrix.os }}-${{ matrix.python-minor}}-${{ hashFiles('**/conan-cache') }}
@@ -379,7 +405,7 @@ jobs:
379405
#uses: mxschmitt/action-tmate@v3
380406

381407
# Upload artifacts
382-
- uses: actions/upload-artifact@v4
408+
- uses: actions/upload-artifact@v5
383409
id: upload
384410
with:
385411
name: cibw-wheels-${{ matrix.os }}-${{ matrix.python-minor }}
@@ -395,7 +421,7 @@ jobs:
395421
attestation-url: ${{ steps.attestation-step.outputs.attestation-url }}
396422

397423
steps:
398-
- uses: actions/download-artifact@v4
424+
- uses: actions/download-artifact@v7
399425
if: ${{ !env.ACT }}
400426
with:
401427
pattern: cibw-wheels-*
@@ -405,6 +431,6 @@ jobs:
405431
- name: Generate artifact attestations
406432
id: attestation-step
407433
if: ${{ !env.ACT }}
408-
uses: actions/attest-build-provenance@v2
434+
uses: actions/attest-build-provenance@v3
409435
with:
410436
subject-path: ${{ github.workspace }}/dist/*

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ doc/
99
generated/
1010
lib/
1111
nbproject/
12+
.cache/
1213
deps/perceptualdiff-master/libpdiff.a
1314
samples/(benchsimple|smallluxgpu)/(Debug|Release)/
1415
samples/luxcoreui/deps/glfw-3.1.1/src/glfw_config.h
@@ -36,7 +37,7 @@ compile_commands.json
3637
dist
3738
samples/pyluxcoretool/__pycache__
3839
release_OSX/
39-
build-helpers/make/__pycache__
40+
build-system/make/__pycache__
4041
*.pyc
4142

4243
###########################
@@ -99,3 +100,4 @@ CMakeUserPresets.json
99100
# Visual Studio (Code)
100101
.vs/
101102
.vscode/
103+
tags

0 commit comments

Comments
 (0)