-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
When using xcode discover tests before test to avoid running unsigned code #3647
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
base: master
Are you sure you want to change the base?
Conversation
|
Sorry for the delay. Using xcode 26.1.1, I can't reproduce your issue @JonnyPtn . Something on your end I think. |
|
Sorry I meant confirm it reproduced on master, this PR fixes it so good that's confirmed :D Just want to make sure I'm fixing a real bug as the CI on master isn't having an issue Also would likely need a clean build to reproduce on master after you switch, as otherwise the binary will still be signed from your build of this branch |
|
Not gonna lie. I'm confused. The master branch of SFML, I can configure, generate, build and run all the tests. Your master branch, I can't generate. So all that to say, SFML master is fine, your master is broken, your PR is fine. Can't explain. |
|
Ignore master on my fork that's unrelated and likely very out of date So if I run these commands on current SFML master: then it fails with the following output: that's the post build step from Is that the same as you're seeing? I'll try and find another Mac to test on as well, I know gatekeeper behaves slightly differently on Intel Macs so if you're running the same commands and seeing the same output but succeeding then it could be that edit: Upstream catch issue catchorg/Catch2#2411 indicates it's not an issue on intel, which would explain why you can't reproduce @Rosme |
|
Confirmed this is only an issue when on an arm mac, and building arm binaries - If i build x64 locally it's fine We don't actually test arm xcode builds in github CI which is probably an oversight, but I've tested adding that and still haven't been able to reproduce the issue there - No matter what I try it seems like they are just configured to allow running unsigned code. Regardless, all the evidence (CMake and catch issues, as well as my own reproduction) points to it being a real issue, so while it might still be good to get a second opinion I'm as confident as I can be that this is a worthwhile change (not least because I'll struggle to continue contributing SFML mac fixes without it...) |
|
Ah yeah, well okay, that explains it. Interesting though it's only an issue on intel. I do think it's worth the fix. And it could very well be it allows running unsigned code for dev purpose to simplify things. I'm confident that you've done what needed to be done, and I'd say let's push that. As for not testing arm builds, that should be fixed in my opinion. |
Currently building the unit tests with Xcode 15+ will fail, as catch_discover_tests tries to run the test as a post-build step which is before it's. been codesigned, see https://gitlab.kitware.com/cmake/cmake/-/issues/21845
I can't explain why this works on the GitHub runners, as far as I can tell the commands are the same. I would guess they may have gatekeeper disabled but I can't find anything to verify this
I don't believe it's any particular setting on my machine, but would be good for someone else to double check (@Rosme / @ChrisThrasher ?) - should reproduce if you just generate sfml projects for Xcode and try to build a test target