-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: build darwin amd64/arm64 Docker images #200
feat: build darwin amd64/arm64 Docker images #200
Conversation
This pull request does not have a backport label. Could you fix it @kuisathaverat? 🙏
|
@@ -34,7 +34,7 @@ RUN tar -xzf /tmp/osxcross.tar.gz -C / \ | |||
|
|||
ENV PATH $PATH:$OSXCROSS_PATH/bin | |||
# Add osxcross libraries to the library PATH | |||
ENV LD_LIBRARY_PATH ${OSXCROSS_PATH}/lib:$LD_LIBRARY_PATH | |||
ENV LD_LIBRARY_PATH $OSXCROSS_PATH/lib:/lib:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
force the whole LD_LIBRARY_PATH
@@ -51,23 +51,35 @@ RUN \ | |||
|
|||
ENV PATH $PATH:$OSXCROSS_PATH/bin | |||
# Add osxcross libraries to the library PATH | |||
ENV LD_LIBRARY_PATH ${OSXCROSS_PATH}/lib:$LD_LIBRARY_PATH | |||
ENV LD_LIBRARY_PATH $OSXCROSS_PATH/lib:/lib:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
force the whole LD_LIBRARY_PATH
&& o64-clang helloWorld.c -o helloWorld.x86_64 \ | ||
&& file helloWorld.x86_64 \ | ||
&& file helloWorld.x86_64 | grep -c 'Mach-O 64-bit x86_64' | ||
|
||
{{- if or (eq .DEBIAN_VERSION "10") (eq .DEBIAN_VERSION "11")}} | ||
RUN cd / \ | ||
&& oa64-clang helloWorld.c -o helloWorld.arm64 \ | ||
&& file helloWorld.arm64 \ | ||
&& file helloWorld.arm64 | grep -c 'Mach-O 64-bit arm64' | ||
|
||
RUN cd / \ | ||
&& lipo -create -output helloWorld.universal helloWorld.x86_64 helloWorld.arm64 \ | ||
&& file helloWorld.universal | grep 'Mach-O universal binary' \ | ||
&& rm helloWorld.* | ||
{{- end }} | ||
|
||
# MacOSX10.14 SDK does not have 32bits compiler | ||
{{- if and (ne .DEBIAN_VERSION "10") (ne .DEBIAN_VERSION "11")}} | ||
RUN cd / \ | ||
&& o32-clang helloWorld.c -o helloWorld \ | ||
&& file helloWorld \ | ||
&& file helloWorld | grep -c 'Mach-O i386' \ | ||
&& rm helloWorld.c helloWorld | ||
&& o32-clang helloWorld.c -o helloWorld.i368 \ | ||
&& file helloWorld.i368 \ | ||
&& file helloWorld.i368 | grep -c 'Mach-O i386' \ | ||
&& rm helloWorld.* | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor tests
/test |
@Mergifyio backport 1.17 |
* feat: buid darwing amd64/arm64 Docker images * Update go/darwin-arm64/Makefile * Update go/darwin/Makefile * fix: typo * feat: build multiarch Docker image * fix: use production Docker images * fix: typo * fix: copy changes to darwinw-arm64 * fix: remove arg (cherry picked from commit 831fe5e) # Conflicts: # go/darwin-arm64/Dockerfile.tmpl # go/darwin/Dockerfile.tmpl
✅ Backports have been created
|
* feat: build darwin amd64/arm64 Docker images (#200) * feat: buid darwing amd64/arm64 Docker images * Update go/darwin-arm64/Makefile * Update go/darwin/Makefile * fix: typo * feat: build multiarch Docker image * fix: use production Docker images * fix: typo * fix: copy changes to darwinw-arm64 * fix: remove arg (cherry picked from commit 831fe5e) # Conflicts: # go/darwin-arm64/Dockerfile.tmpl # go/darwin/Dockerfile.tmpl * fix: resolve conflits * fix: add xz-utils * fix: duplicate code Co-authored-by: Ivan Fernandez Calvo <[email protected]> Co-authored-by: Ivan Fernandez Calvo <[email protected]>
build darwin amd64/arm64 Docker images
depends on #197
related to #153