Skip to content

Commit 490e391

Browse files
committed
try to fix mac more
1 parent 9776ed6 commit 490e391

File tree

2 files changed

+21
-27
lines changed

2 files changed

+21
-27
lines changed

.github/actions/1-setup/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,12 @@ runs:
121121
run: |
122122
set -euxo pipefail
123123
python3 --version
124-
python3 -m pip install --user setuptools wheel
125-
python3 -m pip install --user lit
124+
if [[ '${{ runner.os }}-${{ inputs.arch }}' == 'macOS-arm64' ]]; then
125+
brew install lit python-setuptools
126+
else
127+
python3 -m pip install --user setuptools wheel
128+
python3 -m pip install --user lit
129+
fi
126130
python3 -c "import lit.main; lit.main.main();" --version . | head -n 1
127131
128132
# the druntime tests require GNU make

.github/workflows/main.yml

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,18 @@ jobs:
5050
-DD_COMPILER_FLAGS="-gcc=/usr/bin/c++ -O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
5151
-DEXTRA_CXXFLAGS=-flto=full
5252
with_pgo: false
53-
53+
- job_name: macOS arm64
54+
os: macos-15
55+
arch: arm64
56+
bootstrap_cmake_flags: >-
57+
-DBUILD_LTO_LIBS=ON
58+
-DD_COMPILER_FLAGS=-gcc=/usr/bin/c++
59+
extra_cmake_flags: >-
60+
-DBUILD_LTO_LIBS=ON
61+
-DD_COMPILER_FLAGS="-gcc=/usr/bin/c++ -O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
62+
-DEXTRA_CXXFLAGS=-flto=full
63+
with_pgo: false
64+
llvm_version: 17.0.6
5465
- job_name: Windows x64
5566
os: windows-2022
5667
arch: x64
@@ -66,7 +77,7 @@ jobs:
6677
runs-on: ${{ matrix.os }}
6778
timeout-minutes: 150
6879
env:
69-
MACOSX_DEPLOYMENT_TARGET: 10.12
80+
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.arch == 'arm64' && '11.0' || '10.12' }}
7081
steps:
7182
- uses: actions/checkout@v3
7283
with:
@@ -76,7 +87,7 @@ jobs:
7687
uses: ./.github/actions/1-setup
7788
with:
7889
clang_version: ${{ runner.os == 'Windows' && '16.0.6' || env.CLANG_VERSION }}
79-
llvm_version: ${{ env.LLVM_VERSION }}
90+
llvm_version: ${{ matrix.llvm_version || env.LLVM_VERSION }}
8091
arch: ${{ matrix.arch }}
8192
- name: Build bootstrap LDC
8293
if: matrix.os != 'macos-15'
@@ -129,18 +140,6 @@ jobs:
129140
matrix:
130141
include:
131142

132-
- job_name: macOS arm64
133-
host_os: macos-15
134-
os: osx
135-
arch: arm64
136-
bootstrap_cmake_flags: -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++
137-
# see native macOS job comment for extra flags (https://github.com/ldc-developers/ldc/issues/4462)
138-
extra_cmake_flags: >-
139-
-DBUILD_LTO_LIBS=ON
140-
-DD_COMPILER_FLAGS="-O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w"
141-
-DEXTRA_CXXFLAGS=-flto=full
142-
with_pgo: false
143-
144143
- job_name: Android armv7a
145144
host_os: ubuntu-20.04
146145
os: android
@@ -160,8 +159,6 @@ jobs:
160159
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
161160
runs-on: ${{ matrix.host_os }}
162161
timeout-minutes: 60
163-
env:
164-
MACOSX_DEPLOYMENT_TARGET: 11.0
165162
steps:
166163
- uses: actions/checkout@v4
167164
with:
@@ -195,11 +192,6 @@ jobs:
195192
uses: ./.github/actions/5-install
196193
with:
197194
cross_compiling: true
198-
- name: 'macOS: Cross-compile iOS libraries, copy to install dir & extend ldc2.conf'
199-
if: matrix.os == 'osx'
200-
uses: ./.github/actions/5a-ios
201-
with:
202-
arch: ${{ matrix.arch }}
203195
- name: 'Android: Cross-compile ${{ matrix.android_x86_arch }} libraries & copy to install dir'
204196
if: matrix.os == 'android'
205197
uses: ./.github/actions/5a-android-x86
@@ -217,9 +209,7 @@ jobs:
217209
name: macOS universal
218210
runs-on: macos-latest
219211
timeout-minutes: 30
220-
needs:
221-
- build-native
222-
- build-cross
212+
needs: build-native
223213
steps:
224214
- uses: actions/checkout@v4
225215
- name: Merge x86_64 & arm64 packages to universal one

0 commit comments

Comments
 (0)