18
18
python-version :
19
19
required : true
20
20
type : string
21
+ free-threaded :
22
+ description : ' Whether FT Python or not. Valid value is "ft" or not.'
23
+ default : ' '
24
+ type : string
21
25
cuda-version :
22
26
required : true
23
27
type : string
24
28
use-nvdec :
25
- default : " "
29
+ default : " nvdec"
30
+ description : ' Whether build NVDEC or not. Valid value is "nvdec" or not.'
26
31
type : string
27
32
run-test :
28
33
required : false
29
34
default : ' false'
30
35
type : string
31
36
32
37
env :
33
- ARTIFACT : wheel-linux-py${{ inputs.python-version }}-cuda${{ inputs.cuda-version }}${{ inputs.use-nvdec }}
38
+ ARTIFACT : wheel-linux-py${{ inputs.python-version }}${{ inputs.free-threaded }} -cuda${{ inputs.cuda-version }}${{ inputs.use-nvdec }}
34
39
SPDL_USE_TRACING : 1
35
40
SPDL_BUILD_STUB : 0
36
41
SPDL_USE_CUDA : 1
@@ -63,11 +68,21 @@ jobs:
63
68
64
69
wget -qO- https://astral.sh/uv/install.sh | sh
65
70
source $HOME/.local/bin/env
71
+ uv --version
66
72
uv python list --only-installed
67
73
68
- py_ver="$(echo '${{ inputs.python-version }}' | sed 's|[^0-9]*||g')"
69
- python_exe="/opt/python/cp${py_ver}-cp${py_ver}/bin/python"
74
+ # note: 3.13t is in cp313-cp313t directory, others are in cp313-cp313 directory
75
+ v=${{ inputs.python-version }}
76
+ dir="cp${v//[.t]/}-cp${v//[.]/}"
77
+ if [[ "${{ inputs.free-threaded }}" == 'ft' ]]; then
78
+ dir="${dir}t"
79
+ fi
80
+ python_exe="/opt/python/${dir}/bin/python"
81
+ "${python_exe}" --version
70
82
uv venv --python "${python_exe}"
83
+ if [[ "${{ inputs.free-threaded }}" == 'ft' ]]; then
84
+ source .venv/bin/activate
85
+ fi
71
86
uv build --no-python-downloads --all-packages --wheel
72
87
73
88
./packaging/repair_wheels.sh "manylinux_2_27_${{ inputs.arch }}" ./dist ~/package
83
98
84
99
- name : Check package
85
100
run : |
86
- py_ver="$(echo '${{ inputs.python-version }}' | sed 's|[^0-9]*||g')"
87
- python_exe="/opt/python/cp${py_ver}-cp${py_ver}/bin/python"
88
-
101
+ # CFFI is not available yet for 3.13t, which prevents the installation of twine
102
+ # https://github.com/python-cffi/cffi/releases/tag/v1.17.0
103
+ # So we use the regular 3.13
104
+ v=${{ inputs.python-version }}
105
+ dir="cp${v//[.t]/}-cp${v//[.t]/}"
106
+ python_exe="/opt/python/${dir}/bin/python"
89
107
"${python_exe}" -m pip install -r ./packaging/requirements.txt
90
108
"${python_exe}" -m twine check --strict ~/package/*.whl
91
109
@@ -112,14 +130,25 @@ jobs:
112
130
path : ~/package
113
131
114
132
- uses : conda-incubator/setup-miniconda@v3
133
+ if : ${{ inputs.free-threaded == 'ft' }}
115
134
with :
116
- python-version : " ${{ inputs.python-version }}"
135
+ python-version : ${{ inputs.python-version }}t
136
+ conda-remove-defaults : " true"
137
+
138
+ - uses : conda-incubator/setup-miniconda@v3
139
+ if : ${{ inputs.free-threaded != 'ft' }}
140
+ with :
141
+ python-version : ${{ inputs.python-version }}
117
142
conda-remove-defaults : " true"
118
143
119
144
- name : Unit test
120
145
run : |
121
146
set -ex
122
147
148
+ if [[ "${{ inputs.free-threaded }}" == 'ft' ]]; then
149
+ conda install -q -c conda-forge python-freethreading
150
+ fi
151
+
123
152
# Install SPDL
124
153
pip install $(find "${HOME}/package" -name '*.whl' -depth -maxdepth 1)
125
154
@@ -177,10 +206,18 @@ jobs:
177
206
path : ~/package
178
207
179
208
- uses : conda-incubator/setup-miniconda@v3
209
+ if : ${{ inputs.free-threaded == 'ft' }}
180
210
with :
181
- python-version : ${{ inputs.python-version }}
211
+ python-version : ${{ inputs.python-version }}t
212
+ conda-remove-defaults : " true"
213
+
214
+ - uses : conda-incubator/setup-miniconda@v3
215
+ if : ${{ inputs.free-threaded != 'ft' }}
216
+ with :
217
+ python-version : ${{ inputs.python-version }}t
182
218
conda-remove-defaults : " true"
183
219
220
+
184
221
- name : Unit test
185
222
run : |
186
223
# Install SPDL
0 commit comments