Skip to content

Setup Gentoo+Meson CI#2356

Closed
DarthGandalf wants to merge 1 commit intoyhirose:masterfrom
DarthGandalf:ci
Closed

Setup Gentoo+Meson CI#2356
DarthGandalf wants to merge 1 commit intoyhirose:masterfrom
DarthGandalf:ci

Conversation

@DarthGandalf
Copy link
Contributor

The goal was to add a CI with Meson, and without access to internet, because Gentoo emerge runs tests in sandbox, skipping tests which are explicitly marked as online.
But on github-hosted runners, there's no good way to disable network, emulate that by emptying resolv.conf

With such workaround the "Gentoo" part is not really relevant anymore, the same meson+resolv.conf can be done in Ubuntu. But this does increase coverage a bit, so why not.

The goal was to add a CI with Meson, and without access to internet,
because Gentoo emerge runs tests in sandbox, skipping tests which are
explicitly marked as online.
But on github-hosted runners, there's no good way to disable network,
emulate that by emptying resolv.conf

With such workaround the "Gentoo" part is not really relevant anymore,
the same meson+resolv.conf can be done in Ubuntu. But this does increase
coverage a bit, so why not.
@yhirose
Copy link
Owner

yhirose commented Feb 11, 2026

I made #2358 which handles the offline test with openssl, mbedtls, no_tls on ubuntu.

@DarthGandalf
Copy link
Contributor Author

Do I understand correctly that you just filtered which tests to run?

The point here is to ensure that tests which require network, all have the suffix. I don't see you disabling network in any way?

@yhirose
Copy link
Owner

yhirose commented Feb 11, 2026

You’re right. I forgot to disable the network. Do you notice any missing pieces? Thanks!

      - name: disable network
        run: sudo sh -c 'echo > /etc/resolv.conf'

@DarthGandalf
Copy link
Contributor Author

I suppose that should work, thanks. Not sure what's the value of the matrix [openssl, mbedtls, no-tls] though: if the purpose of the test is to check names of tests, running one of them should probably be enough; the rest is just subset of tests running in the other ubuntu CI

What about having meson in one of jobs? That one would benefit from a matrix actually

@yhirose
Copy link
Owner

yhirose commented Feb 12, 2026

There are non _Online tests for both CPPHTTPLIB_SSL_ENABLED and when CPPHTTPLIB_SSL_ENABLED is not defined. So we need to test with both no-tls and either openssl or mbedtls. Since mbedtls was just introduced and openssl is more widely used, I'll stick with openssl and no-tls. Thanks for your insight!

@yhirose
Copy link
Owner

yhirose commented Feb 12, 2026

The only issue is that this test_offline adds 10 more minutes to the GitHub CI. The CI tests already take quite a long time, so I'm wondering if it's really worth including this check in this way. If there's a more efficient approach, I'd prefer to use that instead.

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