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

Housekeeping. Misc project changes #468

Merged
merged 7 commits into from
Jan 19, 2021
Merged

Housekeeping. Misc project changes #468

merged 7 commits into from
Jan 19, 2021

Conversation

chenxiao0228
Copy link
Collaborator

@chenxiao0228 chenxiao0228 commented Jan 8, 2021

Xcode 12.3 also targets Apple Silicon so it will try to build the for arm.
Upon the frameworks that Bluepill links to, CoreSimulator has arm64e so
Xcode would refuse to link to it. To make Bluepill build with Xcode 12.3
here we pin ARCH to x86_64

Simplified project structure, now we can focus on bp and bluepill schemes and cmd+u runs tests for them instead of having to switch to test schemes.

Refactors bluepill.sh and some test cases. Try to reduce PR check time from 1 hr to ~35min by splitting the check to 3 machines.

Xcode 12.3 also targets Apple Silicon so it will try to build the for arm.
  Upon the frameworks that Bluepill links to, CoreSimulator has arm64e so
  Xcode would refuse to link to it. To make Bluepill build with Xcode 12.3
  here we pin ARCH to x86_64
Extracted variable DerivedDataPath in build.sh
Remoted schemes "bp-tests" and "bluepill-tests"
Changed schemes "bp" and "bluepill" to include related test targets
Changed schemes in build.sh to build and test "bp" and "bluepill" schemes
Hide bplib scheme since it's setup as a target dependency of bp and bluepill

The workflow would be:
Before doing anything, run build-for-testing (CMD+Shift+U) for BPSampleApp
Work on bp or bluepill targets, to run tests, use test button or (CMD+U)
@chenxiao0228 chenxiao0228 requested a review from ob January 10, 2021 22:29
@chenxiao0228
Copy link
Collaborator Author

This is preparations for Xcode 12.3
Pinning arch to x86_64 is only one of the issues.
Also piggyback some clean ups with this PR.

ob
ob previously approved these changes Jan 11, 2021
Copy link
Member

@ob ob left a comment

Choose a reason for hiding this comment

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

lgtm... do we want to always upload artifacts on the master branch or only on failure?

@chenxiao0228
Copy link
Collaborator Author

lgtm... do we want to always upload artifacts on the master branch or only on failure?

Good point! I'll remove it for master.

Will update this PR later, after rebalancing the tests and fix the test failures.

@chenxiao0228
Copy link
Collaborator Author

{4887} 20210115.195410 [  INFO  ] (BP-2) Started recording video to /Users/runner/work/bluepill/bluepill/build/Build/Products/Debug/bpout_N4te0v/my_videos/BPSampleAppUITests__testExample2__1.mp4
{4887} 20210115.195429 [  ERROR ] (BP-2) Video task was interrupted, but exited with non-zero status 2
{4887} 20210115.195429 [  ERROR ] (BP-2) Video recording file missing, expected at path /Users/runner/work/bluepill/bluepill/build/Build/Products/Debug/bpout_N4te0v/my_videos/BPSampleAppUITests__testExample2__1.mp4!```

testTwoBPInstancesWithVideo consistently fails on CI with the above error. But I cannot reproduce it on my machine.

Fixed typo

Always collect xcresult. Even when the tests fail.

Also added the collect xcresult in master workflow.
When building with Xcode with Simulator Xcode will pick the host arch. For
  now it's only x86_64
This change aligns the artifact of the sample app for CI and local dev.
We will figure out what to do with Apple Silicon when we start to support
  it.
Refactored bluepill.sh to reuse code for running tests
Changed github workflow yml's to run tests with 3 machines
Added base test case class BPIntTestCase to split BluepillTests which runs
  for an hour
Created new test case BPReportTests to extract some tests out of BluepillTests
  to run on another machine
@chenxiao0228 chenxiao0228 changed the title Specify ARCHS for bp and bluepill projects Housekeep. Misc project changes Jan 19, 2021
@chenxiao0228 chenxiao0228 changed the title Housekeep. Misc project changes Housekeeping. Misc project changes Jan 19, 2021
@chenxiao0228
Copy link
Collaborator Author

@ob This PR is ready for review.

Copy link
Member

@ob ob left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for doing this cleanup. I'm curious what the BPIntTest is for though...

@chenxiao0228
Copy link
Collaborator Author

lgtm, thanks for doing this cleanup. I'm curious what the BPIntTest is for though...

It's explained in this commit msg.
846bf82

@chenxiao0228 chenxiao0228 merged commit 8ebe836 into master Jan 19, 2021
@chenxiao0228 chenxiao0228 deleted the pin-arch branch January 19, 2021 18:13
RainNapper pushed a commit to RainNapper/bluepill that referenced this pull request Apr 14, 2021
* Specify ARCHS for bp and bluepill projects

Xcode 12.3 also targets Apple Silicon so it will try to build the for arm.
  Upon the frameworks that Bluepill links to, CoreSimulator has arm64e so
  Xcode would refuse to link to it. To make Bluepill build with Xcode 12.3
  here we pin ARCH to x86_64

* Scheme clean up

Extracted variable DerivedDataPath in build.sh
Remoted schemes "bp-tests" and "bluepill-tests"
Changed schemes "bp" and "bluepill" to include related test targets
Changed schemes in build.sh to build and test "bp" and "bluepill" schemes
Hide bplib scheme since it's setup as a target dependency of bp and bluepill

The workflow would be:
Before doing anything, run build-for-testing (CMD+Shift+U) for BPSampleApp
Work on bp or bluepill targets, to run tests, use test button or (CMD+U)

* Added build step to capture xcresult files for analysis

* Build the sample app with x86_64 only

When building with Xcode with Simulator Xcode will pick the host arch. For
  now it's only x86_64
This change aligns the artifact of the sample app for CI and local dev.
We will figure out what to do with Apple Silicon when we start to support
  it.

* Use 3 machines to run tests

Refactored bluepill.sh to reuse code for running tests
Changed github workflow yml's to run tests with 3 machines
Added base test case class BPIntTestCase to split BluepillTests which runs
  for an hour
Created new test case BPReportTests to extract some tests out of BluepillTests
  to run on another machine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants