Skip to content
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

Merged
merged 11 commits into from
May 30, 2022

Conversation

kuisathaverat
Copy link
Contributor

build darwin amd64/arm64 Docker images

depends on #197
related to #153

@kuisathaverat kuisathaverat added enhancement New feature or request Team:Automation Label for the Observability productivity team labels May 13, 2022
@kuisathaverat kuisathaverat requested review from a team May 13, 2022 17:28
@kuisathaverat kuisathaverat self-assigned this May 13, 2022
@mergify
Copy link

mergify bot commented May 13, 2022

This pull request does not have a backport label. Could you fix it @kuisathaverat? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d is the label to automatically backport to the 1./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@@ -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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Comment on lines +60 to 83
&& 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 }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactor tests

@elasticmachine
Copy link

elasticmachine commented May 13, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-05-30T15:32:38.050+0000

  • Duration: 44 min 45 sec

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

go/darwin/Makefile Outdated Show resolved Hide resolved
@kuisathaverat
Copy link
Contributor Author

/test

@kuisathaverat kuisathaverat merged commit 831fe5e into elastic:main May 30, 2022
@kuisathaverat
Copy link
Contributor Author

@Mergifyio backport 1.17

mergify bot pushed a commit that referenced this pull request May 31, 2022
* 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
@mergify
Copy link

mergify bot commented May 31, 2022

backport 1.17

✅ Backports have been created

kuisathaverat added a commit that referenced this pull request Jun 1, 2022
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v1.17 enhancement New feature or request Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants