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

ci: add freebsd workflow #1109

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

joshuasing
Copy link
Member

@joshuasing joshuasing commented Oct 15, 2024

Add a GitHub Actions workflow to run make check inside a FreeBSD VM, which runs daily at 00:00 or when manually requested.
This is similar to the Solaris VM workflow, and uses an action from the same vmactions org.

Successful CI run:
https://github.com/joshuasing/libressl-portable/actions/runs/11341234538/job/31539126298

Should this also run gmake test or similar?

@joshuasing joshuasing added the CI label Oct 15, 2024
Copy link
Contributor

@botovq botovq left a comment

Choose a reason for hiding this comment

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

Should this also run gmake test or similar?

gmake -j2 check is already part of the script, so no need for this.

What's missing is the cmake stanza. Something like this

$ cmake -G Ninja -B build
$ ninja -C build
$ ninja -C build test

.github/workflows/freebsd.yml Outdated Show resolved Hide resolved
@joshuasing joshuasing force-pushed the joshua/freebsd-ci branch 2 times, most recently from 3ee4ffc to 3744d47 Compare October 15, 2024 08:02
Copy link
Contributor

@botovq botovq left a comment

Choose a reason for hiding this comment

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

Looks good to me now. Do you have a successful run somewhere given that it doesn't run in the per-PR CI?

@joshuasing
Copy link
Member Author

@botovq Here's a run (cmake has test failures, which are probably fixed by #1108): https://github.com/joshuasing/libressl-portable/actions/runs/11341798906

Failure: https://github.com/joshuasing/libressl-portable/actions/runs/11341798906/job/31540817927#step:4:18520

Would it be worth setting --output-on-failure or similar to log more information when a test fails?
I was also going to pin the FreeBSD version and disable "copyback" since we don't need the action to copy files back from the VM, is that okay or should I leave it as-is?

@botovq
Copy link
Contributor

botovq commented Oct 15, 2024

The process '/usr/bin/bash' failed with exit code 1

Where does that come from? Bash isn't part of FreeBSD. You'd need to pkg install it and use /usr/local/bin/bash if it's really needed. Better use a posix shell and invoke it as /bin/sh.

Would it be worth setting --output-on-failure or similar to log more information when a test fails?

Yeah, that would make sense. Not sure what the right incantation is, though.

I was also going to pin the FreeBSD version and disable "copyback" since we don't need the action to copy files back from the VM, is that okay or should I leave it as-is?

Agreed, I don't think we need that.

@botovq
Copy link
Contributor

botovq commented Oct 15, 2024

  	 62 - err_test (SEGFAULT)
  	102 - signertest (Failed)
  	117 - tlstest (Failed)
  	122 - verifytest (Failed)

The three plain failures are what I saw. Should be fixed by rebasing your branch on top of HEAD. I think I know what the issue with the err_test is, will look.

@botovq
Copy link
Contributor

botovq commented Oct 15, 2024

I can't repro the segfault. I'll need to instrument this CI VM to figure it out. Will take a while.

Ah. I made a mistake. The underlying issue is the same as with the failing libtls tests. The initialization code in crypto/err/err.c doesn't work because of FreeBSD's questionable idea of providing a completely broken pthread_once() in libc.

That said, I think the err_test should be a bit more defensive.

So @joshuasing should I merge or do you want to make the changes you mentioned?

@joshuasing
Copy link
Member Author

joshuasing commented Oct 15, 2024

@botovq I will make the changes I mentioned and will rebase on master.

Where does that come from? Bash isn't part of FreeBSD. You'd need to pkg install it and use /usr/local/bin/bash if it's really needed. Better use a posix shell and invoke it as /bin/sh.

I am not sure. Where are you seeing that? 🤔
I didn't see it exit with either of those

@botovq
Copy link
Contributor

botovq commented Oct 15, 2024

I think I simply got confused about that bash thing. It's in the annotations "panel" when I click on https://github.com/joshuasing/libressl-portable/actions/runs/11341798906

@joshuasing
Copy link
Member Author

Oh, I see. I believe that comes from the action running bash to start the VM 🤔

@botovq
Copy link
Contributor

botovq commented Oct 15, 2024

Agreed.

@joshuasing
Copy link
Member Author

I have pinned the version, set copyback: false and added an environment variable which should effectively set --output-on-failure when ctest runs.

Run: https://github.com/joshuasing/libressl-portable/actions/runs/11343332671

@joshuasing
Copy link
Member Author

Oops, forgot to rebase. I have now rebased, here is a run with the latest commits on master: https://github.com/joshuasing/libressl-portable/actions/runs/11343486719

@botovq
Copy link
Contributor

botovq commented Oct 15, 2024

Thanks. I'll merge if green.

@botovq botovq merged commit 574fc3d into libressl:master Oct 15, 2024
47 checks passed
@joshuasing joshuasing deleted the joshua/freebsd-ci branch October 15, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants