Repository navigation
[ios, macos, build] Add CircleCI iOS & macOS builds - #10257
Conversation
| destination: scan-logs-build | ||
| - &upload-ios-test-log | ||
| store_artifacts: | ||
| path: ~/Library/Logs/scan |
There was a problem hiding this comment.
This is the same path as above?
There was a problem hiding this comment.
The build and test steps are separated, but output logs to the same path with the same name. There’s not a mechanism to have the files named differently (and the second would overwrite the first), so they’re copied from the same source folder to differently named artifacts folders.
There was a problem hiding this comment.
I agree that this is inelegant — maybe having a step that renames the logs would be better.
| save_cache: | ||
| key: 'v3/{{ .Environment.CIRCLE_JOB }}/{{ arch }}/{{ .Branch }}/{{ checksum ".circle-week" }}' | ||
| paths: [ "node_modules", "/root/.ccache", "mason_packages/.binaries" ] | ||
| paths: [ "node_modules", "/root/.ccache", "~/.ccache", "mason_packages/.binaries" ] |
There was a problem hiding this comment.
I guess we could also export CCACHE_DIR=/root/.ccache in the iOS CI jobs instead of adding this.
There was a problem hiding this comment.
Thanks, I’ll look into that. /root may not exist or may have permissions issues on macOS... 🤔
There was a problem hiding this comment.
I tried this and:
- We’d have to export the cache path for every macOS-based job — it’s not enough to do this in a step, it has to be global for the job.
- We’d have to create the
/root/.ccachedirectory withsudoand give it proper permissions (or do something similar with a symlink).
I think we should just leave it as-is, saving/restoring both possible ccache paths. Caches aren’t shared across platforms and a non-existent path doesn’t break the save/restore steps.
|
I added a macOS build that runs the core and platform unit tests — cold build is ~10 minutes, cached is ~5 minutes. I don’t have immediate plans to port the Node and Qt builds from Bitrise (as I’m not very familiar with them), but maybe that’s something @brunoabinader would like to look into doing? 🙇 Those are the last two remaining regular gl-native builds that run on Bitrise, after this PR. |
1885677 to
9deb1a3
Compare
|
I think this is ready to merge.
We will need to keep Bitrise available in this repo until all branches no longer need it and the remaining platforms and nightly builds have been migrated. |
|
Ticket for CircleCI Node & Qt macOS builds 👉 #10278 |
9deb1a3 to
1c78d14
Compare
|
The three new CircleCI builds — If you find that your PR fails to start these tests: rebase onto /cc @mapbox/android @mapbox/gl-core |
Failures you might encounterUnexpected preparation errorCircleCI 2.0 macOS seems to have some issues starting up builds. You may see a build fail and auto-retry multiple times before it starts installing our stuff. GitHub and CircleCI may report a build in this state as “failed”, but if you allow it to run and it passes, the state will be updated appropriately. ... or the bigger sibling: Remediation: let it auto-retry and build (even if it says “failed”); rebuild if it appears stalled. Failed to download dependenciesYou may see dependencies explicitly fail to download or, worse, silently fail to download and then be missing later. Remediation: rebuild. |
|
Heard from CircleCI support that “Unexpected preparation error” failures should be fixed — LMK if anyone continues to see them. |
Follows up on #8551 & #9051 and adds iOS & macOS tests to CircleCI. A new branch takes about 8-9 minutes to finish running these tests, while a cached build can take 4-5 minutes.
This does not yet replace Bitrise and these builds will not be marked, but that’s the end goal after some period of validation.requiredAdds
threefour builds, currently all using Xcode 9.0.x and iOS 11.x/macOS 10.13.x:ios-debug: Debug build that runs unit tests on a single iPhone 7 simulator. Replaces the Bitrise iOS build.ios-sanitize-address: Same, but with the address sanitizer enabled. Fairly slow and currently times out a few tests —will probably disable this,disabled this until tests can be adjusted.ios-sanitize-thread: Same, but with the thread sanitizer enabled. Seems about as fast/reliable as without.macos-debug: Debug build that runs core and macOS unit tests. Replaces the Bitrise macOS build.You can see these builds for this branch here: https://circleci.com/gh/mapbox/mapbox-gl-native/tree/fb-circleci-agua
Selected benefits
Notes
Unexpected preparation error: Process exited with status 1) and then automatically retry. This initially appears as a failure, but then later reports its actual status when the retry has completed.Questions
/cc @mapbox/ios @kkaefer @brunoabinader