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

macOS Wheels #988

Merged
merged 2 commits into from
Mar 13, 2020
Merged

macOS Wheels #988

merged 2 commits into from
Mar 13, 2020

Conversation

rcoup
Copy link
Contributor

@rcoup rcoup commented Mar 13, 2020

Add macOS wheels into CI, using Github Actions macOS support.

  • Built against Python 3.6, 3.7, 3.8 using the Python.org distributions, which means wheels are compatible with macOS 10.9+.
  • Wheels run through delocate to embed libgit2
  • Unit tests run/pass against the wheels
  • Caches things fairly heavily, so total rebuild time is normally 2-3mins.
  • Wheels are saved as artifacts, and are downloadable for 90 days.

Libgit2

Builds against maint/v0.99 to match appveyor & travis, but it's configured as a matrix so can easily test against releases/branches/etc if appropriate. Not sure if we should be doing a "release" build -DCMAKE_BUILD_TYPE=Release (or RelWithDebugInfo), but it matches the other environments atm.

Python 3.5

This was in the plan, but I think the Python.org 3.5.4 release was built using an old version of GCC instead of Clang, and it's not in the CI environment by default. I can dig further, or switch to the build of Py3.5 used by GH Actions (which is macOS 10.13+ only), or we just leave it out.

PyPi

Haven't set it up to push to PyPi on release tags, but that's easily done using eg: gh-action-pypi-publish once secrets are configured.

On macOS, mkdtemp() returns a not fully-resolved path
3.5 is broken in some important ways — seems to want specific GCC version and TLS is b0rked for pip & setuptools
@jdavid jdavid merged commit 2952ec5 into libgit2:master Mar 13, 2020
@jdavid
Copy link
Member

jdavid commented Mar 13, 2020

I think we can leave out Python 3.5, probably we will drop support for it this year.

Thanks!

@rcoup rcoup deleted the macos-wheels branch March 13, 2020 12:27
@jdavid jdavid mentioned this pull request Mar 21, 2020
LIBGIT2: "${{ github.workspace }}/libgit2/env"
LDFLAGS: "-Wl,-rpath,'${{ github.workspace }}/libgit2/env/lib'"
run: |
python3 setup.py bdist_wheel
Copy link
Contributor

Choose a reason for hiding this comment

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

FTR the recommended way of doing this is something like pip wheel --no-deps -w dist .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same outcome though afaik?

libgit2: ['maint/v0.99']
py:
- ver: '3.6'
release: '3.6.8' # last Python.org binary release
Copy link
Contributor

Choose a reason for hiding this comment

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

FTR here's a way to select the concrete "patch" version intelligently: https://github.com/amol-/dukpy/blob/54699a3/.travis.yml#L56-L109

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks - I need to select the last version available as a binary release from Python.org, not the latest patch version though. I don’t understand why they’re not built automatically, but they’re not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, re-reading, it does that, yes! Not sure it’s a big deal for us atm - we’re not typically using cutting edge CPython features

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep. Sometimes they release 3.6.8 for Linux, but stop at 3.6.6 for macOS. so this is something that my script accounts for. But yes, it shouldn't matter much. OTOH when you do exit-checks after the build but before publishing the artifacts, it may make sense to run tests on the recent version.

/me needs to find time and contribute that to cimultibuild...

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.

None yet

3 participants