@@ -205,4 +205,94 @@ jobs:
205
205
with :
206
206
name : win-${{matrix.artifact.name}}-x86_64
207
207
path : artifacts
208
- # End build Windows installers
208
+ # End build Windows installers
209
+
210
+ # Build Mac OSX installers & upload artifacts
211
+ mac_artifacts :
212
+ runs-on : macos-latest
213
+ needs : prereqs
214
+ env :
215
+ # `gettext` is keg-only
216
+ LDFLAGS : -L/usr/local/opt/gettext/lib
217
+ CFLAGS : -I/usr/local/opt/gettext/include
218
+ # Link with cURL
219
+ CURL_LDFLAGS : -lcurl
220
+ # To make use of the catalogs...
221
+ XML_CATALOG_FILES : /usr/local/etc/xml/catalog
222
+ # Enable a bit stricter compile flags
223
+ DEVELOPER : 1
224
+ # For the osx-installer build
225
+ OSX_VERSION : 10.6
226
+ V : 1
227
+ steps :
228
+ - name : Install git dependencies
229
+ run : |
230
+ set -x
231
+ brew install -v automake asciidoc xmlto
232
+ brew link --force gettext
233
+ - name : Clone git
234
+ uses : actions/checkout@v2
235
+ with :
236
+ path : ' git'
237
+ - name : Build GIT-VERSION-FILE and .tar.gz files
238
+ run : |
239
+ set -x
240
+ PATH=/usr/local/bin:$PATH
241
+
242
+ # Write to "version" file to force match with trigger payload version
243
+ echo "${{ needs.prereqs.outputs.tag_version }}" >>git/version
244
+ make -C git -j$(sysctl -n hw.physicalcpu) GIT-VERSION-FILE dist dist-doc
245
+ - name : Clone installer repository
246
+ uses : actions/checkout@v2
247
+ with :
248
+ path : ' git_osx_installer'
249
+ repository : ' derrickstolee/git_osx_installer'
250
+ - name : Bundle .dmg
251
+ run : |
252
+ die () {
253
+ echo "$*" >&2
254
+ exit 1
255
+ }
256
+
257
+ VERSION="${{ needs.prereqs.outputs.tag_version }}"
258
+ export VERSION
259
+
260
+ dir=git_osx_installer/git-$VERSION
261
+ test ! -e $dir ||
262
+ rm $dir ||
263
+ die "Could not remove $dir"
264
+ ln -s .. $dir
265
+
266
+ mkdir -p git_osx_installer/build &&
267
+ cp git/git-$VERSION.tar.gz git/git-manpages-$VERSION.tar.gz git_osx_installer/build/ ||
268
+ die "Could not copy .tar.gz files"
269
+
270
+ # drop the -isysroot `GIT_SDK` hack
271
+ sed -i .bak -e 's/ -isysroot .(SDK_PATH)//' git_osx_installer/Makefile || die "Could not drop the -isysroot hack"
272
+
273
+ # make sure that .../usr/local/git/share/man/ exists
274
+ sed -i .bak -e 's/\(tar .*-C \)\(.*\/share\/man\)$/mkdir -p \2 \&\& &/' git_osx_installer/Makefile || die "Could not edit git_osx_installer/Makefile"
275
+ cat git_osx_installer/Makefile
276
+
277
+ make -C git_osx_installer vars
278
+
279
+ PATH=/usr/local/bin:/System/Library/Frameworks:$PATH \
280
+ make -C git_osx_installer \
281
+ OSX_VERSION=10.6 C_INCLUDE_PATH="$C_INCLUDE_PATH" V=1 \
282
+ build/intel-universal-snow-leopard/git-$VERSION/osx-built-keychain ||
283
+ die "Build failed"
284
+
285
+ PATH=/usr/local/bin:$PATH \
286
+ make -C git_osx_installer \
287
+ OSX_VERSION=10.6 C_INCLUDE_PATH="$C_INCLUDE_PATH" V=1 image ||
288
+ die "Build failed"
289
+
290
+ mkdir -p artifacts
291
+ mv git_osx_installer/*.dmg artifacts/
292
+ mv git_osx_installer/disk-image/*.pkg artifacts/
293
+ - name : Publish OSX installer
294
+ uses : actions/upload-artifact@v2
295
+ with :
296
+ name : osx-installer
297
+ path : artifacts
298
+ # End build Mac OSX installers
0 commit comments