-
-
Notifications
You must be signed in to change notification settings - Fork 262
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
Add support for running iOS unit tests on Bitrise #3379
Conversation
Looking pretty good (bitrise run, haven't looked at the changes yet). It should currently error out though:
|
Yes, I noticed. It worked before, not sure what's changed (might not have been a large enough margin for the path length). It's a simple fix though. The path of a Unix socket file is too long, just need to reduce length of the path. Unfortunately that means that not all of the unit tests pass in the new LDC beta. |
Sure, but what I meant was that the CI run should fail if an error occurs. So it's good that there's a failure. ;) |
I though it was a "soft" unit test (some of the unit tests in std.socket are allowed to fail). But I see now that it's not a soft unit test. I guess I have some more work to do 😄. |
Would it be possible to simply connect your existing bitrise account to this repo? |
Yes, but I don't have permission to setup a webhook. So the builds won't be triggered automatically. Either an existing LDC member has to do it or if you would like to add me as a member of ldc-developers then I can do it. |
The CI pipeline fails now when the unit tests fail [1]. It also now prints the logs when the unit tests fail, so you can actually see what failed. |
9fa7d87
to
5f55b61
Compare
I think I've addressed all comments now. The fix for the unit test is available here: dlang/phobos#7430. |
I can do that (I think), just need URL, content type (JSON or |
248c67c
to
75b2f1b
Compare
Great, that's working now. There's apparently a new regression though, possibly related to the changed bitrise config:
|
I'm aware. It's something that needs to be setup for each project. It's not related to the bitrise.yml file. It needs to be done in the Bitrise UI, which I've done. Not sure why it doesn't work. It has worked on two other projects. |
75b2f1b
to
547e202
Compare
547e202
to
34cbf1a
Compare
Rebased to latest master. |
Thx. - The apparent segfault regression while compiling the
|
Better call stack from my build:
The type seems to be |
Ah, might be related to the ABI fixes, where empty-struct by-value arguments aren't passed anymore for iOS targets. |
The ABI documentation says: In the generic ABI, empty structs are treated as aggregates with a single byte member for parameter passing. In iOS, however, they are ignored unless they have a nontrivial destructor or copy-constructor. If they do have such functions, they are considered as aggregates with one byte member in the generic manner. |
d4d02ac
to
ad7be87
Compare
The build is green now on Bitrise [1] since I've now excluded running the unit tests for PRs. |
Thx. I take it that's a bitrise UI setting, as the yaml seems untouched. I should probably transplant the unrelated ICE fix to a dedicated PR (and add a testcase). |
No, it's in the YAML file: https://github.com/jacob-carlborg/ldc/blob/64bb0dd5ecbb08a9cada501c2ab9945e7dd7815b/bitrise.yml#L86
👍. |
This will run the unit tests for druntime and Phobos on a physical device (iPhone).
Alright, let's find out whether the unittests are run successfully for the master branch. - Thx Jacob! |
Argh, they've just removed the iPhone6 + iOS 12.2 combo 12 hours ago: bitrise-steplib/steps-virtual-device-testing-for-ios@801c27b#diff-91d8d269a1c9bd3631ddb04b80b01c4e Please choose another config of your liking. |
|
Strange that they removed the one iOS version that was not deprecated and left the one that was. So much for deprecation 😞. |
@jacob-carlborg: It'd be great if you could look into the apparent std.getopt regression. All the logs show is a stack trace, without printing a failing assertion. |
Sure, I'll try to do that. |
Looking at the stacktrace, it's possible that there is no assertion failure but a crash, which the XCTest framework catches. I'm hoping symbols will be demangled if it's a D assertion that is triggered. In this stacktrace the D symbols are not demangled. |
I've done some more investigation. If LDC is linked against LLVM 9, everything works fine. If LDC is linked against LLVM 10, it crashes in the unit test runner. It crashes here [1], with an EXC_BAD_ACCESS, when calling the unit test function. |
This setups up a CI pipeline for iOS to run on http://bitrise.io. It consists of a template for an Xcode project and a bitrise.yml file to configure the pipeline. When running
ldc-build-runtime
, the template will be used to create a real Xcode project. The Xcode project will run the unit tests for both druntime and Phobos.This will run the unit tests on a real physical device on Bitrise.
For this review, the main interesting files would be:
For this to work, an account on Bitrise needs to be connected to this repository, an Apple developer account needs to be connected to the Bitrise account and the Bitrise workflow needs to be configured to use the bitrise.yml file.
Example of test run: https://app.bitrise.io/build/b6bb5ec7bbb732f2.