0

I am using Bitrise and I have updated both my development machine and bitrise stack to Xcode 11.

When running a build, the Carthage dependencies need to be regenerated and since I am using AWS dependencies, even in my Mac book pro, they take a long time to build and they make the Bitrise build to time out.

Here there is an example on how my bitrise.yml is configured:

...
workflows:
  test:
    steps:
    - gitlab-status:
        run_if: not (enveq "BITRISE_GIT_COMMIT" "")
        inputs:
        - private_token: "$GITLAB_STATUS_TOKEN"
        - preset_status: running
        - api_base_url: https://gitlab.company.cloud/api/v4
    - activate-ssh-key:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone: {}
    - cache-pull:
        inputs:
        - is_debug_mode: 'true'
    - certificate-and-profile-installer: {}
    - carthage:
        inputs:
        - verbose_log: 'yes'
        - carthage_options: "--platform ios --no-use-binaries --cache-builds"
    - cocoapods-install: {}
    - xcode-test:
        inputs:
        - scheme: CompanyApp
        - project_path: CompanyApp.xcworkspace
        - simulator_device: iPhone 8
    - xcode-test:
        inputs:
        - project_path: CompanyApp.xcworkspace
        - simulator_device: iPhone 8
        - scheme: CompanyAppUITests
    - gitlab-status:
        run_if: not (enveq "BITRISE_GIT_COMMIT" "")
        inputs:
        - private_token: "$GITLAB_STATUS_TOKEN"
        - api_base_url: https://gitlab.company.cloud/api/v4
    - cache-push:
        is_always_run: true
        inputs:
        - is_debug_mode: 'true'
    - deploy-to-bitrise-io: {}
...

Just in case, they are the last 2 lines from the build log

*** Building scheme "AWSLogs" in AWSiOSSDKv2.xcodeproj
*** Building scheme "AWSMachineLearning" in AWSiOSSDKv2.xcodeproj

Any ideas???

Reimond Hill
  • 4,278
  • 40
  • 52
  • This is completely opposite than how you should use Carthage, the only reason everything is built to frameworks is to not rebuild it every time, try cocoa pods then. – Lu_ Oct 22 '19 at 08:46
  • Yes, I agree with you. However the .gitignore is not allowing the build frameworks from carthage. I picked this project from another developer. Do you think if if I allow them I won't have this issue? – Reimond Hill Oct 22 '19 at 08:56
  • I thing you should remove that from gitignore and push libraries to repo in this case – Lu_ Oct 22 '19 at 08:58
  • great. thank you very much I am going to try that – Reimond Hill Oct 22 '19 at 09:15
  • @Lu_ After modifying my .gitignore to accept the Carthge/Build made the job. Post it as an answer! – Reimond Hill Oct 30 '19 at 08:31

2 Answers2

2

The solution is to not rebuild libraries in CI, after adding them to repository and skipping build part in CI you will see huge build time decrease.

Lu_
  • 2,577
  • 16
  • 24
0

Try removing --no-use-binaries.

By selecting to not use binaries, large dependencies can't provide you with pre-compiled binaries to greatly decrease compile times. If you remove that flag you should notice that compilation speeds up.

M3nd3z
  • 316
  • 2
  • 12