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

[DO NOT MERGE] Try to use docker with macOS on GitHub CI #1143

Closed
wants to merge 4 commits into from

Conversation

marcofavorito
Copy link
Collaborator

@marcofavorito marcofavorito commented Jul 31, 2022

Proposed changes

This PR aims at restoring Docker-based tests on macOS runner on GitHub CI.

Unfortunately, Docker is not installed by default on macOS runners due to licensing issues: https://github.com/orgs/community/discussions/25777#discussioncomment-3249229

To install Docker from the macOS shell, there exist this shell snippet: actions/runner#1456 (comment). The only problem is that it takes more than 3 minutes to make docker binary available and executable.

Fixes

n/a

Types of changes

What types of changes does your code introduce? (A breaking change is a fix or feature that would cause existing functionality and APIs to not work as expected.)
Put an x in the box that applies

  • Non-breaking fix (non-breaking change which fixes an issue)
  • Breaking fix (breaking change which fixes an issue)
  • Non-breaking feature (non-breaking change which adds functionality)
  • Breaking feature (breaking change which adds functionality)
  • Refactor (non-breaking change which changes implementation)
  • Messy (mixture of the above - requires explanation!)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I am making a pull request against the main branch (left side). Also you should start your branch off our main.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have locally run services that could be impacted and they do not present failures derived from my changes

Further comments

n/a

Comment on lines +259 to +264
# install docker (macOS specific)
HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask docker
sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components
open -a /Applications/Docker.app --args --unattended --accept-license
echo "We are waiting for Docker to be up and running. It can take over 2 minutes..."
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
Copy link
Collaborator Author

@marcofavorito marcofavorito Jul 31, 2022

Choose a reason for hiding this comment

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

this is the original shell code snippet (actions/runner#1456 (comment)) to install Docker on macOS runner.

I would like to improve the last while-loop to have a maximum number of iterations; otherwise it might loop forever (or at the maximum allowed time as per CI configuration).

@marcofavorito
Copy link
Collaborator Author

@DavidMinarsch DavidMinarsch changed the title Try to use docker with macOS on GitHub CI [DO NOT MERGE] Try to use docker with macOS on GitHub CI Aug 19, 2022
@DavidMinarsch DavidMinarsch marked this pull request as draft August 19, 2022 15:42
@DavidMinarsch DavidMinarsch deleted the fix/macos-docker branch September 16, 2022 11:51
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

Successfully merging this pull request may close these issues.

2 participants