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 Circle CI for macOS testing #575

Closed
cweagans opened this issue Dec 15, 2017 · 10 comments
Closed

Use Circle CI for macOS testing #575

cweagans opened this issue Dec 15, 2017 · 10 comments

Comments

@cweagans
Copy link
Contributor

What happened (or feature request):

CircleCI now supports building in multiple environments from the same project (https://discuss.circleci.com/t/how-to-use-circleci-for-linux-xcode-in-one-project/693/6). We should consider migrating macOS testing to Circle and deprecate mac surf testing.

What you expected to happen:

How to reproduce this:

Version: Please include the output of ddev version, docker version and the project's .ddev/config.yaml.

Anything else do we need to know:

Related source links or issues:

Please use a complexity rating of 1-5 (5 is high) for a feature request. (High complexity implies more PR planning)

@rfay
Copy link
Member

rfay commented Dec 15, 2017

I certainly support this, it's apparently easy enough to do, just a bit of work to get the circle config working.

My understanding from Circleci support is:

Circleci run both Linux and macOS: With macOS 2.0, you can run both Linux and macOS with the same commit. You need to add a Workflow config with both macos and machine or docker jobs.

@cweagans
Copy link
Contributor Author

Turns out that this still isn't going to work for us. Mac builds on Circle run inside a VM that doesn't support nested virtualization, which means we won't be able to run the Docker for Mac VM inside the Mac VM.

@cweagans cweagans reopened this Dec 21, 2017
@rfay
Copy link
Member

rfay commented Dec 21, 2017

No certainty of course, but the technique in https://circleci.com/docs/2.0/building-docker-images/ may let us use docker on the macos (like 'machine') build machine.

@rfay
Copy link
Member

rfay commented Jan 2, 2018

I took a little visit with this and the setup_remote_docker will absolutely not work for us on macOS, it's only implemented for 'docker' type builds. (However, it has some very interesting potential on Linux testing if we were to move to the 'docker' build type, which could speed up our builds, etc.)

The only remaining path to macOS-on-circleci for ddev with docker is to install docker for mac non-interactively, which I failed at last time I tried. And it may not work anyway, but worth one more effort.

@cweagans
Copy link
Contributor Author

cweagans commented Jan 2, 2018

install docker for mac non-interactively

brew cask install docker is how I do it on my machine. Not sure if it'll work on Circle though.

@rfay
Copy link
Member

rfay commented Jan 2, 2018

I wasn't able to get brew cask install docker do start up after install; I imagine this is just some magic I need to understand. open /Applications/Docker.app doesn't seem to work, probably because we're headless.

@rfay
Copy link
Member

rfay commented Jan 4, 2018

According to docker/for-mac#717 docker has no intention of providing a way to install docker-for-mac without GUI user intervention.

However, discussion in docker/for-mac#882 kind of suggests that /Applications/Docker.app/Contents/MacOS/Docker --unattended could conceivably work.

@rfay
Copy link
Member

rfay commented Jan 4, 2018

I had some success with that, at least manually when ssh-ed into mac build on circleci.

sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended &
Wait for the startup to succeed (When we see "Analytics: Sent eventBackendStarted event.")
sudo chmod 777 /var/root/Library /var/root/Library/Containers
sudo chmod ugo+rw /var/run/docker.sock
docker ps

This could certainly be done with less privileges, just trying for a demonstration of the concept, and it might be close.

@rfay
Copy link
Member

rfay commented Jan 4, 2018

Requested info on the possible arguments over in docker/for-mac#2359

@rfay
Copy link
Member

rfay commented Feb 19, 2018

Closing in favor of #639 - using buildkite and our own machine. This approach is just not a very natural fit for Circleci.

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

No branches or pull requests

2 participants