libgit2 / pygit2

Python bindings for libgit2
https://www.pygit2.org/
Other
1.58k stars 382 forks source link

Add wheel support for musllinux #1266

Closed jimisola closed 5 months ago

jimisola commented 5 months ago

Resolves: https://github.com/libgit2/pygit2/issues/1216

jimisola commented 5 months ago

@jdavid

1) Wheels workflow worked for just musllinux.

See: https://github.com/jimisola/pygit2/actions/runs/7480533793/job/20360154960#step:6:10758

I've turned all combinations back on again and the workflow is running now. It seems to take around 2h10 for it to complete so, I'll have to check it tomorrow:

https://github.com/jimisola/pygit2/actions/runs/7480815724/job/20361072244

2) Tests workflow fails for "[x86_64 (ubuntu-22.04, pypy3.9)]" (and have no idea why - I hope you do).

See: https://github.com/jimisola/pygit2/actions/runs/7480815722/job/20361073118#step:4:1804

=========================== short test summary info ============================
SKIPPED [1] test/test_commit.py:40: skip refcounts checks in pypy
SKIPPED [1] test/test_credentials.py:182: This test may work with a future version of libgit2
SKIPPED [1] test/test_remote.py:206: skip refcounts checks in pypy
SKIPPED [1] test/test_repository.py:549: PyPy doesn't fully support fspath, see https://foss.heptapod.net/pypy/pypy/-/issues/3168
SKIPPED [1] test/test_repository.py:718: PyPy doesn't fully support fspath, see https://foss.heptapod.net/pypy/pypy/-/issues/3168
SKIPPED [1] test/test_repository_bare.py:146: skip refcounts checks in pypy
FAILED test/test_patch.py::test_patch_create_from_bad_old_type_arg - BufferError: object Repository does have the buffer interface (via the __buffer__ method)
FAILED test/test_patch.py::test_patch_create_from_bad_new_type_arg - BufferError: object Repository does have the buffer interface (via the __buffer__ method)
================== 2 failed, 491 passed, 6 skipped in 33.20s ===================
Error: Process completed with exit code 1.

3) If the wheels workflow passes and you have a solution to the failed tests workflow then the following remains:

a. remove musl branchfrom wheels workflow:

  push:
    branches:
    - master
    - musl

b. squash commits upon merge

jimisola commented 5 months ago

Update:

jdavid commented 5 months ago

I've re-run an old job and it fails as well, https://github.com/libgit2/pygit2/actions/runs/7480816047

Apparently there's a change in Pypy 7.3.14 that is the source of this failure. Since it's is unrelated to this PR it won't block it.

Just remove the commented out lines, remove the musl branch from wheels workflow, rebase and squash. And I will merge it.

jimisola commented 5 months ago

I've re-run an old job and it fails as well, https://github.com/libgit2/pygit2/actions/runs/7480816047

Apparently there's a change in Pypy 7.3.14 that is the source of this failure. Since it's is unrelated to this PR it won't block it.

Just remove the commented out lines, remove the musl branch from wheels workflow, rebase and squash. And I will merge it.

Fixed. Ready for merge.

For planning purposes, when do you think that there will be a new release with musllinux wheel support?

Thanks for a great project.

jdavid commented 5 months ago

@jimisola Soon after CI is green again, but don't know when the Pypy error will be fixed.

jimisola commented 5 months ago

@jimisola Soon after CI is green again, but don't know when the Pypy error will be fixed.

Ok. Thanks. Is there an issue a pypy that one can follow?

jdavid commented 5 months ago

Apparently this has been fixed in latest version, PyPy v7.3.15

But the wheels now take a lot more time to build. To reduce the time we can:

What do you actually need?

jimisola commented 5 months ago

Great. I think it's enough for us with what you've listed, but just let me double-check and get back to you.

And yes, I noticed that wheels take a lot longer. Is that an actual problem - built-time and/or CI/CD minutes? I mean there might be other users that have other needs in terms of arch and python version. It might not be obvious for them that they can ask for those to be turned on.

jimisola commented 5 months ago

@jdavid Let's go with your suggestion: x86_64 and Python, 3.12 and 3.11

jimisola commented 5 months ago

@jdavid Did you see this? Should improve execution time a bit.

https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

jdavid commented 5 months ago

Release done. Finally I only dropped the wheels for aarch64, that's what takes most time.

jimisola commented 5 months ago

Great. Thanks for accepting the PR and the continued work with it.