Skip to content

Commit d97bc0a

Browse files
authored
Merge pull request #654 from LuxCoreRender/for_v2.10
Merge v2.10 into Master
2 parents a342e1e + 2dcd131 commit d97bc0a

1,504 files changed

Lines changed: 544522 additions & 551112 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.

.ccache/dummy.txt

Whitespace-only changes.

.github/FUNDING.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/sample-builder.yml

Lines changed: 45 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -123,21 +123,9 @@ jobs:
123123
core.exportVariable(key, value);
124124
}
125125
126-
# TODO
127-
## Update apt: needed to install ccache
128-
#- name: Update apt (Linux)
129-
#if: runner.os == 'Linux'
130-
#shell: bash
131-
#run: |
132-
#sudo apt-get update -y
133-
134126
- uses: actions/setup-python@v5
135127
with:
136128
python-version: 3.13
137-
- name: Install GH CLI
138-
uses: dev-hanz-ops/install-gh-cli-action@v0.2.1
139-
with:
140-
gh-cli-version: 2.67.0
141129

142130
# Update apt: needed to install ccache-action
143131
- name: Update apt (Linux)
@@ -151,8 +139,7 @@ jobs:
151139
with:
152140
create-symlink: false
153141
variant: ${{ env.cache-variant }}
154-
key: samples-${{ matrix.os }}-
155-
restore-keys: samples-${{ matrix.os }}-
142+
key: samples-${{ matrix.os }}
156143
max-size: 5G
157144
verbose: 1
158145

@@ -180,45 +167,30 @@ jobs:
180167
core.exportVariable('MACOSX_DEPLOYMENT_TARGET', target);
181168
core.exportVariable('PKG_ARCH', arch);
182169
183-
- name: Export version
184-
shell: python
185-
run: |
186-
import json
187-
if (input_version := "${{ inputs.release-version }}"):
188-
result = input_version
189-
else:
190-
with open("luxcore.json") as in_file:
191-
default_version = json.load(in_file)["DefaultVersion"]
192-
result = ".".join(default_version[i] for i in ("major", "minor", "patch"))
193-
if (prerelease := default_version["prerelease"]):
194-
result = f"{result}-{prerelease}"
195-
196-
print(f"Version: {result}")
197-
198-
with open("SKVERSION", "w+") as out_file:
199-
out_file.write(result)
200-
201-
- name: Output version
202-
id: output-version
203-
shell: bash
170+
- name: Build (Windows)
171+
if: runner.os == 'Windows'
172+
shell: cmd
173+
env:
174+
CONAN_HOME: ${{ github.workspace }}\.conan2
204175
run: |
205-
_version=$(cat SKVERSION)
206-
echo "version=${_version}" >> "$GITHUB_OUTPUT"
176+
pip install conan && make deps && make luxcore && make luxcoreui && make luxcoreconsole
207177
208-
- name: Build (Windows/MacOS)
209-
if: ${{ ! runner.os == 'Linux' }}
210-
shell: bash -el {0}
178+
- name: Build (MacOS)
179+
if: runner.os == 'macOS'
180+
shell: bash
211181
run: |
212182
pip install conan
213183
make deps
214-
make
215-
make package
184+
make luxcore
185+
make luxcoreui
186+
make luxcoreconsole
216187
217188
# Build for Linux is containerized in manylinux_2_28_x86_64
218189
- name: Build (Linux)
219190
if: runner.os == 'Linux'
220191
shell: bash
221192
env:
193+
CONTAINER: manylinux
222194
# COMMAND contains code that'll be executed in container
223195
COMMAND: |
224196
# Set Python
@@ -228,9 +200,6 @@ jobs:
228200
python -m pip install conan
229201
230202
# Install toolchain (gcc, ccache...)
231-
#dnf install -y epel-release
232-
#dnf install -y almalinux-release-devel
233-
#dnf install -y perl-IPC-Cmd perl-Digest-SHA
234203
CC=/opt/rh/gcc-toolset-14/root/usr/bin/gcc
235204
CXX=/opt/rh/gcc-toolset-14/root/usr/bin/g++
236205
export CMAKE_C_COMPILER_LAUNCHER=ccache
@@ -262,9 +231,9 @@ jobs:
262231
263232
# Build
264233
make deps
234+
make luxcore
265235
make luxcoreui
266236
make luxcoreconsole
267-
make package
268237
269238
# Re-inspect ccache
270239
echo "ccache results:"
@@ -273,11 +242,10 @@ jobs:
273242
# run contains code that'll be executed on host side
274243
run: |
275244
# Clean (remove container if it exists)
276-
CONTAINER=manylinux
277245
CONTAINER_LIST=$(docker container ps -a)
278-
if [[ ${CONTAINER_LIST} == *${CONTAINER}* ]]; then
279-
echo "Removing existing container '${CONTAINER}'"
280-
docker rm --force ${CONTAINER}
246+
if [[ ${CONTAINER_LIST} == *${{ env.CONTAINER }}* ]]; then
247+
echo "Removing existing container '${{ env.CONTAINER }}'"
248+
docker rm --force ${{ env.CONTAINER }}
281249
fi
282250
283251
# Start
@@ -286,44 +254,59 @@ jobs:
286254
echo ""
287255
docker create \
288256
-t \
289-
--name ${CONTAINER} \
257+
--name ${{ env.CONTAINER }} \
290258
quay.io/pypa/manylinux_2_28_x86_64
291-
docker start ${CONTAINER}
292-
docker exec ${CONTAINER} env
259+
docker start ${{ env.CONTAINER }}
260+
docker exec ${{ env.CONTAINER }} env
293261
294262
# Copy source tree
295-
docker exec ${CONTAINER} sh -c "echo Copying source tree"
296-
docker cp ${{ github.workspace }} ${CONTAINER}:/project
263+
docker exec ${{ env.CONTAINER }} sh -c "echo Copying source tree"
264+
docker cp ${{ github.workspace }} ${{ env.CONTAINER }}:/project
297265
298266
# Copy ccache
299267
echo "Copying ${{ env.CCACHE_DIR }} to container"
300-
docker cp ${{ env.CCACHE_DIR }}/. ${CONTAINER}:/root/.ccache
268+
docker cp ${{ env.CCACHE_DIR }}/. ${{ env.CONTAINER }}:/root/.ccache
301269
302270
# Execute COMMAND in container
303-
docker exec --workdir=/project ${CONTAINER} sh -c '${{ env.COMMAND }}'
271+
docker exec --workdir=/project ${{ env.CONTAINER }} sh -c '${{ env.COMMAND }}'
304272
305273
# Copy ccache back
306-
docker cp ${CONTAINER}:/root/.ccache/. ${{ env.CCACHE_DIR }}
274+
docker cp ${{ env.CONTAINER }}:/root/.ccache/. ${{ env.CCACHE_DIR }}
307275
308276
# Get artifact
309277
mkdir -p ${{ github.workspace }}/out/build
310-
docker cp ${CONTAINER}:/project/out ${{ github.workspace }}
278+
docker cp ${{ env.CONTAINER }}:/project/out ${{ github.workspace }}
311279
312280
# Stop container
313-
docker stop ${CONTAINER}
281+
docker stop ${{ env.CONTAINER }}
282+
283+
# Remove superfluous files (hack)
284+
rm ${{ github.workspace }}/out/install/Release/lib/libnvrtc*.alt.*
314285
315286
#- name: Setup tmate session (debug)
316287
#if: ${{ failure() }}
317288
#uses: mxschmitt/action-tmate@v3
318289

290+
- name: Install 7zip (act)
291+
if: ${{ env.ACT }}
292+
shell: bash
293+
run: |
294+
apt install -y p7zip-full
295+
296+
- name: Bundle artifacts
297+
run: |
298+
7z a LuxCore.7z ${{ github.workspace }}/out/install/Release
299+
319300
# Upload artifacts
320301
- uses: actions/upload-artifact@v4
321302
id: upload
322303
with:
323-
path: ${{ github.workspace }}/out/build/LuxCore-*.zip
304+
name: LuxCore-${{ runner.os }}-${{ runner.arch }}
305+
path: ${{ github.workspace }}/LuxCore.7z
306+
#path: ${{ github.workspace }}/out/install/Release
324307

