Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1795 commits
Select commit Hold shift + click to select a range
b45abea
add ppc64le manylinux wheels
gotmax23 Feb 28, 2024
a8f6d1b
Add ruff configuration
xen0n Mar 4, 2024
1a9947a
Format the whole repository with ruff
xen0n Mar 4, 2024
fcc78a9
Add a CI job to enforce code style
xen0n Mar 4, 2024
2d04896
Don't build powerpc wheels for musl
jdavid Mar 4, 2024
67ea2a3
Merge remote-tracking branch 'xen0n/ruff-ci'
jdavid Mar 5, 2024
be6945c
Remove setuptools runtime dependency on Python 3.12+
wimglenn Mar 13, 2024
bbddee6
Relax transfer bytes check even more
nphilipp Mar 18, 2024
6d539d7
Upgrade to libgit2 v1.8.0
jdavid Mar 21, 2024
3eba911
Fix CI
jdavid Mar 21, 2024
c7c65cf
Fix leaks in fetch_refspecs and push_refspecs
jdavid Mar 24, 2024
9bdbfe6
Remove some deprecated code
jdavid Mar 24, 2024
95bbd1f
Remove more deprecated code
jdavid Mar 25, 2024
3c5ac56
Remove deprecated oid.hex, use str(oid)
jdavid Mar 25, 2024
6b2eb38
ruff check/format in test directory
jdavid Mar 25, 2024
88580c2
Add and use StrArray.ptr()
kempniu Mar 27, 2024
7fa10a9
Add StrArray.assign_to()
kempniu Mar 27, 2024
34b6875
Add support for push options
kempniu Mar 27, 2024
8698989
Update Changelog
jdavid Mar 27, 2024
3a044d8
Remove deprecated obj.hex, use str(obj.id)
jdavid Mar 28, 2024
d210edf
ruff format
jdavid Mar 28, 2024
1af76c3
Support comparison of Oid with text string
jdavid Mar 28, 2024
d71f980
Deprecate IndexEntry.hex
jdavid Mar 28, 2024
730414b
Remove deprecated Object.oid
jdavid Mar 29, 2024
ea97961
Removing usage of deprecated Py_FileSystemDefaultEncoding
jdavid Mar 29, 2024
31aea66
Remove usage of deprecated Py_FileSystemDefaultEncoding
jdavid Mar 30, 2024
00b04be
Remove unused code
jdavid Mar 30, 2024
b248587
Fix CheckoutNotify.IGNORED
jdavid May 3, 2024
31ea782
Update to libgit2 1.8.1
jdavid May 17, 2024
dabd40c
Update to libgit2 1.8.1
jdavid May 17, 2024
0fca184
CI use macos-12
jdavid May 18, 2024
facaf22
Release 1.15.0
jdavid May 18, 2024
7bed9d2
Fix docstring/type annotation for DiffDelta.status
jorio May 24, 2024
db91340
Don't raise RuntimeError if git_submodule_url returns NULL
jorio May 24, 2024
ae489f0
Fix Submodule.open() if parent repo is instance of Repository subclass
jorio May 25, 2024
85bb84b
Submodules: Add fetch depth options
jorio May 25, 2024
2538735
Merge remote-tracking branch 'jorio/submodule-open-from-repo-subclass'
jdavid May 25, 2024
1a8442d
Merge remote-tracking branch 'jorio/submodule-fetch-depth'
jdavid May 25, 2024
584bda3
Add Repository.revert()
jorio May 28, 2024
7bea492
Don't decref PyBytesObject before formatting an error with it
jorio Jun 2, 2024
a9c7cce
Fix Submodule.head_id if submodule isn't in superproject HEAD tree
jorio Jun 3, 2024
5b27dee
Do not access freed memory in test_push_options()
kempniu Jun 10, 2024
e104528
Update changelog
jdavid Jul 6, 2024
511ccd9
CI: update cibuildwheel
jdavid Jul 6, 2024
8427c85
Release 0.15.1
jdavid Jul 7, 2024
7077d21
Update sponsors list
jdavid Jul 7, 2024
b810d9a
add py.typed (#1310)
Goldziher Jul 15, 2024
3af4eba
Add Repository.hashfile()
jorio Jun 2, 2024
01d8296
Repository.hashfile(): Demonstrate workaround for libgit2#6825 on Win…
jorio Jul 21, 2024
e19ea4d
Expose MWINDOW_FILE_LIMIT options from libgit2
Jul 30, 2024
949b1c6
Review options
jdavid Jul 31, 2024
12f6c35
* fixed discover_repository type annotation it return None incase no …
OrHayat Aug 8, 2024
d8af938
Test Python 3.13
jdavid Jul 17, 2024
9c79d3c
Add support for Python 3.13 and drop 3.9
jdavid Aug 17, 2024
6f06cba
CI: update upload/download artifact
jdavid Aug 19, 2024
923cfaa
Update for Python 3.13
jdavid Oct 9, 2024
30d49bf
Fix certificate check callback
sathieu Oct 10, 2024
bedf899
Update changelog
jdavid Oct 10, 2024
0c2af70
Release 1.16.0
jdavid Oct 11, 2024
2b57949
Update libgit2, libssh2, openssl
jdavid Nov 5, 2024
eba710e
fix: use correct type of the ninth parameter of git_commit_create()
mcepl Nov 5, 2024
4a50299
feat: add certificate_check callback to ls_remotes
kevinvalk Nov 21, 2024
8f3dec8
Typo in repository.c (#1327)
johannkm Nov 26, 2024
e75219d
Upgrade to libgit2 1.9
jdavid Dec 30, 2024
7f143e1
Fix tests with Python 3.13
jdavid Dec 30, 2024
bbecec0
CI wheels fix macOS
jdavid Dec 30, 2024
d8a673c
CI tests: clarify jobs
jdavid Dec 31, 2024
0fcb6da
workflows/tests: update macos job
chenrui333 Jan 2, 2025
a1e7ca4
Update changelog
jdavid Jan 3, 2025
c229dfd
Downgrade OpenSSL back to 3.2.3
jdavid Jan 3, 2025
7154c1b
Update pyproject.toml - do not skip pp3
Spitfire1900 Jan 3, 2025
ae9514c
Explicitly build PyPy wheels - cibuildwheel 2.21.3 -> 2.22.0 (#1339)
Spitfire1900 Jan 6, 2025
f362f1d
CI: cibuildwheel 3 will require Python 3.11+
jdavid Jan 7, 2025
a011e26
Release 1.17.0
jdavid Jan 8, 2025
d224940
Fix condition check for current remote name in rename method (#1342)
ktpa Jan 17, 2025
1b806f5
maybe_string dealing with non-unicode strings
wschuell Nov 27, 2024
43bbe11
Make ruff happy and update mailmap
jdavid Jan 17, 2025
eff9734
test_nonunicode xfails in in macOS/Windows
jdavid Jan 18, 2025
ff414d5
It looks like pypy supports fspath already
jdavid Jan 18, 2025
17496fd
Add github action to codespell master on push and PRs
yarikoptic Jan 30, 2025
4b58f5f
Add rudimentary codespell config
yarikoptic Jan 30, 2025
0c56228
Fix some ambigous typos
yarikoptic Jan 30, 2025
2ce74eb
More name ignores for codespell
yarikoptic Jan 30, 2025
08b2b40
[DATALAD RUNCMD] run codespell throughout fixing few left typos autom…
yarikoptic Jan 30, 2025
91efd23
Test CheckoutCallbacks.checkout_progress
jorio Feb 1, 2025
3d02993
Add RemoteCallbacks.push_transfer_progress
jorio Feb 1, 2025
7bccdff
Rewrite test_push_options without mocking RemoteCallbacks
jorio Feb 1, 2025
47ca99a
CI: Run tests on a real ARM runner
jorio Feb 1, 2025
0f54268
Merge remote-tracking branch 'jorio/push_transfer_progress'
jdavid Feb 1, 2025
711a439
CI: build wheels on a real ARM runner
jdavid Feb 1, 2025
5454758
Upgrade to manylinux_2_28
jdavid Feb 2, 2025
2340215
Add Oid.__bool__
jorio Feb 7, 2025
6e4b3a8
Docs: Clarify oid.raw, str(oid), remove reference to Python 2
jorio Feb 7, 2025
c46ab08
Type stubs: Remove outdated Oid.hex
jorio Feb 7, 2025
8c080cd
Merge: Annotate commit from Reference
jorio Feb 7, 2025
f0f1e97
Merge remote-tracking branch 'jorio/merge-annotate-from-ref'
jdavid Feb 8, 2025
b1a54e0
Update Changelog
jdavid Feb 8, 2025
8810e4c
Deprecate passing str to Repository.merge
jorio Feb 8, 2025
12c575e
ruff check
jdavid Feb 15, 2025
eba0249
CI: get back PowerPC wheels
jdavid Feb 1, 2025
6a4192a
More typing
sathieu Jan 28, 2025
d0879d8
Update changelog
jdavid Feb 16, 2025
de2b4e5
Enable multi-threaded pack file creation
kempniu Feb 17, 2025
84310f3
ruff check
jdavid Feb 25, 2025
c4b9c2e
Re-add _cache_enums
sathieu Mar 6, 2025
db587ad
Add proxy option to clone_repository
sathieu Mar 6, 2025
4c3c551
doc: warn against using init_repository() to open a repository.
adrien-n Mar 18, 2025
212cae3
Update Changelog
jdavid Mar 19, 2025
e209584
Update tests.yml - bump run-on-arch to v3
clintonsteiner Apr 15, 2025
044e30e
repository - diff blobs: consider the values of context_lines and int…
eantoranz Apr 18, 2025
19e614f
Merge remote-tracking branch 'eantoranz/diff_blob_context_lines'
jdavid Apr 23, 2025
89c7515
Rename flag to flags in Blob's diff/diff_to_buffer
jdavid Apr 23, 2025
accc0a6
ci: bump wheel and lint workflows to 3.13 - tested version
clintonsteiner Apr 15, 2025
778c13e
Release 1.18.0
jdavid Apr 24, 2025
894a4dc
Fix type annotations for clone_repository
s-hamann May 2, 2025
293bd9a
stub - remove deprecated and removed Object.hex and Object.oid
Andrej730 May 3, 2025
8a4c4cb
export symbols using `__all__` to avoid typing errors
Andrej730 May 3, 2025
1ae5088
Revert "export symbols using `__all__` to avoid typing errors"
Andrej730 May 5, 2025
dc634cd
list all previously imported symbols in __all__ (411 symbols)
Andrej730 May 5, 2025
f02dce2
Categorize __all__ symbols
Andrej730 May 5, 2025
14c60e1
Merge remote-tracking branch 'Andrej730/define-all'
jdavid May 7, 2025
fdb927e
stub - fix issues with literal types
Andrej730 May 5, 2025
b84c912
Update to libgit2 1.9.1
jdavid Jun 9, 2025
eb876ee
Update OpenSSL to 3.3
jdavid Jun 10, 2025
588f48a
index - Add remove_directory
amcn Jun 11, 2025
c4fc955
Update cibuildwheel
jdavid Jun 17, 2025
bc0cf9f
Repository: get an instance of MergeFileResult from git_merge_file_fr…
eantoranz Jun 22, 2025
823af24
Improve typing: add References to Repository
BenediktSeidl Jul 12, 2025
4b3f85d
Improve typing: add RemotesCollection to Repository
BenediktSeidl Jul 13, 2025
375f238
Improve typing: add Branches to Repository
BenediktSeidl Jul 13, 2025
42e835f
Update changelog
jdavid Jul 16, 2025
81cdaf0
index: map git_index_conflict_add
eantoranz Jun 25, 2025
59bda2e
Simplify: do not cache Index.conflicts
jdavid Jul 19, 2025
62bf134
Improve readability of test_add_conflict
jdavid Jul 19, 2025
867a065
test_add_conflict xfail in macos
jdavid Jul 19, 2025
570cdef
improve typing: add constants
BenediktSeidl Jul 17, 2025
0df1e17
typing: submodules
BenediktSeidl Jul 18, 2025
0e95587
fix and silence typing in repository
BenediktSeidl Jul 21, 2025
650141d
fix mypy issue in pygit2/filter.py
BenediktSeidl Jul 22, 2025
5911b0c
typing: ignore some errors
BenediktSeidl Jul 22, 2025
4503f5a
fix typing in pygit2/blob.py
BenediktSeidl Jul 22, 2025
7fbdc1d
fix typing in pygit2/__init__.py
BenediktSeidl Jul 22, 2025
1978e14
add mypy ci step
BenediktSeidl Jul 22, 2025
ffe28ac
Release 1.18.1
jdavid Jul 26, 2025
6569d66
fix typing in test folder
BenediktSeidl Jul 23, 2025
a59944b
improve types according to test/test_submodule.py
BenediktSeidl Jul 23, 2025
7528441
improve types according to tests/test_apply_diff.py
BenediktSeidl Jul 23, 2025
f40d129
improve types according to test/test_archive.py
BenediktSeidl Jul 23, 2025
11f9a67
imporve types accoding to test/test_attributes.py
BenediktSeidl Jul 24, 2025
0d7e6f9
improve type according to test/test_blame.py
BenediktSeidl Jul 24, 2025
58d1271
create type interface for _libgit2.ffi
BenediktSeidl Jul 26, 2025
3955534
sort imports with "ruff check --select I --fix"
BenediktSeidl Jul 26, 2025
41a76dd
make sure imports stay sorted
BenediktSeidl Jul 26, 2025
dc1c22c
fix create branch example in docs
BenediktSeidl Jul 26, 2025
35ba6fd
Merge remote-tracking branch 'BenediktSeidl/typing-3'
jdavid Jul 27, 2025
b9a10be
improve types according to test/test_blob.py
BenediktSeidl Jul 26, 2025
992c6e1
fix typing in test_branch_empty.py
BenediktSeidl Jul 26, 2025
b84bc40
improve types according to test/test_branch.py
BenediktSeidl Jul 26, 2025
4dcfc88
improve types according to test/test_cherrypick.py
BenediktSeidl Jul 26, 2025
5ad2487
improve types according to test/test_commit.py
BenediktSeidl Jul 26, 2025
efc112a
improve types according to test/test_commit_gpg.py
BenediktSeidl Jul 26, 2025
8ec1937
fix typing in test/test_commit_trailer.py
BenediktSeidl Jul 26, 2025
25c98a8
improve types according to test/test_config.py
BenediktSeidl Jul 26, 2025
99b1c68
add types to test/test_credentials.py
BenediktSeidl Jul 26, 2025
dce6c0d
improve types according to test/test_describe.py
BenediktSeidl Jul 27, 2025
b30c1a7
improve types according to test/test_describe.py
BenediktSeidl Jul 27, 2025
79283f5
Update cibuildwheel
jdavid Jul 28, 2025
aec06dd
improve types according to test/test_diff.py
BenediktSeidl Jul 27, 2025
dac8cfb
improve types according to test/test_filter.py
BenediktSeidl Jul 27, 2025
548f6a7
improve types according to test/test_index.py
BenediktSeidl Jul 28, 2025
1cb902a
improve types according to test/test_mailmap.py
BenediktSeidl Jul 29, 2025
7e0f891
improve types according to test/test_merge.py
BenediktSeidl Jul 29, 2025
f9289da
Merge remote-tracking branch 'BenediktSeidl/typing-5'
jdavid Jul 29, 2025
51d0cac
improve types according to test/test_nonunicode.py
BenediktSeidl Jul 29, 2025
5c57a7f
improve types according to test/test_note.py
BenediktSeidl Jul 29, 2025
285b82a
improve types according to test/test_object.py
BenediktSeidl Jul 29, 2025
0b93aab
improve types according to test/test_odb.py
BenediktSeidl Jul 29, 2025
5424d2c
add types to test/test_odb_backend.py
BenediktSeidl Jul 29, 2025
197cf81
add types to test/test_oid.py
BenediktSeidl Jul 30, 2025
551af8d
improve types according to test/test_options.py
BenediktSeidl Jul 30, 2025
6a4e860
improve types according to test/test_packbuilder.py
BenediktSeidl Jul 30, 2025
e7f0d4b
add types to test/test_patch_encoding.py
BenediktSeidl Jul 30, 2025
ab2a5fe
add types to test/test_patch.py
BenediktSeidl Jul 30, 2025
f8d9a05
improve types according to test/test_refdb_backend.py
BenediktSeidl Jul 31, 2025
edcccfc
improve types according to test/test_refs.py
BenediktSeidl Jul 31, 2025
fb0bfd7
improve types according to test/test_remote.py
BenediktSeidl Jul 31, 2025
cf67fab
improve types according to test/test_remote_prune.py
BenediktSeidl Jul 31, 2025
876b755
add types to test/test_remote_utf8.py
BenediktSeidl Jul 31, 2025
4dd179d
improve types according to test/test_repository.py
BenediktSeidl Jul 31, 2025
fc93657
improve types according to test/test_repository_bare.py
BenediktSeidl Aug 1, 2025
49d32f3
improve types according to test/test_signature.py
BenediktSeidl Aug 1, 2025
79a7de5
add types to several test files
BenediktSeidl Aug 1, 2025
51814a9
improve types according to test/test_tree.py
BenediktSeidl Aug 1, 2025
5d1f6c5
add types to test/utils.py
BenediktSeidl Aug 1, 2025
69dd9f4
mypy: enable disallow_untyped_defs for test folder
BenediktSeidl Aug 1, 2025
468f196
mypy: enable disallow_untyped_calls for test folder
BenediktSeidl Aug 1, 2025
6028542
move types for References to implementation
BenediktSeidl Aug 1, 2025
e433a4c
typing: References.get can return None
BenediktSeidl Aug 1, 2025
58270d3
needed to add type ignores
BenediktSeidl Aug 2, 2025
e08390d
add types to Remote
BenediktSeidl Aug 2, 2025
46c8425
move types for RemoteCollection to implementation
BenediktSeidl Aug 2, 2025
7c0831f
add types for _ffi_names in RemoteCollection
BenediktSeidl Aug 2, 2025
fa8a0e9
move types for Branches to implementation
BenediktSeidl Aug 2, 2025
2af4bb2
explicitly import from ._pygit2
BenediktSeidl Aug 2, 2025
9efa238
move types for Repository to implementation
BenediktSeidl Aug 2, 2025
80f815e
Add RemoteCallbacks.push_negotiation
jorio Aug 4, 2025
d7b67e4
Allow bypassing automatic connection in Remote.ls_remotes()
jorio Aug 4, 2025
93bbff7
Improve usability of Remote.ls_remotes's result
jorio Aug 5, 2025
6caa06d
RemoteHead.loid is Oid zero if not available locally
jorio Aug 5, 2025
ddceff9
Fix the first stage of mypy stricter errors
kbaikov Aug 5, 2025
0947a21
Add ignores to setup.py
kbaikov Aug 5, 2025
2a57752
Introduce stricter mypy options
kbaikov Aug 5, 2025
7cfc651
Instrument git_submodule_set_url.
nrybowski Aug 4, 2025
45b4091
Merge remote-tracking branch 'nrybowski/submodule_set_url'
jdavid Aug 6, 2025
1d9d0be
Use modern python syntax for types and others
kbaikov Aug 6, 2025
44bac2e
Add types-cffi to test requirements
kbaikov Aug 7, 2025
2932e12
Fix mypy no implicit reexports errors
kbaikov Aug 7, 2025
ff66108
Fix mypy untyped decorators error
kbaikov Aug 7, 2025
bc42a5a
Fix part of mypy disallow_any_generics
kbaikov Aug 8, 2025
ecd6ff2
Fix some more mypy disallow_untyped_calls
kbaikov Aug 9, 2025
9d7df46
Move option handling to CFFI
ambv Aug 11, 2025
e035a87
Implement not implemented options
ambv Aug 11, 2025
cfd7d94
Fix nits I noticed
ambv Aug 11, 2025
09ce9c4
Appease formatting gods
ambv Aug 11, 2025
c4ad77d
Include the new names in `__all__` and the high-level `settings` sub-…
ambv Aug 12, 2025
230fad9
More reformatting
ambv Aug 12, 2025
6007f97
ruff check --fix
ambv Aug 12, 2025
13dc301
Drop (broken) support for GIT_OPT_ADD_SSL_X509_CERT
ambv Aug 12, 2025
47df253
Fix some disallow_untyped_defs
kbaikov Aug 8, 2025
7a7895f
Halve the number of quotes in NotImplementedError messages
ambv Aug 12, 2025
c921ebc
Merge remote-tracking branch 'ambv/move-options-to-cffi'
jdavid Aug 13, 2025
5c8ad80
Update Changelog
jdavid Aug 13, 2025
2c9792a
Deprecate Remote.ls_remotes in favor of Remote.list_heads
jorio Aug 13, 2025
d16378e
Remote.ls_remotes returns backwards compatible value for loid
jorio Aug 13, 2025
f09359f
Don't build wheels for Python 3.14
jdavid Aug 13, 2025
97255cc
Merge remote-tracking branch 'kbaikov/mypy-fixes8'
jdavid Aug 14, 2025
e894e1c
Merge remote-tracking branch 'kbaikov/mypy-fixes9'
jdavid Aug 14, 2025
68c871b
Make mypy happy
jdavid Aug 14, 2025
d88fa3d
Release 1.18.2
jdavid Aug 16, 2025
3e7e10b
Wheels: update cibuildwheel
jdavid Aug 20, 2025
3d129c7
Build musllinux_aarch64 wheels
jdavid Aug 20, 2025
2b231a3
CI: Update setup-python to v6
jdavid Sep 11, 2025
ff64e61
Build wheels for Python 3.14
jdavid Sep 12, 2025
d0a1743
Add an implementation of reference transactions
craigds Oct 4, 2025
5f655b7
feat: enable future-compatible deployments
2bndy5 Oct 8, 2025
2a5c874
build(dev): enable dependabot for automatic updates
2bndy5 Oct 9, 2025
0645936
chore(CI): bump the actions group with 2 updates
dependabot[bot] Oct 10, 2025
098cbe3
feat: build windows distributions with cibuildwheel in GH CI
2bndy5 Oct 9, 2025
f711b4e
chore: update gitignore with common paths related to Python and C pro…
2bndy5 Oct 9, 2025
e5620b9
Drop AppVeyor
jdavid Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.h text eol=lf
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: jdavid
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: "monthly"
commit-message:
prefix: "chore(CI):"
groups:
actions:
patterns:
- "*"
# - package-ecosystem: pip
# directory: .github/
# schedule:
# interval: "monthly"
# groups:
# pip:
# patterns:
# - "*"
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within pyproject.toml
---
name: Codespell

on:
pull_request:
push:

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v5
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lints

on:
pull_request:
push:
paths-ignore:
- '**.rst'

jobs:
ruff:
runs-on: ubuntu-24.04

steps:
- name: Checkout pygit2
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'

- name: Install ruff
run: pip install ruff

- name: Format code with ruff
run: ruff format --diff

- name: Check code style with ruff
run: ruff check

- name: Check typing with mypy
run: LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.1 /bin/sh build.sh mypy
71 changes: 71 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Tests

on:
pull_request:
push:
paths-ignore:
- '**.rst'

jobs:
linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
python-version: '3.10'
- os: ubuntu-24.04
python-version: '3.13'
- os: ubuntu-24.04
python-version: 'pypy3.10'
- os: ubuntu-24.04-arm
python-version: '3.13'

steps:
- name: Checkout pygit2
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Linux
run: |
sudo apt install tinyproxy
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.1 /bin/sh build.sh test

linux-s390x:
runs-on: ubuntu-24.04
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Build & test
uses: uraimo/run-on-arch-action@v3
with:
arch: s390x
distro: ubuntu22.04
install: |
apt-get update -q -y
apt-get install -q -y cmake libssl-dev python3-dev python3-venv wget
run: |
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.1 /bin/sh build.sh test
continue-on-error: true # Tests are expected to fail, see issue #812

macos-arm64:
runs-on: macos-latest
steps:
- name: Checkout pygit2
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'

- name: macOS
run: |
export OPENSSL_PREFIX=`brew --prefix openssl@3`
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.1 /bin/sh build.sh test
142 changes: 142 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Wheels

on:
push:
branches:
- master
- wheels-*
tags:
- 'v*'

jobs:
build_wheels:
name: Wheels for ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: linux-amd
os: ubuntu-24.04
- name: linux-arm
os: ubuntu-24.04-arm
- name: macos
os: macos-13
- name: windows-x64
os: windows-latest
- name: windows-x86
os: windows-latest
- name: windows-arm64
# https://github.com/actions/partner-runner-images#available-images
os: windows-11-arm

steps:
- uses: actions/checkout@v5
with:
# avoid leaking credentials in uploaded artifacts
persist-credentials: false

- uses: actions/setup-python@v6
with:
python-version: '3.13'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel~=3.1.1

- name: Build wheels
env:
CIBW_ARCHS_WINDOWS: ${{ matrix.name == 'windows-x86' && 'auto32' || 'native' }}
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.name }}
path: ./wheelhouse/*.whl

build_wheels_ppc:
name: Wheels for linux-ppc
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v5
with:
# avoid leaking credentials in uploaded artifacts
persist-credentials: false

- uses: actions/setup-python@v6
with:
python-version: '3.13'

- uses: docker/setup-qemu-action@v3
with:
platforms: linux/ppc64le

- name: Install cibuildwheel
run: python -m pip install cibuildwheel~=3.1.1

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS: ppc64le
CIBW_ENVIRONMENT: LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.1 LIBGIT2=/project/ci

- uses: actions/upload-artifact@v4
with:
name: wheels-linux-ppc
path: ./wheelhouse/*.whl

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
# avoid leaking credentials in uploaded artifacts
persist-credentials: false

- uses: actions/setup-python@v6
with:
python-version: '3.13'

- name: Build sdist
run: pipx run build --sdist --outdir dist

- uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist/*

twine-check:
name: Twine check
# It is good to do this check on non-tagged commits.
# Note, pypa/gh-action-pypi-publish (see job below) does this automatically.
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
needs: [build_wheels, build_wheels_ppc, sdist]
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v5
with:
path: dist
pattern: wheels-*
merge-multiple: true
- name: check distribution files
run: pipx run twine check dist/*

pypi:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [build_wheels, build_wheels_ppc]
runs-on: ubuntu-24.04

steps:
- uses: actions/download-artifact@v5
with:
path: dist
pattern: wheels-*
merge-multiple: true

- name: Display structure of downloaded files
run: ls -lh dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Loading