Skip to content

Commit f6d2d95

Browse files
committed
Switch to macos-15
1 parent cef691e commit f6d2d95

File tree

5 files changed

+71
-21
lines changed

5 files changed

+71
-21
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ jobs:
2828
strategy:
2929
fail-fast: False
3030
matrix:
31-
os: [ubuntu-latest, windows-latest, macos-15-intel, macos-15]
32-
#os: [macos-15-intel, macos-15]
31+
#os: [ubuntu-latest, windows-latest, macos-15-intel, macos-15]
32+
#os: [ubuntu-latest, macos-15-intel, macos-15]
33+
os: [macos-15]
3334
env:
3435
BUILD_TYPE: Release
3536
# SANITIZE: true # uncomment to sanitize
@@ -173,13 +174,45 @@ jobs:
173174
arch='x86_64';
174175
}
175176
else {
176-
target = '12.0';
177+
target = '15.0';
177178
arch='armv8';
178179
}
179180
core.exportVariable('MACOSX_DEPLOYMENT_TARGET', target);
180181
core.exportVariable('CMAKE_OSX_DEPLOYMENT_TARGET', target);
181182
core.exportVariable('PKG_ARCH', arch);
182183
184+
- name: Prepare MacOS (set build tools)
185+
if: runner.os == 'macOS'
186+
shell: bash
187+
run: |
188+
# We make conan believe we use apple-clang (see profiles), but
189+
# actually we use recent version of llvm, to get full compatibility
190+
# with C++20
191+
brew install llvm@20
192+
LLVM_PREFIX=$(brew --prefix llvm@20)
193+
echo "LLVM_PREFIX=${LLVM_PREFIX}" >> $GITHUB_ENV
194+
echo "CC=${LLVM_PREFIX}/bin/clang" >> $GITHUB_ENV
195+
echo "CXX=${LLVM_PREFIX}/bin/clang++" >> $GITHUB_ENV
196+
echo "AR=${LLVM_PREFIX}/bin/llvm-ar" >> $GITHUB_ENV
197+
echo "RANLIB=${LLVM_PREFIX}/bin/llvm-ranlib" >> $GITHUB_ENV
198+
echo "DYLD_LIBRARY_PATH=${LLVM_PREFIX}/lib:${DYLD_LIBRARY_PATH}" >> $GITHUB_ENV
199+
200+
brew install lld@20
201+
LLD_PREFIX=$(brew --prefix lld@20)
202+
echo "LLD_PREFIX=${LLD_PREFIX}" >> $GITHUB_ENV
203+
echo "LD=${LLD_PREFIX}/bin/ld.lld" >> $GITHUB_ENV
204+
echo "LDFLAGS=-L${LLD_PREFIX}/lib" >> $GITHUB_ENV
205+
echo "CXXFLAGS=-I${LLD_PREFIX}/include -fuse-ld=lld" >> $GITHUB_ENV
206+
echo "CFLAGS=-I${LLD_PREFIX}/include -fuse-ld=lld" >> $GITHUB_ENV
207+
208+
echo "PATH=${LLVM_PREFIX}/bin:${LLD_PREFIX}/bin:${PATH}" >> $GITHUB_ENV
209+
210+
brew install libomp
211+
echo "OpenMP_ROOT=$(brew --prefix libomp)" >> $GITHUB_ENV
212+
213+
brew install ispc
214+
brew install gsed
215+
183216
#***********************************#
184217
# Build steps (one per platform...) #
185218
#***********************************#
@@ -196,7 +229,6 @@ jobs:
196229
if: runner.os == 'macOS'
197230
shell: bash
198231
run: |
199-
brew install ispc
200232
bash ${{ env.WORKSPACE }}/run-conan.sh
201233
202234
- name: Build (Linux)
@@ -402,10 +434,10 @@ jobs:
402434
path: conan-cache
403435
key: deps-${{ matrix.os }}-${{ github.run_id }}
404436

405-
## For debugging
406-
#- name: Setup tmate session (debug)
407-
#if: ${{ failure() }}
408-
#uses: mxschmitt/action-tmate@v3
437+
# For debugging
438+
- name: Setup tmate session (debug)
439+
if: ${{ failure() }}
440+
uses: mxschmitt/action-tmate@v3
409441

