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

Added Alpine builds to GitHub Actions CI #362

Merged

Conversation

esabol
Copy link
Member

@esabol esabol commented Nov 21, 2022

This pull request partially addresses issue #354 by adding an Alpine 3.17 build to the GitHub Actions CI. As a bonus, this build uses gcc 12 (currently 12.2.1).

@esabol esabol force-pushed the add-alpine-and-gcc-12-build-to-github-actions-ci branch 4 times, most recently from 4075443 to 16bd5af Compare November 21, 2022 06:59
@esabol esabol changed the title Added Alpine 3.17/gcc 12 build to GitHub Actions CI Draft: Added Alpine 3.17/gcc 12 build to GitHub Actions CI Nov 21, 2022
@esabol esabol force-pushed the add-alpine-and-gcc-12-build-to-github-actions-ci branch 4 times, most recently from 00f28ce to 07ad93b Compare November 21, 2022 07:36
@esabol
Copy link
Member Author

esabol commented Nov 21, 2022

I hate GitHub Actions so much! I finally get gearmand to build in an Alpine 3.17 container, but a bunch of tests fail with "Segmentation fault (core dumped)" all over the test-suite.log. No idea why. My Alpine 3.17 Docker image builds and tests fine on my machines. But the Alpine 3.17 container in GitHub Actions gives different results for some inexplicable reason. Incredibly frustrating.

@esabol
Copy link
Member Author

esabol commented Nov 21, 2022

Same exact result with Alpine 3.16 and gcc-11.

@esabol
Copy link
Member Author

esabol commented Nov 22, 2022

Anyone have any suggestions? I'm not even sure how to debug this since I can't reproduce it in Docker.

@SpamapS
Copy link
Member

SpamapS commented Nov 22, 2022 via email

@esabol
Copy link
Member Author

esabol commented Nov 22, 2022

I haven't looked into it but there should be a way to get the core dump from the failed run and inspect it with gdb.

My google-fu failed me the first few times I tried to figure out how to do that, but I just found this:

https://gist.github.com/kudaba/53f68340bd28cd1e8824ac1e6ba8cf88

I imagine one would need the executable as well? Maybe the .o files?

I suspect the tests are doing something that is forbidden in the containers
that run actions. We might need to make that test skip in this specific
situation or even have a conditional for Alpine.

I don't know, but I don't think they should segmentation fault, certainly.

TBH I'm not a fan of Alpine. It seems to be a pointless distribution.

As far as I can tell, it's mainly used as the basis for Docker container images.

@esabol esabol force-pushed the add-alpine-and-gcc-12-build-to-github-actions-ci branch from 05e2b8a to 45d07eb Compare June 18, 2023 04:29
@esabol
Copy link
Member Author

esabol commented Nov 16, 2023

I kind of gave up on this, I admit (because it was so incredibly frustrating dealing with GitHub Actions), but it might be worth trying this instead:
https://github.com/marketplace/actions/setup-alpine-linux-environment

@esabol
Copy link
Member Author

esabol commented Jul 21, 2024

In retrospect, I think the obvious reason why the Alpine tests crash is because GitHub Actions that run in Docker containers do not run on hosts that support IPv6. So I think the Alpine containers need to have their /etc/hosts files hacked to remove localhost from the ::1 entry, just like what I did for the Ubuntu containers.

@esabol esabol force-pushed the add-alpine-and-gcc-12-build-to-github-actions-ci branch 4 times, most recently from c2fc42f to 2701fdd Compare July 21, 2024 09:29
@esabol
Copy link
Member Author

esabol commented Jul 21, 2024

OMG, I can't believe I finally did it, almost 2 years later! This PR is finally ready to be merged!

The localhost name attached to ::1 was indeed what was causing the segmentation faults. GitHub Actions containers do not support IPv6, and this causes no end of problems for gearmand testing on every platform, apparently. At least Ubuntu has the courtesy to not segmentation fault though, unlike Alpine.

Modifying /etc/hosts on Alpine was very problematic. Copying a file to /etc/hosts does not work. You get a "Resource busy" error if you try. sed -i also does not work (the mode suggests it modifies the file "in place", but it really makes a copy and then copies over the original file). The only way I could find to modify /etc/hosts was to script vi (and not vim!) to delete the whole ::1 entry from /etc/hosts. So annoying!

My celebratory mood soon dissipated, however, when I discovered gearmand won't build on Alpine 3.20 (but 3.17 and 3.18 both do), so I opened issue #407 for that, and the t/cli test segmentation faults on Alpine 3.19 (issue #408). Argh!

@esabol esabol changed the title Draft: Added Alpine 3.17/gcc 12 build to GitHub Actions CI Added Alpine builds to GitHub Actions CI Jul 21, 2024
@esabol esabol force-pushed the add-alpine-and-gcc-12-build-to-github-actions-ci branch from 2701fdd to 1497727 Compare July 21, 2024 09:59
@esabol esabol merged commit 3806344 into gearman:master Jul 31, 2024
15 checks passed
@esabol esabol deleted the add-alpine-and-gcc-12-build-to-github-actions-ci branch July 31, 2024 09:45
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