-
Notifications
You must be signed in to change notification settings - Fork 38.7k
ci: Add FreeBSD GitHub Actions job #30164
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
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
cc @vasild |
|
Concept ACK |
Not sure. What was the conclusion when GHA was added to the repo about enabling third party actions? IIRC it was unclear whether malicious or backdoored actions could compromise the repo, so the conclusion was to refrain from enabling them? No objection to merging this, but I'd say unless it is clear that the repo can not be compromised, the action should not be enabled in this repo. I am running nighly freeBSD CI runs for years, and I haven't yet seen an issue pop up, so the benefit seems unclear, albeit having the CI config could certainly be useful for manual testing sometimes. |
|
Which FreeBSD version is this? The oldest maintained release is 13.2 I believe, though we'll have to install clang 15 on it. |
|
@Sjors According to https://github.com/vmactions/freebsd-vm?tab=readme-ov-file#under-the-hood you can use |
Then we should pick something newer, or which won't be a blocker to using a newer Clang. Because soon our minimum Clang will be 16. |
By default, the latest release is used, which is 14.0. See https://github.com/hebasto/bitcoin/actions/runs/9215593397/job/25354268473#step:3:7032: On my FreeBSD 14.0 machine, the default compiler is |
I think, this repository granted only Read permissions to the GH Actions workflows as their logs include: |
|
We could pick 13 (13.3 if you have to specify) and then I'm able to compile on a VM running 13.2 and with either clang 15 or 16 manually installed: It seems that the 13.* point releases are maintained for 3 months each, but 13 in general is supported until April 30, 2026. |
|
🐙 This pull request conflicts with the target branch and needs rebase. |
|
Looks good to merge to allow devs to enable this for testing in their fork. However, it should not be enabled in this repo, because:
|
vasild
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a622fbe More testing on different environments is better.
I have no opinion or enough information to judge the security implications for the repository (I am not sure what github actions is exactly) or the limited CI resources or how often a given task finds problems. For any new task we don't know what problems would it find regularly and how would that compare to other tasks.
Maybe, if CI resources are really scarce, an existent CI task can be flipped from Linux to FreeBSD without changing the tests being run. I think there is some overlap now - e.g. unit tests run more than once on Linux amongst all CI tasks.
a622fbe to
f9f20ed
Compare
|
Rebased to resolve a conflict with #30193. |
Not encountering an issue in the past does not guarantee the same in the future :)
FWIW, the new job does not use the GHA cache storage, which is limited. |
We ran into a FreeBSD compilation error here: #30043 (comment) Might be limited to low level networking code and other places where FreeBSD is materially different from macOS and Linux. It seems good to at least do a build. |
vasild
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK f9f20ed
Merging without enabling won't work:
In that case this commit can be reverted back. |
That seems like a GitHub bug. We shouldn't have to change permissions/configurations in this repository for people to do things in forks. |
Correct, but the cost of a trivial post-merge fixup, like adding a missing header or header-guard, in case it happens, should be trivial compared to the overhead to deal with redundant or unrelated intermittent issues, which are ignored by most devs, left to be dealt with by others (see https://github.com/bitcoin/bitcoin/issues?q=is%3Aissue+is%3Aopen+label%3A%22CI+failed%22). If it was free to add more CI tasks, a ton of more important stuff, like valgrind or nightly compiler checks could be added. See also my previous reply: #30164 (comment)
I know, but the thread you linked to required compiling on different versions of FreeBSD, so manually doing that, or at least specifying the versions in the config would be required anyway. |
Would have been nice to merge it this way, but unfortunate that it doesn't work. Good to have the config sitting around in this pull request, anyway. This way it can be picked up easily by anyone in the future. |
|
Implemented in hebasto/bitcoin-core-nightly#1. |
|
Note that it's already implemented in https://github.com/maflcko/b-c-nightly. |
This PR add FreeBSD CI job based on https://github.com/vmactions.
Other *BSD OSes are also available.
IMPORTANT. The
vmactions/*needs to be added to the "Actions permissions" section of the repository settings.A CI job example in my personal repo -- https://github.com/hebasto/bitcoin/actions/runs/9215593397/job/25354268473.