Skip to content

GHA/non-native: bump cross-build-actions, NetBSD 11.0, FreeBSD riscv64 - #22590

Closed
vszakats wants to merge 5 commits into
curl:masterfrom
vszakats:cross-platform-bump
Closed

vszakats wants to merge 5 commits into
curl:masterfrom
vszakats:cross-platform-bump

Conversation

@vszakats

@vszakats vszakats commented Aug 15, 2026 •

Copy link
Copy Markdown
Member

@github-actions github-actions Bot added the CI Continuous Integration label Aug 15, 2026
@vszakats vszakats added the build label Aug 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates non-native CI coverage for newly supported BSD targets and optimizes emulated RISC-V builds.

Changes:

  • Bumps cross-platform action to v1.4.0 and NetBSD to 11.0.
  • Adds an optimized FreeBSD riscv64 build.
  • Corrects FreeBSD gethostbyname_r prefill detection.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
CMake/unix-cache.cmake Prefills FreeBSD’s six-argument gethostbyname_r.
.github/workflows/non-native.yml Updates the action and BSD CI matrix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vszakats vszakats closed this in 91323de Aug 15, 2026
@vszakats
vszakats deleted the cross-platform-bump branch August 15, 2026 09:21
@dfandrich

Copy link
Copy Markdown
Contributor

Why not run the tests on risc-v? That would give a lot more assurance that there aren't any run-time issues on the CPU. Is it just because it's so slow?

@vszakats

Copy link
Copy Markdown
Member Author

Why not run the tests on risc-v? That would give a lot more assurance that there aren't any run-time issues on the CPU. Is it just because it's so slow?

Yes, I have excluded emulated CPUs from tests for perf reasons.
By hunch risc-v may perhaps be slower than ARM64.

I'll adjust the logic to make testing such build easy. Maybe make
a test run to see. → #22599

@vszakats

vszakats commented Aug 15, 2026 •

Copy link
Copy Markdown
Member Author

Run it here to see:
https://github.com/curl/curl/actions/runs/31901153020/job/95052022075

Takes ~10-20 seconds to install Perl, almost 8 minutes to build the tests,
test run lasted 2.5m till the timeout kicked in at 15 minutes. This is too slow
for CI, I think. Maybe running it as a cron build could work instead, but then
it needs to be checked for errors manually from time to time.

@dfandrich

dfandrich commented Aug 15, 2026 via email

Copy link
Copy Markdown
Contributor

@vszakats

Copy link
Copy Markdown
Member Author

I'd have to agree. Running a subset of tests is an idea, but that dramatically reduces the chance that it would find the kind of edge case issue we'd be looking for. I have a feeling increasing the test parallelism won't help, either, since the CPU is going to be running at 100% doing emulation.

It's something we could try tuning, but with emulation, even -j8 may
have a reverse effect (it's a bit difficult to predict). Just the build taking
12+ minutes makes it the longest running job before getting a chance
to run a test.

In theory ARM64 Linux runners could make those jobs faster by going
native, but that's not technically possible, according to this Issue:
cross-platform-actions/action#97

Doing them in cron could be in general a solution for 10+ minute jobs
without reducing PR/commit turnaround time. Also an option for shorter
ones that are less reliable, e.g. due to straining package servers, like
MidnightBSD and DragonFly. Pushing failure notifications in a safe,
yet ergonomic way is one challange, another one maybe is keeping
workflow configuration tidy in these dual-config (i.e. how to exclude
certain jobs when run in PR mode, and include certain ones for cron).

But the ultimate downside is that a failure won't be caught within the
PR regressing/introducing it.

I wonder if there are other tricks to employ — 8 minutes to build 5
test binaries (in debug mode, thus no -O3) feels high.

@dfandrich

dfandrich commented Aug 16, 2026 via email

Copy link
Copy Markdown
Contributor

@vszakats

Copy link
Copy Markdown
Member Author

I wonder if there are other tricks to employ — 8 minutes to build 5 test binaries (in debug mode, thus no -O3) feels high.
ccache? This was my top search result: https://github.com/hendrikmuhs/ccache-action This might even help other builds, but I guess they only take O(seconds) to compile so might not be worth the overhead.

I was more thinking of something to tweak with settings. (Not overly keen on using an external
action. Also did not have much luck with ccache, though I could have been holding it wrong.)

Adding -DCURL_DISABLE_TYPECHECK=ON took test build time down to 2 minutes (from 7-8):
https://github.com/curl/curl/actions/runs/31917800796/job/95092535738 (with) vs.
https://github.com/curl/curl/actions/runs/31917800796/job/95092535797 (without)
This makes it only ~2x slower than ARM64. (it also speeds up ARM64 quite a bit)

vszakats added a commit that referenced this pull request Aug 18, 2026
Also:
- drop most hand-tuned `--min` options, in favor of defaults.
- enable tests on emulated riscv64.
  Suggested-by: Dan Fandrich
  Ref: #22590 (comment)
- drop building examples on emulated riscv64.

Adding around 3.5 minutes to the riscv64 job:
0.5 Perl install, 2 minutes to build tests, 1 minute to run 100 tests.

Follow-up to 6648669 #22619
Follow-up to e669179 #22616
Follow-up to 58cb1e2 #22618
Follow-up to d000006 #22602

Closes #22617
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build CI Continuous Integration

Development

Successfully merging this pull request may close these issues.

3 participants