19
19
20
20
jobs :
21
21
manylinux :
22
- runs-on : ubuntu-latest
22
+ runs-on : ${{ matrix.MANYLINUX.RUNNER }}
23
23
container :
24
24
image : ghcr.io/pyca/${{ matrix.MANYLINUX.CONTAINER }}
25
25
volumes :
@@ -28,34 +28,42 @@ jobs:
28
28
strategy :
29
29
matrix :
30
30
PYTHON :
31
- - { VERSION: "cp36-cp36m ", PATH: "/opt/python/cp36-cp36m /bin/python", ABI_VERSION: 'cp36 ' }
31
+ - { VERSION: "cp37-cp37m ", PATH: "/opt/python/cp311-cp311 /bin/python", ABI_VERSION: 'cp37 ' }
32
32
MANYLINUX :
33
- - { NAME: "manylinux2014_x86_64", CONTAINER: "cryptography-manylinux2014:x86_64" }
34
- - { name: "manylinux_2_28_x86_64", CONTAINER: "cryptography-manylinux_2_28:x86_64"}
35
- - { name: "musllinux_1_1_x86_64", CONTAINER: "cryptography-musllinux_1_1:x86_64"}
33
+ - { NAME: "manylinux2014_x86_64", CONTAINER: "cryptography-manylinux2014:x86_64", RUNNER: "ubuntu-latest" }
34
+ - { name: "manylinux_2_28_x86_64", CONTAINER: "cryptography-manylinux_2_28:x86_64", RUNNER: "ubuntu-latest" }
35
+ - { name: "musllinux_1_1_x86_64", CONTAINER: "cryptography-musllinux_1_1:x86_64", RUNNER: "ubuntu-latest" }
36
+
37
+ - { NAME: "manylinux2014_aarch64", CONTAINER: "cryptography-manylinux2014_aarch64", RUNNER: [self-hosted, Linux, ARM64] }
38
+ - { name: "manylinux_2_28_aarch64", CONTAINER: "cryptography-manylinux_2_28:aarch64", RUNNER: [self-hosted, Linux, ARM64] }
39
+ - { name: "musllinux_1_1_aarch64", CONTAINER: "cryptography-musllinux_1_1:aarch64", RUNNER: [self-hosted, Linux, ARM64] }
36
40
37
41
name : " ${{ matrix.PYTHON.VERSION }} for ${{ matrix.MANYLINUX.NAME }}"
38
42
steps :
39
43
- name : Ridiculous-er workaround for static node20
40
44
run : |
41
45
cp -R /staticnode/* /staticnodecontainer/
46
+ - name : Ridiculous alpine workaround for actions support on arm64
47
+ run : |
48
+ # This modifies /etc/os-release so the JS actions
49
+ # from GH can't detect that it's on alpine:aarch64. It will
50
+ # then use a glibc nodejs, which works fine when gcompat
51
+ # is installed in the container (which it is)
52
+ sed -i "s:ID=alpine:ID=NotpineForGHA:" /etc/os-release
53
+ if : startsWith(matrix.MANYLINUX.NAME, 'musllinux') && endsWith(matrix.MANYLINUX.NAME, 'aarch64')
54
+
42
55
- uses : actions/checkout@v4.1.7
43
56
with :
44
57
# The tag to build or the tag received by the tag event
45
58
ref : ${{ github.event.inputs.version || github.ref }}
46
59
persist-credentials : false
47
60
- run : ${{ matrix.PYTHON.PATH }} -m venv .venv
48
61
- name : Install python dependencies
49
- run : .venv/bin/pip install -U pip cffi wheel
50
- - name : Make sdist
51
- run : .venv/bin/python setup.py sdist
52
- - run : tar zxvf dist/PyNaCl*.tar.gz && mkdir tmpwheelhouse
62
+ run : .venv/bin/pip install -U pip cffi wheel build
53
63
- run : |
54
- if [ -n "${{ matrix.PYTHON.ABI_VERSION }}" ]; then
55
- PY_LIMITED_API="--py-limited-api=${{ matrix.PYTHON.ABI_VERSION }}"
56
- fi
57
- cd PyNaCl*
58
- LIBSODIUM_MAKE_ARGS="-j$(nproc)" ../.venv/bin/python setup.py bdist_wheel $PY_LIMITED_API && mv dist/PyNaCl*.whl ../tmpwheelhouse
64
+ mkdir tmpwheelhouse
65
+ LIBSODIUM_MAKE_ARGS="-j$(nproc)" .venv/bin/python -m build --wheel --config-setting=--build-option=--py-limited-api=${{ matrix.PYTHON.ABI_VERSION }}
66
+ mv dist/PyNaCl*.whl tmpwheelhouse/
59
67
- run : auditwheel repair --plat ${{ matrix.MANYLINUX.NAME }} tmpwheelhouse/PyNaCl*.whl -w wheelhouse/
60
68
- run : .venv/bin/pip install pynacl --no-index -f wheelhouse/
61
69
- run : |
@@ -65,16 +73,16 @@ jobs:
65
73
- run : mv wheelhouse/PyNaCl*.whl pynacl-wheelhouse/
66
74
- uses : actions/upload-artifact@v4
67
75
with :
68
- name : " pynacl-${{ github.event.inputs.version }}-${{ matrix.MANYLINUX.NAME }}- ${{ matrix.PYTHON.VERSION }}"
76
+ name : " pynacl-${{ github.event.inputs.version }}-${{ matrix.MANYLINUX.NAME }}-${{ matrix.PYTHON.VERSION }}"
69
77
70
78
path : pynacl-wheelhouse/
71
79
macos :
72
- runs-on : macos-11
80
+ runs-on : macos-13
73
81
strategy :
74
82
matrix :
75
83
PYTHON :
76
84
- VERSION : ' 3.10'
77
- ABI_VERSION : ' cp36 '
85
+ ABI_VERSION : ' cp37 '
78
86
DOWNLOAD_URL : ' https://www.python.org/ftp/python/3.10.1/python-3.10.1-macos11.pkg'
79
87
BIN_PATH : ' /Library/Frameworks/Python.framework/Versions/3.10/bin/python3'
80
88
name : " Python ${{ matrix.PYTHON.VERSION }} for ABI ${{ matrix.PYTHON.ABI_VERSION }} on macOS"
@@ -91,15 +99,13 @@ jobs:
91
99
PYTHON_DOWNLOAD_URL: ${{ matrix.PYTHON.DOWNLOAD_URL }}
92
100
- run : ${{ matrix.PYTHON.BIN_PATH }} -m pip install -U virtualenv
93
101
- run : ${{ matrix.PYTHON.BIN_PATH }} -m virtualenv venv
94
- - run : venv/bin/pip install -U pip wheel cffi
95
- - name : Make sdist
96
- run : venv/bin/python setup.py sdist
97
- - run : tar zxvf dist/pynacl*.tar.gz && mkdir wheelhouse
102
+ - run : venv/bin/pip install -U pip wheel cffi build
98
103
- name : Build the wheel
99
104
run : |
100
- cd pynacl*
105
+ mkdir wheelhouse
101
106
LIBSODIUM_MAKE_ARGS="-j$(sysctl -n hw.ncpu)" \
102
- ../venv/bin/python setup.py bdist_wheel --py-limited-api=${{ matrix.PYTHON.ABI_VERSION }} && mv dist/PyNaCl*.whl ../wheelhouse
107
+ venv/bin/python -m build --wheel --config-setting=--build-option=--py-limited-api=${{ matrix.PYTHON.ABI_VERSION }}
108
+ mv dist/PyNaCl*.whl wheelhouse/
103
109
env :
104
110
PYTHON_VERSION : ${{ matrix.PYTHON.ABI_VERSION }}
105
111
MACOSX_DEPLOYMENT_TARGET : ' 10.10'
@@ -124,7 +130,7 @@ jobs:
124
130
- {ARCH: 'x86', SODIUM_ARCH: 'Win32', VS_ARCH: 'x86'}
125
131
- {ARCH: 'x64', SODIUM_ARCH: 'x64', VS_ARCH: 'amd64'}
126
132
PYTHON :
127
- - {VERSION: "3.9", SODIUM_MSVC_VERSION: "v142", "ABI_VERSION": "cp36 "}
133
+ - {VERSION: "3.9", SODIUM_MSVC_VERSION: "v142", "ABI_VERSION": "cp37 "}
128
134
name : " ${{ matrix.PYTHON.VERSION }} ${{ matrix.WINDOWS.ARCH }} ${{ matrix.PYTHON.ABI_VERSION }}"
129
135
steps :
130
136
- uses : actions/checkout@v4.1.7
@@ -148,15 +154,13 @@ jobs:
148
154
shell : bash
149
155
150
156
- name : Install wheel and our Python dependencies
151
- run : python -m pip install -U pip wheel cffi
152
- - name : Make sdist
153
- run : python setup.py sdist
154
- - run : tar zxvf dist/PyNaCl*.tar.gz && mkdir wheelhouse
155
- shell : bash
157
+ run : python -m pip install -U pip wheel cffi build
156
158
- name : Build the wheel
157
159
run : |
160
+ mkdir wheelhouse
158
161
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -no_logo -arch=${{ matrix.WINDOWS.VS_ARCH }}
159
- cd PyNaCl* && python setup.py bdist_wheel --py-limited-api=${{ matrix.PYTHON.ABI_VERSION }} && mv dist/PyNaCl*.whl ../wheelhouse
162
+ python -m build --wheel --config-setting=--build-option=--py-limited-api=${{ matrix.PYTHON.ABI_VERSION }}
163
+ mv dist/PyNaCl*.whl wheelhouse/
160
164
shell : cmd
161
165
env :
162
166
PYNACL_SODIUM_LIBRARY_NAME : sodium
0 commit comments