Skip to content

Refine GitHub Actions CI workflow to support a matrix of compiler versions#334

Merged
SpamapS merged 1 commit intogearman:masterfrom
esabol:refine-github-workflow-ci
Nov 13, 2022
Merged

Refine GitHub Actions CI workflow to support a matrix of compiler versions#334
SpamapS merged 1 commit intogearman:masterfrom
esabol:refine-github-workflow-ci

Conversation

@esabol
Copy link
Member

@esabol esabol commented Jan 2, 2022

This PR refines the GitHub Actions CI workflow to support a matrix of compiler versions. This is needed so that we can "retire" Travis CI.

I'd like to rename the .github/workflow/c-cpp.yml file to ci.yml, but I haven't done that yet. Let me know what you think about that.

@esabol esabol changed the title Refine GitHub Actions CI workflow to support a matrix of compiler versions Draft: Refine GitHub Actions CI workflow to support a matrix of compiler versions Jan 3, 2022
@esabol
Copy link
Member Author

esabol commented May 27, 2022

OMG, after a crazy number of commits, I finally got the tests to pass inside the ubuntu:14.04 container!

First, I had to remove localhost from the ::1 address in /etc/hosts. No idea why, but if the test suite tried to bind to localhost with ::1 in there, it would result in a "Cannot assign requested address" error. Then, after that, multi_client_test.cc was still giving me a "libtest/client.cc:273: Connection refused" error. I had a hunch that libtest::get_free_port() wasn't working properly inside the container, so I changed these lines:

  test->push_port(libtest::get_free_port());
  test->push_port(libtest::get_free_port());

to use a fixed port number:

  test->push_port( 19298 );
  test->push_port( 19300 );

And that worked! All tests passed. (I just picked the port numbers 19298 and 19300 at random.)

If anyone has any ideas on how to get the original code to work inside the container without this hack, let me know. Otherwise, I'm happy with it as-is.

Now to get clang builds working!

@esabol esabol mentioned this pull request Nov 13, 2022
@esabol esabol force-pushed the refine-github-workflow-ci branch from 465e7d5 to a4ca74d Compare November 13, 2022 04:25
@esabol
Copy link
Member Author

esabol commented Nov 13, 2022

Between 6 months ago and now, all the Ubuntu 18.04 configurations stopped working. :sigh: I posted a message about it in the GitHub Actions community. I'm hoping someone there can help me fix it.

https://github.com/orgs/community/discussions/38963

P.S. Don't worry. I'll squash all these commits at some point. 😄

@esabol
Copy link
Member Author

esabol commented Nov 13, 2022

Well, I added sudo apt-get update && before my sudo apt-get install command, and that seems to have fixed these Ubuntu 18.04 builds. Kind of obvious in retrospect.

Then I tried to add an Ubuntu 22.04 build, and the bootstrap failed. 😞

https://github.com/gearman/gearmand/actions/runs/3454365941/jobs/5765614111

I guess we don't need to bootstrap on 22.04. As long as the release tarball compiles on 22.04, we're good to go in the short-term. Should I save adding the Ubuntu 22.04 build for later?

@esabol esabol force-pushed the refine-github-workflow-ci branch from d938195 to 9abb54d Compare November 13, 2022 08:07
@esabol
Copy link
Member Author

esabol commented Nov 13, 2022

Changed the gcc-11 build to run on Ubuntu 20.04, and that worked around the 22.04 bootstrap problem. But then the make stage failed. That would presumably be fixed by @SpamapS 's PR #350.

@SpamapS: Two options:

(1) I remove the gcc-11 build from this PR and we merge it. Then you rebase PR #350 on master and add the gcc-11 build to the CI workflow in your PR.

(2) You merge PR #350 and then I rebase this PR on top. Less work, but it assumes PR #350 won't break any builds.

Which option do you prefer?

@esabol esabol marked this pull request as ready for review November 13, 2022 17:36
@SpamapS
Copy link
Member

SpamapS commented Nov 13, 2022

Lets just drop the gcc-11 and merge this. It's really fantastic and will help us move faster with future maintenance.

@esabol esabol force-pushed the refine-github-workflow-ci branch from 9abb54d to a0291cc Compare November 13, 2022 19:21
@esabol esabol changed the title Draft: Refine GitHub Actions CI workflow to support a matrix of compiler versions Refine GitHub Actions CI workflow to support a matrix of compiler versions Nov 13, 2022
@esabol
Copy link
Member Author

esabol commented Nov 13, 2022

Rebased on master to pick up the gcc-11 fixes in PR #350. Squashed commits. All builds pass. The make test stages still need to complete, but I'm pretty confident they will. This PR is now ready for merge.

@esabol
Copy link
Member Author

esabol commented Nov 13, 2022

All make test stages completed and passed. Please merge.

@SpamapS
Copy link
Member

SpamapS commented Nov 13, 2022

Awesome and agreed on pushing 22.04 to later.

@SpamapS SpamapS merged commit faede59 into gearman:master Nov 13, 2022
@esabol esabol deleted the refine-github-workflow-ci branch November 19, 2022 20:34
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