@@ -3,87 +3,90 @@ name: Python 3.12 Manylinux Build and Test
3
3
4
4
on :
5
5
push :
6
- branches : [" main", " devel" ]
6
+ branches : [' main', ' devel' ]
7
7
pull_request :
8
- branches : [" main", " devel" ]
9
- workflow_dispatch : # Allow manual trigger
8
+ branches : [' main', ' devel' ]
9
+ workflow_dispatch : # Allow manual trigger
10
10
11
11
jobs :
12
12
build-and-test :
13
13
name : 🐍 Python 3.12 on Manylinux 🐧
14
14
runs-on : ubuntu-latest
15
-
15
+
16
16
env :
17
17
FORCE_COLOR : 1
18
18
PIP_DISABLE_PIP_VERSION_CHECK : 1
19
19
PIP_NO_PYTHON_VERSION_WARNING : 1
20
20
PIP_NO_WARN_SCRIPT_LOCATION : 1
21
- PYTHON_VERSION : " 3.12"
22
- MANYLINUX_VERSION : " 2014"
23
- MANYLINUX_ARCH : " x86_64"
24
-
21
+ PYTHON_VERSION : ' 3.12'
22
+ MANYLINUX_VERSION : ' 2014'
23
+ MANYLINUX_ARCH : ' x86_64'
24
+
25
25
steps :
26
26
- name : Checkout repository
27
27
uses : actions/checkout@v4
28
-
28
+
29
29
- name : Set up QEMU for architecture emulation
30
30
uses : docker/setup-qemu-action@v3
31
31
with :
32
32
platforms : linux/amd64
33
-
33
+
34
34
- name : Set up Docker Buildx
35
35
uses : docker/setup-buildx-action@v3
36
-
36
+
37
37
- name : Pull manylinux container
38
38
run : |
39
39
docker pull quay.io/pypa/manylinux${MANYLINUX_VERSION}_${MANYLINUX_ARCH}
40
-
40
+
41
41
- name : Build source distribution
42
42
run : |
43
43
python -m pip install --upgrade pip
44
44
python -m pip install build
45
45
python -m build --sdist
46
-
46
+
47
47
- name : Build wheel with manylinux
48
48
run : |
49
- docker run --rm -v $(pwd):/io quay .io/pypa/manylinux${MANYLINUX_VERSION}_${MANYLINUX_ARCH} \
49
+ docker run --rm -v $(pwd):/io ghcr .io/ansible/pylibssh-manylinux_2_28_x86_64:libssh-v0.9.6 \
50
50
/bin/bash -c "cd /io && \
51
51
/opt/python/cp312-cp312/bin/pip install -U pip wheel setuptools cython && \
52
+ CFLAGS='-I\$(cat /root/.static-deps-path)/include' \
53
+ LDFLAGS='-L\$(cat /root/.static-deps-path)/lib64 -L\$(cat /root/.static-deps-path)/lib' \
54
+ LD_LIBRARY_PATH='\$(cat /root/.static-deps-path)/lib64:\$(cat /root/.static-deps-path)/lib:\${LD_LIBRARY_PATH}' \
52
55
/opt/python/cp312-cp312/bin/pip wheel . -w wheelhouse/ && \
53
- auditwheel repair wheelhouse/*.whl --plat manylinux${MANYLINUX_VERSION}_${MANYLINUX_ARCH} -w /io/dist/"
54
-
56
+ auditwheel repair wheelhouse/*.whl --plat manylinux2_28_x86_64 -w /io/dist/"
57
+
55
58
- name : Install build dependencies on host
56
59
run : |
57
60
sudo apt-get update
58
61
sudo apt-get install -y build-essential libssl-dev libssh-dev glibc-tools
59
-
62
+
60
63
- name : Set up Python 3.12 for testing
61
64
uses : actions/setup-python@v5
62
65
with :
63
66
python-version : ${{ env.PYTHON_VERSION }}
64
-
67
+
65
68
- name : Install wheel and test dependencies
66
69
run : |
67
70
python -m pip install --upgrade pip
68
71
python -m pip install pytest pytest-cov
69
72
python -m pip install ./dist/*.whl
70
-
73
+
71
74
- name : Run tests
72
75
run : |
73
76
python -m pytest -xvs
74
-
77
+
75
78
- name : Upload artifacts
76
79
uses : actions/upload-artifact@v4
77
80
with :
78
81
name : python-package-distributions
79
82
path : |
80
83
dist/
81
84
wheelhouse/
82
-
85
+
83
86
- name : Generate coverage report
84
87
run : |
85
88
python -m pytest --cov=./ --cov-report=xml
86
-
89
+
87
90
- name : Upload coverage to Codecov
88
91
uses : codecov/codecov-action@v4
89
92
with :
0 commit comments