-
Notifications
You must be signed in to change notification settings - Fork 540
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
Support FreeBSD as sccache-dist server #1184
Conversation
Could you please add a job in the ci to test this on freebsd? Thanks |
Codecov ReportBase: 30.03% // Head: 30.02% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1184 +/- ##
==========================================
- Coverage 30.03% 30.02% -0.02%
==========================================
Files 47 47
Lines 16642 16642
Branches 7870 7877 +7
==========================================
- Hits 4999 4996 -3
+ Misses 6334 6331 -3
- Partials 5309 5315 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
a way to do it: and please run rustfmt on your change |
Thanks for the pointer, I'll look into it. |
@grembo do you have an update on this? thanks |
@sylvestre Thanks for asking, no updates yet, as I’ve been too busy with other things, but it will definitely happen soonish. |
0759a5e
to
c56ecdd
Compare
@sylvestre I rebased the patch and added a series of CI tests for FreeBSD. With those I also found a small issue with creating server tokens which I fixed in the process. Tests for the latest push worked out ok in my account's actions, see https://github.com/grembo/sccache/actions/runs/2619631534 (assuming it is visible to you). They won't run on your account though, as the required actions aren't allowlisted:
(see https://github.com/mozilla/sccache/actions/runs/2619631572) |
5534db5
to
ebb52f3
Compare
@sylvestre I removed the dependency rust-cache and updated the testsuite to be based on macos-12, as it appears to be more stable. See https://github.com/grembo/sccache/runs/7212100672?check_suite_focus=true#logs for successful CI run in my repo (you would have to allow |
ebb52f3
to
ceaaf41
Compare
ceaaf41
to
38f5cd0
Compare
38f5cd0
to
794ddbf
Compare
@sylvestre Rebased again to keep track with @dependabot Is there anything else from my side that's required at this point? |
No, at this point it requires some verification on my end, but I won't have time to setup a test env until end of next week. |
Cool, thanks for spending time on this. It's certainly not perfect, but works reliably for us. |
Sorry again. |
c2d752b
to
05a7bee
Compare
Thanks. |
Note I just setup freebsd, so I am not at the stage to confirm functionality. |
Yeah, the github action has been activated: |
@sylvestre Moving parts of the action to a script (which then could also be used for local testing) makes a lot of sense. It will also allow to runs tests in a loop on beefier hardware to check test stability. It's a bit unclear what happened with the previous runs (timing out after 6 hours, while a build should take < 1 hour): I'll also add "copyback: false" to the CI action, as there are no artifacts we want to copy out (maybe that's part of the issue). |
389224a
to
b9332ec
Compare
@sylvestre Like you suggested, I moved most of the CI actions into a separate script, which now allow to run the test locally. I ran this in a loop and after some tinkering it seems to be stable. Also did a few other minor improvements like outlined in the commit log. |
Much better, thanks |
FreeBSD support makes use of [pot](https://github.com/potbsd/pot) for sandboxing. Implementation was done to be minimally invasive, almost all FreeBSD specific parts happen in segregated files.
This was broken in 5032a83, which correctly stated in its commit message that "exp" is mandatory in the new version of jwtwebtoken.
This: - Builds sccache/sccache-dist - Runs unit tests - Does a real world test of sccache and sccache-dist using ZFS/pot and a small sample rust project
Since macOS VMs should have plenty of RAM, I went all in. Also add sleep to give sscache server time to settle in.
This also has vmware and appears to be a bit more stable. Also reformat test_freebsd target to use longer lines.
Move most of FreeBSD CI script into a shell script that can be used locally. Update documentation for 13.1. Disable copyback from vm image, set time limit on CI. Account for first distributed compile call sometimes failing. Rename job to match others.
ca2c59a
to
b190c7f
Compare
Seems that they regressed on
Rings a bell ? |
This fixes the build on FreeBSD (and other OSes). See mozilla/sccache#1184
I downloaded the repo, debugged it and was about to open a pull request, just to find that there is one already: |
Address a freebsd issue: Elzair/core_affinity_rs#15 for sccache mozilla/sccache#1184
Address a freebsd issue: Elzair/core_affinity_rs#15 for sccache mozilla/sccache#1184
Thank you, I was about to hit the button 👍 |
@grembo it is now in the 4.0.0 pre1 release |
@sylvestre Sounds like a good idea. How would you approach it though? Right now we build and test in one target (which does not build a release version). Creating a separate build target for FreeBSD would be an option, but the mac-wrapping is already quite expensive - maybe build the release after build/test worked out ok (and then upload the artifacts)? Otherwise, if this consumes too many resources, sccache-dist will certainly become part of the FreeBSD sccache port, so it will also be available to users using |
FreeBSD support makes use of pot for sandboxing.
Implementation aimed to be minimally invasive, almost all
FreeBSD specific parts happen in segregated files.
We've been using this successfully in CI for over a month now, so it
appears to be stable enough to be potentially useful to others.