410442
# Upload artifacts
411443
- uses: actions/upload-artifact@v4

conan-profiles/conan-profile-macOS-ARM64

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,33 @@ include(conan-profile-common)
22

33
[settings]
44
os=Macos
5+
# TODO
56
# 14.2 is required by opensubdiv for metal
6-
os.version=14.2
7+
#os.version=15.6
78
arch=armv8
8-
compiler=apple-clang
9-
compiler.version=15
9+
compiler=clang
10+
compiler.version=20
1011
compiler.cppstd={{ os.getenv("CXX_VERSION") }}
1112
compiler.libcxx=libc++
1213

14+
#TODO
15+
#compiler=apple-clang
16+
#compiler.version=16.0
17+
#compiler.cppstd={{ os.getenv("CXX_VERSION") }}
18+
#compiler.libcxx=libc++
19+
1320
[options]
1421
boost/*:without_stacktrace=True
1522
boost/*:without_locale=True
1623
minizip-ng/*:with_zlib=True
1724
minizip-ng/*:with_libcomp=False
1825
embree/*:shared=True
1926

20-
[buildenv]
21-
CXX=clang++
22-
CC=clang
27+
#[buildenv]
28+
#CXX=clang++
29+
#CC=clang
2330

2431
[conf]
25-
&:tools.build:cxxflags=["-O3"]
32+
&:tools.build:cxxflags+=["-O3"]
33+
tools.build:cxxflags+=["-fuse-ld=lld"]
34+
tools.build:cflags+=["-fuse-ld=lld"]

conan-profiles/conan-profile-macOS-X64

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ include(conan-profile-common)
22

33
[settings]
44
os=Macos
5-
os.version=10.15
5+
#os.version=15.6
66
arch=x86_64
77
compiler=apple-clang
8-
compiler.version=14.0
8+
compiler.version=16.0
99
compiler.cppstd={{ os.getenv("CXX_VERSION") }}
1010
compiler.libcxx=libc++
1111

@@ -21,9 +21,10 @@ openvdb/*:simd=AVX
2121
opensubdiv/*:with_metal=False
2222
embree/*:shared=True
2323

24-
[buildenv]
25-
CXX=clang++
26-
CC=clang
24+
# TODO
25+
#[buildenv]
26+
#CXX=clang++
27+
#CC=clang
2728

2829
[conf]
2930
&:tools.build:cxxflags+=["-ftree-vectorize", "-march=x86-64-v3", "-O3", "-mno-avx2"]

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class LuxCoreDeps(ConanFile):
4848
channel = "luxcore"
4949

5050
requires = [
51-
f"openvdb/{OPENVDB_VERSION}",
5251
f"embree/{EMBREE_VERSION}",
52+
f"openvdb/{OPENVDB_VERSION}",
5353
f"oidn/{OIDN_VERSION}@luxcore/luxcore",
5454
f"opensubdiv/{OPENSUBDIV_VERSION}",
5555
f"openimageio/{OIIO_VERSION}",

run-conan.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ git clean -df # cleans any untracked files/folders
4848
cd ..
4949
conan remote add mycenter ./conan-center-index
5050

51+
# Patch ocio (MacOS)
52+
if [[ "$RUNNER_OS" == "macOS" ]]; then
53+
gsed -i 's/self\.settings\.compiler\.libcxx == "libc++"/False/g' \
54+
conan-center-index/recipes/opencolorio/all/conanfile.py
55+
fi
56+
5157
# 2. Add local recipe repository (as a remote)
5258
conan remote add mylocal ./local-conan-recipes
5359
conan list -r mylocal
@@ -83,6 +89,8 @@ echo "::group::CIBW_BEFORE_BUILD: Install tool requirements"
8389
# We specify conancenter as a remote, thus allowing to use precompiled
8490
# binaries.
8591
# For pkgconf and meson, we have to manually target the right version
92+
# For b2, we need to build, otherwise we get the following error on Linux:
93+
# 'b2: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by b2)'
8694
build_deps=(b2/[*] cmake/[*] m4/[*] pkgconf/2.1.0 meson/1.2.2 yasm/[*])
8795
if [[ $RUNNER_OS == "Windows" ]]; then
8896
build_deps+=(msys2/[*])

0 commit comments

Comments
 (0)