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

Use bundler to manage CocoaPods and xcpretty #57

Closed

Conversation

benasher44
Copy link
Contributor

@benasher44 benasher44 commented Oct 12, 2016

Changes in this pull request

Pull request checklist

  • All tests pass. Demo project builds and runs.
  • I added tests, an experiment, or detailed why my change isn't tested.
  • I have reviewed the contributing guide

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@benasher44
Copy link
Contributor Author

Hm. I signed the cla for #51, and it won't let me sign again.

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot
Copy link
Contributor

@benasher44 updated the pull request - view changes

@rnystrom
Copy link
Contributor

@benasher44 don't worry about the CLA bot, once you signed once you should be g2g from then on.

Since I'm a TravisCI noob I'm gonna ask @jessesquires to take a quick look at this.

@benasher44
Copy link
Contributor Author

Ah yep it responded shortly after. Thanks!

@benasher44
Copy link
Contributor Author

Looks like the output still contains this after moving bundle install to before_install

Could not find proper version of cocoapods (1.1.0.rc.3) in any of the sources
Run `bundle install` to install missing gems.

This build still passes, so this is mostly just annoying because pod --version will always output this. Going to try using the gemfile setting, which is also valid for objective-c projects.

@facebook-github-bot
Copy link
Contributor

@benasher44 updated the pull request - view changes

@jessesquires
Copy link
Contributor

this LGTM except travis is still not happy

@facebook-github-bot
Copy link
Contributor

@benasher44 updated the pull request - view changes

@jessesquires
Copy link
Contributor

Wow. still waiting on travis. First build has timed out.

Also:

Could not find proper version of cocoapods (1.1.0.rc.3) in any of the sources

😢

@jessesquires jessesquires modified the milestone: 2.0.0 Oct 12, 2016
@benasher44
Copy link
Contributor Author

Yeah… I'm not sure what else to do to make that go away. It's trying to print pod --version before it runs bundle install, which seems like a Travis bug at this point (literally does it on the next line). It knows there's a Gemfile, so it really shouldn't try to print info about gems before they're installed. Maybe it doesn't expect that we're going to install a different version of the CocoaPods gem? In any case, printing versions of things before the install or before_install phases seems like a Travis bug. Filed travis-ci/travis-ci#6717.

As for the timeout, it looks like it's timing out during code signing. Code signing probably isn't needed here, since we just want to verify that it builds and tests pass. I'm going to try disabling that. I've tried this with travis before the Xcode 8 GM was released, and it caused issues. Maybe it's fixed now?

@benasher44
Copy link
Contributor Author

Luckily, even though that message is in red, it doesn't fail the build. Here's a passing one: https://travis-ci.org/Instagram/IGListKit/jobs/167060407

@rnystrom
Copy link
Contributor

Nice, I wonder if we can make any subscription updates to Travis to get higher pri queues...

@jessesquires think we're g2g here?

@benasher44
Copy link
Contributor Author

Are the timeouts a new issue in this PR or existing?

@benasher44
Copy link
Contributor Author

Ah looks like existing: https://travis-ci.org/Instagram/IGListKit/builds/167080863. This is good to go in terms of fixing pod spec lint flakes.

Quick question though. I just realized this is doing pod spec lint instead of pod lib lint. The former will go fully based on the spec (including pulling the spec's tag from git), whereas the latter always uses the files in the working directory. The latter seems like it be more useful for CI, since it'll verify new changes, whereas the former will always check the current version in the podspec. Should I change this?

@facebook-github-bot
Copy link
Contributor

@benasher44 updated the pull request - view changes

@benasher44
Copy link
Contributor Author

Tried locally disabling code signing with CODE_SIGNING_ALLOWED=NO, and the tests failed to bootstrap every time. CODE_SIGNING_REQUIRED=NO seemed to work though, and it appeared to skip the signing step for tests. So maybe less hanging now?

@facebook-github-bot
Copy link
Contributor

@benasher44 updated the pull request - view changes

@benasher44
Copy link
Contributor Author

Despite CODE_SIGNING_REQUIRED changes, there is still plenty of code signing happening. 🔥

This might be a red herring anyway, since the thing that happens right after code signing is starting the tests. It might just be hanging waiting for the simulator.

Anyway, I think I'm out of things I want to try in this PR.

@jessesquires
Copy link
Contributor

Anyway, I think I'm out of things I want to try in this PR.

😆 Thanks for all the help so far @benasher44 ! 🙌

I've been fighting with travis-ci timeouts since the upgrade to Xcode8. No idea whats going on, but all of my builds for other projects timeout for every single iOS 8 build. /shrug

@jessesquires
Copy link
Contributor

@benasher44
Copy link
Contributor Author

No prob! There are a few tickets floating around about Xcode 8 Travis things, but I hadn't seen a response yet. So, good to see a response from Travis!

@benasher44
Copy link
Contributor Author

benasher44 commented Oct 13, 2016

Early on, I found that only the iPhone SE destination worked reliably on Travis. This may or may not still be the case. It might be worth adding that one in or replacing one of the existing destinations, so that if that or another seems consistent, at least you have one simulator that always works to keep PRs going.

@benasher44
Copy link
Contributor Author

There's still the unanswered question of pod spec lint vs pod lib lint. I could make this small change here as well (sort of related because ruby/CocoaPods?). I could also just file an issue for someone to dig into later.

Checks local files instead of the version in the spec
@facebook-github-bot
Copy link
Contributor

@benasher44 updated the pull request - view changes

@benasher44
Copy link
Contributor Author

Ah thought previous comment had a thumbs up, but it was the one before that. Let me know, and I'll revert.

@jessesquires
Copy link
Contributor

Sounds good to me! 👍

@rnystrom
Copy link
Contributor

Sweet, I think we're g2g here. We can resolve Travis infra timeout issues down the road if they come up.

@facebook-github-bot
Copy link
Contributor

Thanks for importing. If you are a Facebook employee, you can view this diff on Phabricator.

@benasher44
Copy link
Contributor Author

Yup! I agree.

bogren pushed a commit to bogren/IGListKit that referenced this pull request Aug 3, 2017
Summary:
- Travis appears to be using CocoaPods 1.1.0.beta.2, which is missing some fixes for Xcode 8 (see [sample failing build](https://travis-ci.org/Instagram/IGListKit/jobs/166935850) from Instagram#51).
- This change will ensure that a consistent CocoaPods version is used by Travis
- In the added Gemfile, I picked the latest CocoaPods 1.1.0 RC (matches version in Podfile.lock) and the latest xcpretty.
- Changed `pod spec lint` to `pod lib lint` to verify local files instead of files from the version specified in the spec.

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes Instagram#57

Differential Revision: D4019655

Pulled By: rnystrom

fbshipit-source-id: 422e55c44dfdf276b587ea6e12ae30218a237ff5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants