Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Migrate CI tests from TravisCI to CircleCI - #9051

Merged
kkaefer merged 2 commits into
masterfrom
migrate-to-circleci
Jun 22, 2017
Merged

kkaefer merged 2 commits into
masterfrom
migrate-to-circleci

Conversation

@brunoabinader

@brunoabinader brunoabinader commented May 19, 2017 •

Copy link
Copy Markdown
Contributor

Uses docker images from https://hub.docker.com/r/mbgl/ci/ and CircleCI workflows to migrate the jobs from TravisCI into CircleCI for improved test runtime and flexibility given by docker.

TODO:

Part of #8551.

@brunoabinader brunoabinader added build ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels May 19, 2017
Comment thread scripts/circle_setup.sh
export PATH="`python -m site --user-base`/bin:${PATH}"

# Install coveralls gem
gem install coveralls-lcov --no-rdoc --no-ri

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should move all of these installs into the docker image so we don't have to install it every time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread scripts/circle_helper.sh Outdated
export -f mapbox_nanoseconds
export -f mapbox_time
export -f mapbox_time_start
export -f mapbox_time_finish

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No real need in the final change - I've added this in the beginning to speed up the initial migration efforts - we can totally get rid of this 👍

Comment thread scripts/circle_helper.sh Outdated
:
}

export JOBS=${CIRCLE_NODE_TOTAL:-6}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

CIRCLE_NODE_TOTAL refers to the concurrently running nodes per build, not to thread concurrency.

@brunoabinader brunoabinader May 19, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes - in that case we can just use export JOBS=${JOBS:-6}.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes - in that case we can just use export JOBS=${JOBS:-6}.
These are not needed at all in the end - JOBS is now exported from circle.yml.

@kkaefer

kkaefer commented May 19, 2017

Copy link
Copy Markdown
Member

I'm skeptical about file caching, in particular for npm/mason: Circle's connectivity is excellent, and we wouldn't gain much storing these to S3.

For ccache: This might be viable; Circle has some built-in caching features: https://circleci.com/docs/2.0/configuration-reference/#save_cache

@friedbunny

Copy link
Copy Markdown
Contributor

CircleCI’s connectivity may be top notch, but we’re already seeing issues, as in this build where basic Android downloads failed:

> Could not resolve com.android.tools:repository:25.3.1.
  > Could not get resource 'https://jcenter.bintray.com/com/android/tools/repository/25.3.1/repository-25.3.1.pom'.
    > Could not GET 'https://jcenter.bintray.com/com/android/tools/repository/25.3.1/repository-25.3.1.pom'. Received status code 500 from server: Internal Server Error

@kkaefer

kkaefer commented May 23, 2017

Copy link
Copy Markdown
Member

@friedbunny A server error 500 indicates that the issue is with Bintray, not with Circle's connectivity? Based on the error code I believe that the same error would've happened on Bitrise/Travis as well.

@friedbunny

Copy link
Copy Markdown
Contributor

@kkaefer Right, but if we’re considering caching remote packages (or building them into docker images) presumably we could partially mitigate unreliable dependency hosts?

@brunoabinader
brunoabinader force-pushed the migrate-to-circleci branch 15 times, most recently from 655f423 to 9c7a924 Compare May 26, 2017 08:11
@brunoabinader

Copy link
Copy Markdown
Contributor Author

Machine executor type - needed for properly setting up logbt - is turning out as very tricky: You cannot run these locally, so every test attempt has to be done using CircleCI infrastructure. Also, all the steps (including checkout) are done manually inside the docker image.

We could avoid running the steps manually by using circleci script inside the docker images, but unfortunately circleci script does not provide means of using --privileged. We could suggest CircleCI team to add support for this, but this probably will take some time to appear.

Another suggestion is to request CircleCI team to special-case acess to /proc/sys/kernel/core_pattern (needed by logbt). But again, this is something that might take some time to appear.

The affected builds are:

  • node4-clang39-release
  • node6-clang39-release
  • node6-clang39-debug

I'd suggest for us to keep them running on TravisCI until we resolve this - thoughts @kkaefer @springmeyer?

@brunoabinader
brunoabinader force-pushed the migrate-to-circleci branch 4 times, most recently from d68497e to 9d82980 Compare May 26, 2017 13:51
@brunoabinader
brunoabinader force-pushed the migrate-to-circleci branch 4 times, most recently from b6bc9ca to 7b34744 Compare May 26, 2017 14:49
@springmeyer

Copy link
Copy Markdown
Contributor

nother suggestion is to request CircleCI team to special-case acess to /proc/sys/kernel/core_pattern (needed by logbt).

Per chat I think this would be the ideal approach - since it would benefit lots of other repos and make this setup work on docker out of the box 👍

@brunoabinader
brunoabinader force-pushed the migrate-to-circleci branch 2 times, most recently from e72d830 to b2188ce Compare May 29, 2017 07:44
@brunoabinader

Copy link
Copy Markdown
Contributor Author

I was not able to reproduce the error from https://circleci.com/gh/mapbox/mapbox-gl-native/3776 locally:

ninja: error: build.ninja:2978: expected '=', got ':'
apitrace: loaded into /usr/bin/git
        ^ near here
apitrace: unloaded from /src/platform/linux/ninja
Makefile:352: recipe for target 'node' failed
make: *** [node] Error 1
apitrace: unloaded from /usr/bin/make
[logbt] saw 'apitrace' exit with code:2 (INT)
[logbt] No corefile found at /tmp/logbt-coredumps/core.1290.*
Exited with code 2

Inside build.ninja, nothing seems to be wrong on line 2978:

build CMakeFiles/mbgl-core.dir/src/mbgl/util/version.cpp.o: CXX_COMPILER__mbgl-core ../../../src/mbgl/util/version.cpp

This makes me wonder this could be an OOM issue masked as something else - makes sense if we consider we're using logbt + apitrace together on a debug build.

@brunoabinader
brunoabinader force-pushed the migrate-to-circleci branch from b2188ce to d3496a7 Compare May 30, 2017 08:23
@kkaefer kkaefer added the Core The cross-platform C++ core, aka mbgl label May 30, 2017
@brunoabinader
brunoabinader force-pushed the migrate-to-circleci branch from d3496a7 to 36dcde0 Compare May 30, 2017 08:44
@brunoabinader brunoabinader added ✓ ready for review and removed ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold labels May 30, 2017

@jfirebaugh jfirebaugh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is awesome.

@kkaefer
kkaefer force-pushed the migrate-to-circleci branch from d4f20c8 to a7536e6 Compare June 22, 2017 17:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

build Core The cross-platform C++ core, aka mbgl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants