Skip to content

CI: add workaround for Carthage timing out#3119

Merged
NachoSoto merged 1 commit into
mainfrom
fastlane-circleci-timeout
Aug 30, 2023
Merged

CI: add workaround for Carthage timing out#3119
NachoSoto merged 1 commit into
mainfrom
fastlane-circleci-timeout

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

xcodebuild -list loads all SPM dependencies, which includes our own repo (necessary to test RevenueCat_CustomEntitlementComputation):

Resolve Package Graph

Resolve Package Graph

Resolved source packages:
  CwlPreconditionTesting: https://github.com/mattgallagher/CwlPreconditionTesting.git @ 2.1.2
  swift-snapshot-testing: https://github.com/pointfreeco/swift-snapshot-testing @ 1.11.1
  CwlCatchException: https://github.com/mattgallagher/CwlCatchException.git @ 2.1.2
  Nimble: https://github.com/quick/nimble @ 10.0.0
  OHHTTPStubs: https://github.com/AliSoftware/OHHTTPStubs.git @ 9.1.0
  RevenueCat: https://github.com/RevenueCat/purchases-ios @ main

Carthage has as hardcoded timeout of 60 seconds. This has been failing ti due to our repo size growing combined with CircleCI's network issues.

To prevent that, this updates all lanes that use Carthage to pre-load SPM dependencies by calling xcodebuild -list first.

`xcodebuild -list` loads all SPM dependencies, which includes our own repo (necessary to test `RevenueCat_CustomEntitlementComputation`):
```
Resolve Package Graph

Resolve Package Graph

Resolved source packages:
  CwlPreconditionTesting: https://github.com/mattgallagher/CwlPreconditionTesting.git @ 2.1.2
  swift-snapshot-testing: https://github.com/pointfreeco/swift-snapshot-testing @ 1.11.1
  CwlCatchException: https://github.com/mattgallagher/CwlCatchException.git @ 2.1.2
  Nimble: https://github.com/quick/nimble @ 10.0.0
  OHHTTPStubs: https://github.com/AliSoftware/OHHTTPStubs.git @ 9.1.0
  RevenueCat: https://github.com/RevenueCat/purchases-ios @ main
```

`Carthage` has as [hardcoded timeout of 60 seconds](https://github.com/Carthage/Carthage/blob/0.39.0/Source/CarthageKit/XCDBLDExtensions.swift#L79). This has been failing ti due to our repo size growing combined with CircleCI's network issues.
To prevent that, this updates all lanes that use `Carthage` to pre-load SPM dependencies by calling `xcodebuild -list` first.
@NachoSoto NachoSoto added the ci label Aug 29, 2023
@NachoSoto NachoSoto requested a review from a team August 29, 2023 18:10
@NachoSoto NachoSoto marked this pull request as ready for review August 29, 2023 18:10
Comment thread fastlane/Fastfile
@NachoSoto NachoSoto force-pushed the fastlane-circleci-timeout branch from 95a68df to f94d0a5 Compare August 29, 2023 18:36
@codecov

codecov Bot commented Aug 29, 2023

Copy link
Copy Markdown

Codecov Report

Merging #3119 (f94d0a5) into main (3f50529) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3119      +/-   ##
==========================================
- Coverage   86.62%   86.62%   -0.01%     
==========================================
  Files         219      219              
  Lines       15683    15683              
==========================================
- Hits        13586    13585       -1     
- Misses       2097     2098       +1     

see 1 file with indirect coverage changes

@NachoSoto NachoSoto merged commit f700100 into main Aug 30, 2023
@NachoSoto NachoSoto deleted the fastlane-circleci-timeout branch August 30, 2023 21:42
NachoSoto added a commit that referenced this pull request Aug 31, 2023
`xcodebuild -list` loads all SPM dependencies, which includes our own
repo (necessary to test `RevenueCat_CustomEntitlementComputation`):
```
Resolve Package Graph

Resolve Package Graph

Resolved source packages:
  CwlPreconditionTesting: https://github.com/mattgallagher/CwlPreconditionTesting.git @ 2.1.2
  swift-snapshot-testing: https://github.com/pointfreeco/swift-snapshot-testing @ 1.11.1
  CwlCatchException: https://github.com/mattgallagher/CwlCatchException.git @ 2.1.2
  Nimble: https://github.com/quick/nimble @ 10.0.0
  OHHTTPStubs: https://github.com/AliSoftware/OHHTTPStubs.git @ 9.1.0
  RevenueCat: https://github.com/RevenueCat/purchases-ios @ main
```

`Carthage` has as [hardcoded timeout of 60
seconds](https://github.com/Carthage/Carthage/blob/0.39.0/Source/CarthageKit/XCDBLDExtensions.swift#L79).
This has been failing ti due to our repo size growing combined with
CircleCI's network issues.

To prevent that, this updates all lanes that use `Carthage` to pre-load
SPM dependencies by calling `xcodebuild -list` first.
NachoSoto added a commit that referenced this pull request Sep 1, 2023
Follow up to #3119. This job also needed the workaround to make sure
`Carthage` doesn't time out.

Also moved the implementation to Fastlane.
NachoSoto pushed a commit that referenced this pull request Sep 5, 2023
**This is an automatic release.**

### Bugfixes
* `DebugViewModel`: fixed runtime crash on iOS < 16 (#3139) via
NachoSoto (@NachoSoto)
### Performance Improvements
* `PurchasesOrchestrator`: return early if receipt has no transactions
when checking for promo offers (#3123) via Mark Villacampa
(@MarkVillacampa)
* `Purchases`: don't clear intro eligibility / purchased products cache
on first launch (#3067) via NachoSoto (@NachoSoto)
### Dependency Updates
* `SPM`: update `Package.resolved` (#3130) via NachoSoto (@NachoSoto)
### Other Changes
* `ReceiptParser`: fixed SPM build (#3144) via NachoSoto (@NachoSoto)
* `carthage_installation_tests`: optimize SPM package loading (#3129)
via NachoSoto (@NachoSoto)
* `CI`: add workaround for `Carthage` timing out (#3119) via NachoSoto
(@NachoSoto)
* `Integration Tests`: workaround to not lose debug logs (#3108) via
NachoSoto (@NachoSoto)
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
`xcodebuild -list` loads all SPM dependencies, which includes our own
repo (necessary to test `RevenueCat_CustomEntitlementComputation`):
```
Resolve Package Graph

Resolve Package Graph

Resolved source packages:
  CwlPreconditionTesting: https://github.com/mattgallagher/CwlPreconditionTesting.git @ 2.1.2
  swift-snapshot-testing: https://github.com/pointfreeco/swift-snapshot-testing @ 1.11.1
  CwlCatchException: https://github.com/mattgallagher/CwlCatchException.git @ 2.1.2
  Nimble: https://github.com/quick/nimble @ 10.0.0
  OHHTTPStubs: https://github.com/AliSoftware/OHHTTPStubs.git @ 9.1.0
  RevenueCat: https://github.com/RevenueCat/purchases-ios @ main
```

`Carthage` has as [hardcoded timeout of 60
seconds](https://github.com/Carthage/Carthage/blob/0.39.0/Source/CarthageKit/XCDBLDExtensions.swift#L79).
This has been failing ti due to our repo size growing combined with
CircleCI's network issues.

To prevent that, this updates all lanes that use `Carthage` to pre-load
SPM dependencies by calling `xcodebuild -list` first.
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
Follow up to #3119. This job also needed the workaround to make sure
`Carthage` doesn't time out.

Also moved the implementation to Fastlane.
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
**This is an automatic release.**

### Bugfixes
* `DebugViewModel`: fixed runtime crash on iOS < 16 (#3139) via
NachoSoto (@NachoSoto)
### Performance Improvements
* `PurchasesOrchestrator`: return early if receipt has no transactions
when checking for promo offers (#3123) via Mark Villacampa
(@MarkVillacampa)
* `Purchases`: don't clear intro eligibility / purchased products cache
on first launch (#3067) via NachoSoto (@NachoSoto)
### Dependency Updates
* `SPM`: update `Package.resolved` (#3130) via NachoSoto (@NachoSoto)
### Other Changes
* `ReceiptParser`: fixed SPM build (#3144) via NachoSoto (@NachoSoto)
* `carthage_installation_tests`: optimize SPM package loading (#3129)
via NachoSoto (@NachoSoto)
* `CI`: add workaround for `Carthage` timing out (#3119) via NachoSoto
(@NachoSoto)
* `Integration Tests`: workaround to not lose debug logs (#3108) via
NachoSoto (@NachoSoto)
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