This is related to an issue reported earlier by other users and ignored and closed:
https://discuss.circleci.com/t/circleci-build-on-macos-is-unusably-slow/14653?u=ego
The problem is when you have a large amount of files in the local project dir. These all have to be sent to the docker daemon as ‘build context’, this can take a long time (especially under hyperkit, but also under virtualbox)
Docker has a solution for this in the form of a .dockerignore file, containing paths to exclude from sending to the daemon.
But the circleci build tool does not seem to make use of the .dockerignore file. I created one but it made no difference. However deleting the unwanted dirs (in my case they were build artefacts so I could just delete them) made it work… no more hanging on the ‘checkout’ step.
So I suggest that the tool should be made to take advantage of .dockerignore file when present.
It would also help if there was some indication of what the tool is actually doing in this phase. Currently it just says:
====>> Checkout code
#!/bin/sh
mkdir -p /home/circleci/project && cp -r /tmp/_circleci_local_build_repo/. /home/circleci/project