@@ -65,11 +65,12 @@ jobs:
65
65
66
66
- uses : dlang-community/setup-dlang@v1
67
67
with :
68
- compiler : ldc-1.33.0
68
+ compiler : ldc-latest
69
69
70
70
- name : Set-up macOS cross-compilation
71
71
run : |
72
72
mkdir -p $HOME/.ldc/
73
+ LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
73
74
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
74
75
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
75
76
cat << EOF | tee $HOME/.ldc/ldc2.conf
84
85
"-Xcc=-isysroot",
85
86
"-Xcc=$HOME/MacOSX11.0.sdk",
86
87
"-Xcc=-F",
87
- "-Xcc=$HOME/ldc2-1.33.0 -osx-x86_64/lib",
88
+ "-Xcc=$HOME/ldc2-$LDC_VERSION -osx-x86_64/lib",
88
89
"-Xcc=-mmacosx-version-min=12.6",
89
90
"-L=-platform_version",
90
91
"-L=macos",
@@ -94,25 +95,26 @@ jobs:
94
95
];
95
96
// default switches appended after all explicit command-line switches
96
97
post-switches = [
97
- "-I$HOME/ldc2-1.33.0 -osx-x86_64/import",
98
+ "-I$HOME/ldc2-$LDC_VERSION -osx-x86_64/import",
98
99
];
99
100
// default directories to be searched for libraries when linking
100
101
lib-dirs = [
101
- "$HOME/ldc2-1.33.0 -osx-x86_64/lib",
102
+ "$HOME/ldc2-$LDC_VERSION -osx-x86_64/lib",
102
103
];
103
104
};
104
105
EOF
105
106
mkdir $HOME/ldc-macos
106
- curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0 /ldc2-1.33.0 -osx-x86_64.tar.xz
107
- tar -xf ./ldc2-1.33.0 -osx-x86_64.tar.xz -C $HOME
107
+ curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION /ldc2-$LDC_VERSION -osx-x86_64.tar.xz
108
+ tar -xf ./ldc2-$LDC_VERSION -osx-x86_64.tar.xz -C $HOME
108
109
brew fetch --force --bottle-tag=monterey llvm@16
109
110
brew install $(brew --cache --bottle-tag=monterey llvm@16)
110
- cp /home/linuxbrew/.linuxbrew/Cellar/llvm@16/16.0.6/lib/c++/* $HOME/ldc2-1.33.0 -osx-x86_64/lib
111
+ cp /home/linuxbrew/.linuxbrew/Cellar/llvm@16/16.0.6/lib/c++/* $HOME/ldc2-$LDC_VERSION -osx-x86_64/lib
111
112
rm -rf /home/linuxbrew/.linuxbrew
112
113
113
114
- name : Set-up Qt for cross-compilation
114
115
run :
115
- cp -r $Qt5_DIR/lib/* $HOME/ldc2-1.33.0-osx-x86_64/lib
116
+ LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
117
+ cp -r $Qt5_DIR/lib/* $HOME/ldc2-$LDC_VERSION-osx-x86_64/lib
116
118
117
119
- name : Install dependencies
118
120
run : sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld-15
@@ -151,7 +153,7 @@ jobs:
151
153
152
154
- uses : dlang-community/setup-dlang@v1
153
155
with :
154
- compiler : ldc-1.33.0
156
+ compiler : ldc-latest
155
157
156
158
- name : Set up Homebrew
157
159
id : set-up-homebrew
@@ -170,6 +172,7 @@ jobs:
170
172
- name : Set-up macOS cross-compilation
171
173
run : |
172
174
mkdir -p $HOME/.ldc/
175
+ LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
173
176
curl -LO https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz
174
177
tar -xf ./MacOSX11.0.sdk.tar.xz -C $HOME
175
178
cat << EOF | tee $HOME/.ldc/ldc2.conf
@@ -184,7 +187,7 @@ jobs:
184
187
"-Xcc=-isysroot",
185
188
"-Xcc=$HOME/MacOSX11.0.sdk",
186
189
"-Xcc=-F",
187
- "-Xcc=$HOME/ldc2-1.33.0 -osx-arm64/lib",
190
+ "-Xcc=$HOME/ldc2-$LDC_VERSION -osx-arm64/lib",
188
191
"-Xcc=-mmacosx-version-min=12.6",
189
192
"-L=-platform_version",
190
193
"-L=macos",
@@ -194,25 +197,26 @@ jobs:
194
197
];
195
198
// default switches appended after all explicit command-line switches
196
199
post-switches = [
197
- "-I$HOME/ldc2-1.33.0 -osx-arm64/import",
200
+ "-I$HOME/ldc2-$LDC_VERSION -osx-arm64/import",
198
201
];
199
202
// default directories to be searched for libraries when linking
200
203
lib-dirs = [
201
- "$HOME/ldc2-1.33.0 -osx-arm64/lib",
204
+ "$HOME/ldc2-$LDC_VERSION -osx-arm64/lib",
202
205
];
203
206
};
204
207
EOF
205
208
mkdir $HOME/ldc-macos
206
- curl -LO https://github.com/ldc-developers/ldc/releases/download/v1.33.0 /ldc2-1.33.0 -osx-arm64.tar.xz
207
- tar -xf ./ldc2-1.33.0 -osx-arm64.tar.xz -C $HOME
209
+ curl -LO https://github.com/ldc-developers/ldc/releases/download/v$LDC_VERSION /ldc2-$LDC_VERSION -osx-arm64.tar.xz
210
+ tar -xf ./ldc2-$LDC_VERSION -osx-arm64.tar.xz -C $HOME
208
211
brew fetch --force --bottle-tag=arm64_monterey llvm@16
209
212
brew install $(brew --cache --bottle-tag=arm64_monterey llvm@16)
210
- cp /home/linuxbrew/.linuxbrew/Cellar/llvm@16/16.0.6/lib/c++/* $HOME/ldc2-1.33.0 -osx-arm64/lib
213
+ cp /home/linuxbrew/.linuxbrew/Cellar/llvm@16/16.0.6/lib/c++/* $HOME/ldc2-$LDC_VERSION -osx-arm64/lib
211
214
rm -rf /home/linuxbrew/.linuxbrew
212
215
213
216
- name : Set-up Qt for cross-compilation
214
217
run :
215
- cp -r $Qt5_DIR/lib/* $HOME/ldc2-1.33.0-osx-arm64/lib
218
+ LDC_VERSION=$(ldc2 --version | head -n 1 | grep -oE "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*")
219
+ cp -r $Qt5_DIR/lib/* $HOME/ldc2-$LDC_VERSION-osx-arm64/lib
216
220
217
221
- name : Install dependencies
218
222
run : sudo apt-get update && sudo apt-get install -y libz-dev elfutils clang lld-15
0 commit comments