325308
attest-samples:
326-
needs: [build-wheels]
309+
needs: [build-samples]
327310
runs-on: ubuntu-latest
328311
permissions:
329312
attestations: write

.github/workflows/wheel-builder.yml

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
# SPDX-FileCopyrightText: 2024 Howetuft
1+
# SPDX-FileCopyrightText: 2024-2025 Authors (see AUTHORS.txt)
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
# This action is the 1st part of a larger toolchain. You will find the other
6-
# components in LuxCoreRender/LuxCoreWheels repository
7-
85

96
name: LuxCore Python Wheels Builder
107

118
on:
129
workflow_dispatch:
10+
inputs:
11+
build-type:
12+
description: 'Build type'
13+
required: true
14+
default: 'Release'
15+
type: choice
16+
options:
17+
- Release
18+
- Debug
1319
workflow_call:
1420
inputs:
1521
repository:
@@ -25,6 +31,11 @@ on:
2531
version:
2632
description: 'The version to build - must comply to semver, or blank for default'
2733
type: string
34+
build-type:
35+
description: 'Build type'
36+
required: true
37+
default: 'Release'
38+
type: string
2839
outputs:
2940
commit:
3041
description: "The commit that has been checked out"
@@ -58,7 +69,7 @@ jobs:
5869
#os: [macos-13]
5970
env:
6071
# Reminder: report all variables here to CIBW_ENVIRONMENT_PASS_LINUX
61-
BUILD_TYPE: Release
72+
BUILD_TYPE: ${{ github.event.inputs.build-type || 'Release' }}
6273
CXX_VERSION: 20
6374
GCC_VERSION: 14
6475
GLIBC_VERSION: 2_28
@@ -124,7 +135,7 @@ jobs:
124135
'cache-variant': String.raw`ccache`,
125136
'CMAKE_CXX_COMPILER_LAUNCHER': String.raw`ccache`,
126137
'CMAKE_C_COMPILER_LAUNCHER': String.raw`ccache`,
127-
'CCACHE_CONFIGPATH': String.raw`${workspace}/ccache.conf`,
138+
'CCACHE_CONFIGPATH': String.raw`${workspace}/build-helpers/ccache.conf`,
128139
'CCACHE_DIR': String.raw`${workspace}/.ccache`,
129140
'CCACHE_DEBUGDIR': String.raw`${workspace}/ccache-debug`,
130141
'CCACHE_LOGFILE': String.raw`${workspace}/ccache.log`
@@ -168,7 +179,7 @@ jobs:
168179
echo "AR=${_T}/usr/bin/ar" >> $GITHUB_ENV
169180
echo "RANLIB=${_T}/usr/bin/ranlib" >> $GITHUB_ENV
170181
171-
- name: Set MacOS deployment target
182+
- name: Set MacOS deployment target and other set-ups
172183
if: runner.os == 'macOS'
173184
uses: actions/github-script@v7
174185
with:
@@ -188,6 +199,18 @@ jobs:
188199
core.exportVariable('MACOSX_DEPLOYMENT_TARGET', target);
189200
core.exportVariable('PKG_ARCH', arch);
190201
202+
- name: Prepare MacOS
203+
if: runner.os == 'macOS'
204+
shell: bash
205+
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
212+
213+
191214
# TODO: The following block is an ugly hack but, at the moment (2025-02-25),
192215
# scikit-build-core lacks a preset parameter, so this is the only way
193216
# I found to pass a calculated environment var to CMake build step
@@ -208,10 +231,12 @@ jobs:
208231
shell: python
209232
run: |
210233
import json
234+
from pathlib import Path
211235
if (input_version := "${{ inputs.release-version }}"):
212236
result = input_version
213237
else:
214-
with open("luxcore.json") as in_file:
238+
build_settings_file = Path("build-helpers", "build-settings.json")
239+
with open(build_settings_file) as in_file:
215240
default_version = json.load(in_file)["DefaultVersion"]
216241
result = ".".join(default_version[i] for i in ("major", "minor", "patch"))
217242
if (prerelease := default_version["prerelease"]):
@@ -241,9 +266,10 @@ jobs:
241266
CIBW_ARCHS: auto64
242267
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_${{ env.GLIBC_VERSION }}_x86_64
243268
CIBW_ENVIRONMENT: >
244-
SKBUILD_CMAKE_ARGS='--preset ${{ env.CONAN_PRESET }};-G Ninja;--log-level=VERBOSE;-DLUXCORE_VERSION=${{ steps.output-version.outputs.version }}'
269+
SKBUILD_CMAKE_ARGS='--preset conan-default;--log-level=VERBOSE;-DLUXCORE_VERSION=${{ steps.output-version.outputs.version }};-G Ninja Multi-Config'
245270
SKBUILD_CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
246-
LUX_GENERATOR='Ninja'
271+
GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
272+
LUX_BUILD_TYPE=${{ env.BUILD_TYPE }}
247273
CIBW_ENVIRONMENT_PASS_LINUX: |
248274
CC
249275
CXX
@@ -268,14 +294,25 @@ jobs:
268294
dnf install -y epel-release
269295
dnf install -y almalinux-release-devel
270296
dnf install -y ccache
271-
dnf install -y sudo # for gtk3...
272297
dnf install -y perl-IPC-Cmd perl-Digest-SHA
273298
274-
# Manylinux_2_34 compatibility
299+
# Install gh (via conda)
300+
dnf install -y wget
301+
mkdir -p miniconda3
302+
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda3/miniconda.sh
303+
bash miniconda3/miniconda.sh -b -u -p miniconda3
304+
rm miniconda3/miniconda.sh
305+
source miniconda3/bin/activate
306+
conda init --all
307+
conda install gh --channel conda-forge -y
308+
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
309+
310+
# Manylinux_2_34 compatibility (for future use)
275311
if [[ ${{ env.GLIBC_VERSION }} != 2_28 ]]; then
276312
dnf install -y perl-FindBin perl-lib
277313
fi
278314
315+
# Install dependencies
279316
pip install conan && make deps
280317
281318
CIBW_BEFORE_ALL_MACOS: |
@@ -302,7 +339,7 @@ jobs:
302339
{wheel}
303340
304341
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: |
305-
bash.exe ${{ env.WORKSPACE }}/scripts/repair_wheel_windows.sh '{wheel}' '{dest_dir}' '%VCToolsRedistDir%%Platform%' '${{ env.WORKSPACE }}'
342+
bash.exe ${{ env.WORKSPACE }}/build-helpers/wheels/repair_wheel_windows.sh '{wheel}' '{dest_dir}' '%VCToolsRedistDir%%Platform%' '${{ env.WORKSPACE }}'
306343
CIBW_REPAIR_WHEEL_COMMAND_MACOS: |
307344
cp {wheel} ${{ env.WORKSPACE }}
308345
paths=$(find ${{ env.WORKSPACE }} -type d -wholename "*/lib" -print0 | xargs -0 realpath | tr "\n" ":")
@@ -337,9 +374,6 @@ jobs:
337374
path: conan-cache
338375
key: deps-${{ matrix.os }}-${{ matrix.python-minor}}-${{ hashFiles('**/conan-cache') }}
339376

340-
#- name: Setup tmate session
341-
#uses: mxschmitt/action-tmate@v3
342-
343377
#- name: Setup tmate session (debug)
344378
#if: ${{ failure() }}
345379
#uses: mxschmitt/action-tmate@v3

.github/workflows/wheel-publisher.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ on:
1212
workflow_dispatch:
1313
inputs:
1414
release-tag:
15-
description: "Tag of the release to publish"
15+
description: "Version of the release to publish (major.minor.patch[-rev])"
1616
required: True
17-
default: v0.0.1
17+
default: 0.0.1
1818
type: string
1919
test:
2020
description: "Publish on Pypi test"
@@ -43,7 +43,7 @@ jobs:
4343
run: |
4444
# Warning: Target release must not be in 'draft' status,
4545
# otherwise gh release won't find it
46-
gh release download ${{ inputs.release-tag}} -D tmp -R LuxCoreRender/LuxCoreWheels
46+
gh release download wheels-v${{ inputs.release-tag}} -D tmp -R LuxCoreRender/LuxCore
4747
mkdir dist
4848
for d in tmp/*.zip ; do
4949
echo "unzip ${d}"

0 commit comments

Comments
 (0)