Combine macOS builds into universal binary
This commit is contained in:
parent
ce4e9bf92a
commit
3a2a11b2b0
@ -47,15 +47,15 @@ macos/amd64:
|
||||
- amd64
|
||||
before_script: []
|
||||
script:
|
||||
- go build -o gomuks
|
||||
- install_name_tool -change /usr/local/opt/libolm/lib/libolm.3.dylib @rpath/libolm.3 gomuks
|
||||
- install_name_tool -add_rpath @executable_path gomuks
|
||||
- install_name_tool -add_rpath /usr/local/opt/libolm/lib gomuks
|
||||
- cp /usr/local/opt/libolm/lib/libolm.3.dylib .
|
||||
- mkdir gomuks-macos-amd64
|
||||
- go build -o gomuks-macos-amd64/gomuks
|
||||
- install_name_tool -change /usr/local/opt/libolm/lib/libolm.3.dylib @rpath/libolm.3.dylib gomuks-macos-amd64/gomuks
|
||||
- install_name_tool -add_rpath @executable_path gomuks-macos-amd64/gomuks
|
||||
- install_name_tool -add_rpath /usr/local/opt/libolm/lib gomuks-macos-amd64/gomuks
|
||||
- cp /usr/local/opt/libolm/lib/libolm.3.dylib gomuks-macos-amd64/
|
||||
artifacts:
|
||||
paths:
|
||||
- gomuks
|
||||
- libolm.3.dylib
|
||||
- gomuks-macos-amd64
|
||||
|
||||
macos/arm64:
|
||||
stage: build
|
||||
@ -67,16 +67,35 @@ macos/arm64:
|
||||
- export CPATH=/opt/homebrew/include
|
||||
- export PATH=/opt/homebrew/bin:$PATH
|
||||
script:
|
||||
- go build -o gomuks
|
||||
- install_name_tool -change /opt/homebrew/opt/libolm/lib/libolm.3.dylib @rpath/libolm.3 gomuks
|
||||
- install_name_tool -add_rpath @executable_path gomuks
|
||||
- install_name_tool -add_rpath /opt/homebrew/opt/libolm/lib gomuks
|
||||
- install_name_tool -add_rpath /usr/local/opt/libolm/lib gomuks
|
||||
- cp /opt/homebrew/opt/libolm/lib/libolm.3.dylib .
|
||||
- mkdir gomuks-macos-arm64
|
||||
- go build -o gomuks-macos-arm64/gomuks
|
||||
- install_name_tool -change /opt/homebrew/opt/libolm/lib/libolm.3.dylib @rpath/libolm.3.dylib gomuks-macos-arm64/gomuks
|
||||
- install_name_tool -add_rpath @executable_path gomuks-macos-arm64/gomuks
|
||||
- install_name_tool -add_rpath /opt/homebrew/opt/libolm/lib gomuks-macos-arm64/gomuks
|
||||
- install_name_tool -add_rpath /usr/local/opt/libolm/lib gomuks-macos-arm64/gomuks
|
||||
- cp /opt/homebrew/opt/libolm/lib/libolm.3.dylib gomuks-macos-arm64/
|
||||
artifacts:
|
||||
paths:
|
||||
- gomuks
|
||||
- gomuks-macos-arm64
|
||||
|
||||
macos/universal:
|
||||
stage: package
|
||||
dependencies:
|
||||
- macos/amd64
|
||||
- macos/arm64
|
||||
needs:
|
||||
- macos/amd64
|
||||
- macos/arm64
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
script:
|
||||
- lipo -create -output libolm.3.dylib gomuks-macos-arm64/libolm.3.dylib gomuks-macos-amd64/libolm.3.dylib
|
||||
- lipo -create -output gomuks gomuks-macos-arm64/gomuks gomuks-macos-amd64/gomuks
|
||||
artifacts:
|
||||
name: gomuks-macos-universal
|
||||
paths:
|
||||
- libolm.3.dylib
|
||||
- gomuks
|
||||
|
||||
debian:
|
||||
image: debian
|
||||
|
Loading…
Reference in New Issue
Block a user