Skip to content

Commit b7aed91

Browse files
committed
Update workflow
1 parent e48fc82 commit b7aed91

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

.github/workflows/macos.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
# macos-12 is Intel runner, macos-14 is Apple Silicon
34+
# https://github.com/actions/runner-images
3435
os: [macos-12, macos-14]
3536
CONFIG: [ON, OFF]
3637
env:
@@ -59,25 +60,32 @@ jobs:
5960
- name: Set up Python version
6061
uses: actions/setup-python@v4
6162
with:
62-
python-version: ${{ matrix.os == 'macos-14' && '3.10' || '3.8' }}
63+
python-version: '3.11'
6364

6465
- name: Install dependencies
6566
run: |
6667
brew install ccache pkg-config
67-
# Install libomp 11.1.0 from old brew bottle for catalina (10.15).
68-
# Directly installing the Ruby formula will install for the current OS
68+
69+
if [[ ${{ runner.arch}} == "ARM64" ]]; then
70+
# Fix gfortran not found issue
71+
ln -s $(which gfortran-13) /usr/local/bin/gfortran
72+
73+
# Default macos-14 image Xcode (version 15.0.1) linker causes build issues.
74+
# Newer Xcode versions work, but embree recommends Apple clang <= 14 on
75+
# arm64 to avoid possible "EXEC_BAD_INSTRUCTION" runtime exceptions:
76+
# https://github.com/embree/embree/releases/tag/v4.3.1
77+
sudo xcode-select -switch /Applications/Xcode_14.3.1.app
78+
fi
79+
80+
# Install libomp 11.1.0 from old brew bottle for x64 catalina (10.15)
81+
# / arm64 big sur (11.0). Directly installing the Ruby formula will
82+
# install for the current OS.
6983
# https://github.com/microsoft/LightGBM/issues/4229
7084
if [[ ${{ runner.arch}} == "X64" ]]; then
7185
brew unlink libomp
7286
# x64 catalina (10.15) bottle
7387
export LIBOMP_BOTTLE_HASH=45a5aa653bd45bd5ff5858580b1a4670c4b5a51ea29d68d45a53f72f56010e05
7488
else # ARM64
75-
# fix gfortran not found issue
76-
ln -s $(which gfortran-13) /usr/local/bin/gfortran
77-
78-
# default Xcode 15.0.1 linker causes build issues, embree recommends clang <= 14 for arm64
79-
sudo xcode-select -switch /Applications/Xcode_14.3.1.app
80-
8189
# arm64 big_sur (11.0) bottle
8290
export LIBOMP_BOTTLE_HASH=f87f7841eb8b72650fa771af39642361aec371ea1a1f94f081ecc0e8168a0e75
8391
fi
@@ -146,6 +154,7 @@ jobs:
146154
# https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
147155
matrix:
148156
# macos-12 is Intel runner, macos-14 is Apple Silicon
157+
# https://github.com/actions/runner-images
149158
os: [macos-12, macos-14]
150159
python_version: ['3.8', '3.9', '3.10', '3.11']
151160
is_main:
@@ -205,18 +214,19 @@ jobs:
205214
cmake --version
206215
source util/ci_utils.sh
207216
install_python_dependencies
217+
218+
# Fix macos-14 arm64 runner image issues, see comments in MacOS job.
219+
if [[ ${{ runner.arch}} == "ARM64" ]]; then
220+
ln -s $(which gfortran-13) /usr/local/bin/gfortran
221+
sudo xcode-select -switch /Applications/Xcode_14.3.1.app
222+
fi
223+
208224
# Install libomp 11.1.0. See comment above.
209225
if [[ ${{ runner.arch}} == "X64" ]]; then
210226
brew unlink libomp
211227
# x64 catalina (10.15) bottle
212228
export LIBOMP_BOTTLE_HASH=45a5aa653bd45bd5ff5858580b1a4670c4b5a51ea29d68d45a53f72f56010e05
213229
else # ARM64
214-
# fix gfortran not found issue
215-
ln -s $(which gfortran-13) /usr/local/bin/gfortran
216-
217-
# default Xcode 15.0.1 linker causes build issues, embree recommends clang <= 14 for arm64
218-
sudo xcode-select -switch /Applications/Xcode_14.3.1.app
219-
220230
# arm64 big_sur (11.0) bottle
221231
export LIBOMP_BOTTLE_HASH=f87f7841eb8b72650fa771af39642361aec371ea1a1f94f081ecc0e8168a0e75
222232
fi

cpp/tests/geometry/TriangleMesh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ TEST(TriangleMesh, CreateFromPointCloudPoisson) {
19191919
{44, 50, 43},
19201920
{32, 31, 50},
19211921
#if defined(__APPLE__) && defined(__arm64__)
1922-
// Unkown why these two triangles are different on Apple Silicon
1922+
// Apple Silicon consistently triangulates the vertices differently
19231923
{44, 45, 50},
19241924
{45, 32, 50},
19251925
#else

0 commit comments

Comments
 (0)