Skip to content

Commit d371d33

Browse files
committed
Move cibuildwheel config to pyproject.toml
1 parent 4a99e54 commit d371d33

File tree

3 files changed

+105
-16
lines changed

3 files changed

+105
-16
lines changed

.github/workflows/tests.yml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
paths-ignore:
7+
- '**.rst'
8+
9+
jobs:
10+
x86_64:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
include:
15+
- os: ubuntu-22.04
16+
python-version: 3.8
17+
- os: ubuntu-22.04
18+
python-version: '3.12'
19+
- os: ubuntu-22.04
20+
python-version: 'pypy3.9'
21+
- os: macos-latest
22+
python-version: 3.8
23+
24+
steps:
25+
- name: Checkout pygit2
26+
uses: actions/checkout@v3
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Linux
34+
if: runner.os == 'Linux'
35+
run: |
36+
sudo apt install tinyproxy
37+
LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.1 /bin/sh build.sh test
38+
39+
- name: macOS
40+
if: runner.os == 'macOS'
41+
run: |
42+
export OPENSSL_PREFIX=`brew --prefix [email protected]`
43+
LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.1 /bin/sh build.sh test
44+
45+
aarch64:
46+
runs-on: ubuntu-22.04
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v3
50+
51+
- name: Build & test
52+
uses: uraimo/run-on-arch-action@v2
53+
with:
54+
arch: aarch64
55+
distro: ubuntu20.04
56+
install: |
57+
apt-get update -q -y
58+
apt-get install -q -y cmake libssl-dev python3-dev python3-venv wget
59+
run: |
60+
LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.1 /bin/sh build.sh test
61+
62+
s390x:
63+
runs-on: ubuntu-22.04
64+
if: github.ref == 'refs/heads/master'
65+
steps:
66+
- name: Checkout
67+
uses: actions/checkout@v3
68+
69+
- name: Build & test
70+
uses: uraimo/run-on-arch-action@v2
71+
with:
72+
arch: s390x
73+
distro: ubuntu20.04
74+
install: |
75+
apt-get update -q -y
76+
apt-get install -q -y cmake libssl-dev python3-dev python3-venv wget
77+
run: |
78+
LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.1 /bin/sh build.sh test
79+
continue-on-error: true # Tests are expected to fail, see issue #812

.github/workflows/wheels.yml

+3-16
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
- musl
87
tags:
98
- 'v*'
109

@@ -14,7 +13,7 @@ jobs:
1413
runs-on: ${{ matrix.os }}
1514
strategy:
1615
matrix:
17-
os: [ubuntu-22.04] #, macos-latest]
16+
os: [ubuntu-22.04, macos-latest]
1817

1918
steps:
2019
- uses: actions/checkout@v3
@@ -31,20 +30,7 @@ jobs:
3130

3231
- name: Build wheels
3332
run: python -m cibuildwheel --output-dir wheelhouse
34-
env:
35-
CIBW_BEFORE_ALL: sh build.sh
36-
CIBW_ENVIRONMENT: LIBGIT2_VERSION=1.7.1 LIBSSH2_VERSION=1.11.0 OPENSSL_VERSION=3.1.3 LIBGIT2=/project/ci
37-
CIBW_ENVIRONMENT_MACOS: LIBGIT2_VERSION=1.7.1 LIBSSH2_VERSION=1.11.0 OPENSSL_VERSION=3.1.3 LIBGIT2=/Users/runner/work/pygit2/pygit2/ci
38-
CIBW_SKIP: "pp3* *manylinux* cp36* cp37* cp38* cp39* cp310* cp311*"
39-
CIBW_BUILD: "cp312-musllinux_x86_64"
40-
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux2014"
41-
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
42-
#CIBW_REPAIR_WHEEL_COMMAND_LINUX: "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}"
43-
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "LD_LIBRARY_PATH=/project/ci/lib auditwheel repair -w {dest_dir} {wheel}"
44-
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
45-
CIBW_ARCHS_MACOS: universal2
46-
CIBW_ARCHS_LINUX: x86_64 # aarch64
47-
33+
4834
- uses: actions/upload-artifact@v3
4935
with:
5036
name: wheels
@@ -68,3 +54,4 @@ jobs:
6854
with:
6955
user: __token__
7056
password: ${{ secrets.PYPI_API_TOKEN }}
57+

pyproject.toml

+23
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
11
[build-system]
22
requires = ["setuptools", "wheel"]
3+
4+
[tool.cibuildwheel]
5+
skip = "pp3*"
6+
7+
archs = ["auto"]
8+
build-frontend = "default"
9+
dependency-versions = "pinned"
10+
environment = {LIBGIT2_VERSION="1.7.1", LIBSSH2_VERSION="1.11.0", OPENSSL_VERSION="3.1.3", LIBGIT2="/project/ci"}
11+
12+
before-all = "sh build.sh"
13+
14+
[tool.cibuildwheel.linux]
15+
repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}"
16+
archs = ["x86_64", "aarch64"]
17+
18+
[[tool.cibuildwheel.overrides]]
19+
select = "*-musllinux*"
20+
repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib auditwheel repair -w {dest_dir} {wheel}"
21+
22+
[tool.cibuildwheel.macos]
23+
environment = {LIBGIT2_VERSION="1.7.1", LIBSSH2_VERSION="1.11.0", OPENSSL_VERSION="3.1.3", LIBGIT2="/Users/runner/work/pygit2/pygit2/ci"}
24+
repair-wheel-command = "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
25+
archs = ["universal2"]

0 commit comments

Comments
 (0)