|
31 | 31 | fail-fast: false
|
32 | 32 | matrix:
|
33 | 33 | # macos-12 is Intel runner, macos-14 is Apple Silicon
|
| 34 | + # https://github.com/actions/runner-images |
34 | 35 | os: [macos-12, macos-14]
|
35 | 36 | CONFIG: [ON, OFF]
|
36 | 37 | env:
|
@@ -59,25 +60,32 @@ jobs:
|
59 | 60 | - name: Set up Python version
|
60 | 61 | uses: actions/setup-python@v4
|
61 | 62 | with:
|
62 |
| - python-version: ${{ matrix.os == 'macos-14' && '3.10' || '3.8' }} |
| 63 | + python-version: '3.11' |
63 | 64 |
|
64 | 65 | - name: Install dependencies
|
65 | 66 | run: |
|
66 | 67 | 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. |
69 | 83 | # https://github.com/microsoft/LightGBM/issues/4229
|
70 | 84 | if [[ ${{ runner.arch}} == "X64" ]]; then
|
71 | 85 | brew unlink libomp
|
72 | 86 | # x64 catalina (10.15) bottle
|
73 | 87 | export LIBOMP_BOTTLE_HASH=45a5aa653bd45bd5ff5858580b1a4670c4b5a51ea29d68d45a53f72f56010e05
|
74 | 88 | 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 |
| -
|
81 | 89 | # arm64 big_sur (11.0) bottle
|
82 | 90 | export LIBOMP_BOTTLE_HASH=f87f7841eb8b72650fa771af39642361aec371ea1a1f94f081ecc0e8168a0e75
|
83 | 91 | fi
|
@@ -146,6 +154,7 @@ jobs:
|
146 | 154 | # https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
|
147 | 155 | matrix:
|
148 | 156 | # macos-12 is Intel runner, macos-14 is Apple Silicon
|
| 157 | + # https://github.com/actions/runner-images |
149 | 158 | os: [macos-12, macos-14]
|
150 | 159 | python_version: ['3.8', '3.9', '3.10', '3.11']
|
151 | 160 | is_main:
|
@@ -205,18 +214,19 @@ jobs:
|
205 | 214 | cmake --version
|
206 | 215 | source util/ci_utils.sh
|
207 | 216 | 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 | +
|
208 | 224 | # Install libomp 11.1.0. See comment above.
|
209 | 225 | if [[ ${{ runner.arch}} == "X64" ]]; then
|
210 | 226 | brew unlink libomp
|
211 | 227 | # x64 catalina (10.15) bottle
|
212 | 228 | export LIBOMP_BOTTLE_HASH=45a5aa653bd45bd5ff5858580b1a4670c4b5a51ea29d68d45a53f72f56010e05
|
213 | 229 | 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 |
| -
|
220 | 230 | # arm64 big_sur (11.0) bottle
|
221 | 231 | export LIBOMP_BOTTLE_HASH=f87f7841eb8b72650fa771af39642361aec371ea1a1f94f081ecc0e8168a0e75
|
222 | 232 | fi
|
|
0 commit comments