@@ -16,19 +16,16 @@ jobs:
1616 runs-on : macos-latest
1717 strategy :
1818 matrix :
19- python-version : ['3.7', '3.8', '3.9', '3.10']
19+ python-version : ['3.7', '3.8', '3.9', '3.10', '3.11' ]
2020 steps :
21- - uses : actions/checkout@v2
22- - uses : actions/setup-python@v2
21+ - uses : actions/checkout@v3
22+ - uses : actions/setup-python@v4
2323 with :
2424 python-version : ${{ matrix.python-version }}
2525 - name : Install Rust toolchain
26- uses : actions-rs/ toolchain@v1
26+ uses : dtolnay/rust- toolchain@stable
2727 with :
28- toolchain : stable
29- target : aarch64-apple-darwin
30- profile : minimal
31- default : true
28+ targets : aarch64-apple-darwin
3229 - name : Build Rust crate
3330 run : cargo build --release
3431 - name : Run Rust unit tests
@@ -37,25 +34,25 @@ jobs:
3734 uses : messense/maturin-action@v1
3835 with :
3936 target : x86_64
40- args : -i python --release --out dist
37+ args : -i python --release --out dist --sdist
4138 - name : Install Python wheels (x86_64)
4239 run : |
4340 pip install fastdatetime --no-index --find-links dist --force-reinstall
4441 - name : Build Python wheels (universal2)
45- if : ${{ matrix.python-version >= '3.8' || matrix.python-version == ' 3.10' }}
42+ if : ${{ matrix.python-version >= '3.8' || contains(fromJson('[" 3.10", "3.11"]'), matrix.python-version) }}
4643 uses : messense/maturin-action@v1
4744 with :
48- args : -i python --release --universal2 --out dist --no-sdist
45+ args : -i python --release --universal2 --out dist
4946 - name : Install Python wheels (universal2)
50- if : ${{ matrix.python-version >= '3.8' }}
47+ if : ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11"]'), matrix.python-version) }}
5148 run : |
5249 pip install fastdatetime --no-index --find-links dist --force-reinstall
5350 - name : Run Python unit tests
5451 run : |
5552 pip install -r python/requirements-dev.txt
5653 python -m pytest -v python/tests/unit
5754 - name : Upload Python wheels
58- uses : actions/upload-artifact@v2
55+ uses : actions/upload-artifact@v3
5956 with :
6057 name : wheels
6158 path : dist
@@ -64,22 +61,16 @@ jobs:
6461 runs-on : windows-latest
6562 strategy :
6663 matrix :
67- python-version : ['3.7', '3.8', '3.9', '3.10']
64+ python-version : ['3.7', '3.8', '3.9', '3.10', '3.11' ]
6865 target : [x64]
6966 steps :
70- - uses : actions/checkout@v2
71- - uses : actions/setup-python@v2
67+ - uses : actions/checkout@v3
68+ - uses : actions/setup-python@v4
7269 with :
7370 python-version : ${{ matrix.python-version }}
7471 architecture : ${{ matrix.target }}
75- - name : Update rustup
76- run : rustup self update
7772 - name : Install Rust toolchain
78- uses : actions-rs/toolchain@v1
79- with :
80- toolchain : stable
81- profile : minimal
82- default : true
73+ uses : dtolnay/rust-toolchain@stable
8374 - name : Build Rust crate
8475 if : matrix.target == 'x64'
8576 run : cargo build --release
9081 uses : messense/maturin-action@v1
9182 with :
9283 target : ${{ matrix.target }}
93- args : -i python --release --out dist --no-sdist
84+ args : -i python --release --out dist
9485 - name : Install Python wheels
9586 run : |
9687 pip install fastdatetime --no-index --find-links dist --force-reinstall
9990 pip install -r python/requirements-dev.txt
10091 python -m pytest -v python/tests/unit
10192 - name : Upload Python wheels
102- uses : actions/upload-artifact@v2
93+ uses : actions/upload-artifact@v3
10394 with :
10495 name : wheels
10596 path : dist
@@ -108,29 +99,25 @@ jobs:
10899 runs-on : ubuntu-latest
109100 strategy :
110101 matrix :
111- python-version : ['3.7', '3.8', '3.9', '3.10']
102+ python-version : ['3.7', '3.8', '3.9', '3.10', '3.11' ]
112103 target : [x86_64, i686]
113104 steps :
114- - uses : actions/checkout@v2
105+ - uses : actions/checkout@v3
115106 - name : Install Rust toolchain
116- uses : actions-rs/toolchain@v1
117- with :
118- toolchain : stable
119- profile : minimal
120- default : true
107+ uses : dtolnay/rust-toolchain@stable
121108 - name : Build Rust crate
122109 run : cargo build --release
123110 - name : Run Rust unit tests
124111 run : cargo test --no-default-features --release
125- - uses : actions/setup-python@v2
112+ - uses : actions/setup-python@v4
126113 with :
127114 python-version : ${{ matrix.python-version }}
128115 - name : Build Python wheels
129116 uses : messense/maturin-action@v1
130117 with :
131118 target : ${{ matrix.target }}
132119 manylinux : auto
133- args : -i python${{ matrix.python-version }} --release --out dist --no-sdist
120+ args : -i python${{ matrix.python-version }} --release --out dist
134121 - name : Run Python unit tests
135122 if : matrix.target == 'x86_64'
136123 run : |
@@ -143,7 +130,7 @@ jobs:
143130 pip install -r python/requirements-dev.txt
144131 python -m pytest -v --benchmark-only python/tests/perf
145132 - name : Upload Python wheels
146- uses : actions/upload-artifact@v2
133+ uses : actions/upload-artifact@v3
147134 with :
148135 name : wheels
149136 path : dist
@@ -153,35 +140,22 @@ jobs:
153140 strategy :
154141 matrix :
155142 python : [
156- { version: '3.7', abi: 'cp37-cp37m' },
157- { version: '3.8', abi: 'cp38-cp38' },
158- { version: '3.9', abi: 'cp39-cp39' },
159- { version: '3.10', abi: 'cp310-cp310' },
143+ ' 3.7' ,
144+ ' 3.8' ,
145+ ' 3.9' ,
146+ ' 3.10' ,
147+ ' 3.11' ,
160148 ]
161- target : [aarch64, armv7, s390x, ppc64le, ppc64]
162- include :
163- - python :
164- version : 3.7
165- abi : pp37-pypy37_pp73
166- target : aarch64
167- - python :
168- version : 3.8
169- abi : pp38-pypy38_pp73
170- target : aarch64
149+ target : [aarch64, armv7]
171150 steps :
172- - uses : actions/checkout@v2
151+ - uses : actions/checkout@v3
173152 - name : Build Python wheels
174153 uses : messense/maturin-action@v1
175- env :
176- PYO3_CROSS_LIB_DIR : /opt/python/${{ matrix.python.abi }}
177154 with :
178155 target : ${{ matrix.target }}
179156 manylinux : auto
180- args : -i python3.9 --release --out dist --no-sdist
181- - uses : uraimo/run-on-arch-action@v2.0.5
182- # run-on-arch-action doesn't have ppc64 support
183- # skipped cross compiled pypy wheel tests for now
184- if : ${{ matrix.target != 'ppc64' && !startsWith(matrix.python.abi, 'pp') }}
157+ args : -i ${{ matrix.python }} --release --out dist
158+ - uses : uraimo/run-on-arch-action@v2.3.0
185159 name : Install Python wheels
186160 with :
187161 arch : ${{ matrix.target }}
@@ -195,77 +169,16 @@ jobs:
195169 apt-get install -y --no-install-recommends python3 python3-venv software-properties-common
196170 add-apt-repository ppa:deadsnakes/ppa
197171 apt-get update
198- apt-get install -y curl python3.7-venv python3.9-venv python3.10-venv
172+ apt-get install -y curl python3.7-venv python3.9-venv python3.10-venv python3.11-venv
199173 run : |
200174 ls -lrth /artifacts
201- PYTHON=python${{ matrix.python.version }}
175+ PYTHON=python${{ matrix.python }}
202176 $PYTHON -m venv venv
203177 venv/bin/pip install -U pip
204178 venv/bin/pip install fastdatetime --no-index --find-links /artifacts --force-reinstall
205179 venv/bin/python -c 'import fastdatetime'
206180 - name : Upload Python wheels
207- uses : actions/upload-artifact@v2
208- with :
209- name : wheels
210- path : dist
211-
212- pypy-linux :
213- runs-on : ubuntu-latest
214- strategy :
215- matrix :
216- python : [
217- { version: pypy-3.7, abi: pp37-pypy37_pp73 },
218- { version: pypy-3.8, abi: pp38-pypy38_pp73 },
219- ]
220- steps :
221- - uses : actions/checkout@v2
222- - uses : actions/setup-python@v2
223- with :
224- python-version : ${{ matrix.python.version }}
225- - name : Build Pypy wheels
226- uses : messense/maturin-action@v1
227- with :
228- target : ${{ matrix.target }}
229- manylinux : auto
230- args : -i /opt/python/${{ matrix.python.abi }}/bin/pypy --release --out dist --no-sdist
231- - name : Run Pypy import check
232- run : |
233- pip install fastdatetime --no-index --find-links dist
234- pypy -c "import fastdatetime"
235- - name : Upload Pypy wheels
236- uses : actions/upload-artifact@v2
237- with :
238- name : wheels
239- path : dist
240-
241- pypy-macos :
242- runs-on : macos-latest
243- strategy :
244- matrix :
245- python-version : [ pypy-3.7, pypy-3.8 ]
246- steps :
247- - uses : actions/checkout@v2
248- - name : Install Rust toolchain
249- uses : actions-rs/toolchain@v1
250- with :
251- toolchain : stable
252- profile : minimal
253- default : true
254- - uses : actions/setup-python@v2
255- with :
256- python-version : ${{ matrix.python-version }}
257- - name : Install maturin
258- run : pip install maturin
259- - name : Build Pypy wheels
260- run : |
261- maturin build -i $(which pypy) --release --out dist
262- ls -l dist
263- - name : Run Pypy import check
264- run : |
265- pip install fastdatetime --no-index --find-links dist
266- pypy -c "import fastdatetime"
267- - name : Upload Pypy wheels
268- uses : actions/upload-artifact@v2
181+ uses : actions/upload-artifact@v3
269182 with :
270183 name : wheels
271184 path : dist
@@ -274,18 +187,18 @@ jobs:
274187 name : Release
275188 runs-on : ubuntu-latest
276189 if : " startsWith(github.ref, 'refs/tags/')"
277- needs : [ macos, windows, linux, linux-cross, pypy-linux, pypy-macos ]
190+ needs : [ macos, windows, linux, linux-cross ]
278191 steps :
279- - uses : actions/download-artifact@v2
192+ - uses : actions/download-artifact@v3
280193 with :
281194 name : wheels
282- - uses : actions/setup-python@v2
195+ - uses : actions/setup-python@v4
283196 with :
284- python-version : 3.9
197+ python-version : ' 3.10 '
285198 - name : Publish to PyPi
286199 env :
287200 TWINE_USERNAME : __token__
288201 TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
289202 run : |
290- pip install --upgrade wheel pip setuptools twine
203+ pip install --upgrade twine
291204 twine upload --skip-existing *
0 commit comments