Skip to content

ci: build Linux binary in Alpine container #2826

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

Merged
merged 1 commit into from
Jul 8, 2022
Merged

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented May 2, 2022

This makes it easier to move the TinyGo compiler between Linux versions because it doesn't depend on any system libraries anymore. For example, binaries should be able to run on old Linux versions and on distributions without glibc (such as Alpine Linux).

This doesn't directly fix #2815 but a similar fix for ARM would have avoided the #2815 issue.

@deadprogram
Copy link
Member

@aykevl
Copy link
Member Author

aykevl commented May 2, 2022

I think the macOS error is just a flaky test, this change seems unlikely to cause this error.

@aykevl
Copy link
Member Author

aykevl commented May 2, 2022

Ugh I'm hitting this error again: #1063 (comment)

@aykevl
Copy link
Member Author

aykevl commented May 3, 2022

Here is a fix:
https://reviews.llvm.org/D124815

This makes it easier to move the TinyGo compiler between Linux versions
because it doesn't depend on any system libraries anymore. For example,
binaries should be able to run on old Linux versions and on
distributions without glibc (such as Alpine Linux).
@aykevl aykevl force-pushed the alpine-static-5 branch from c62d1f9 to d7273d0 Compare July 1, 2022 11:22
@aykevl
Copy link
Member Author

aykevl commented Jul 1, 2022

Trying again with the patch, hopefully it passes this time.

@aykevl
Copy link
Member Author

aykevl commented Jul 4, 2022

This PR seems to be ready!

@deadprogram
Copy link
Member

This is fantastic work. We can now look at distributing an Alpine based image as well as the Debian based one.

@deadprogram deadprogram merged commit 56780c2 into dev Jul 8, 2022
@deadprogram deadprogram deleted the alpine-static-5 branch July 8, 2022 13:05
@aykevl
Copy link
Member Author

aykevl commented Jul 15, 2022

We can now look at distributing an Alpine based image as well as the Debian based one.

It's even better: the binary will run on practically any Linux system out there because there are no dependencies on the host system. So no separate binaries needed.

Or do you mean Docker images? Yes, we could do that, or switch to Alpine entirely because they are usually smaller.

@deadprogram
Copy link
Member

Or do you mean Docker images? Yes, we could do that, or switch to Alpine entirely because they are usually smaller.

Yes, I meant switch to Alpine based Docker containers for everything.

@aykevl aykevl mentioned this pull request Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants