forked from ijl/orjson
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (74 loc) · 2.36 KB
/
Copy pathlinux-cross.yaml
File metadata and controls
75 lines (74 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: linux-cross
on:
push:
branches:
- '*'
tags:
- '*'
jobs:
linux-cross:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.7', abi: 'cp37-cp37m' },
{ version: '3.8', abi: 'cp38-cp38' },
{ version: '3.9', abi: 'cp39-cp39' },
{ version: '3.10', abi: 'cp310-cp310' },
]
target: [armv7]
steps:
- uses: actions/checkout@v2
- name: Build Wheels
uses: messense/maturin-action@v1
env:
PYO3_CROSS_LIB_DIR: /opt/python/${{ matrix.python.abi }}
with:
maturin-version: v0.12.19
target: ${{ matrix.target }}
rust-toolchain: nightly-2022-06-22
manylinux: auto
args: -i python3.9 --release --strip --out dist --no-sdist
- uses: uraimo/run-on-arch-action@v2.0.5
name: Install built wheel
with:
arch: ${{ matrix.target }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y --no-install-recommends python3-dev python3-venv software-properties-common build-essential
add-apt-repository ppa:deadsnakes/ppa
apt-get update
apt-get install -y curl python3.7-dev python3.7-venv python3.9-dev python3.9-venv python3.10-dev python3.10-venv
run: |
PYTHON=python${{ matrix.python.version }}
$PYTHON -m venv venv
venv/bin/pip install -U pip
venv/bin/pip install -r test/requirements.txt
venv/bin/pip install orjson --no-index --find-links dist/ --force-reinstall
venv/bin/python -m pytest -s -rxX -v test
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
release:
name: Release
runs-on: ubuntu-22.04
if: "startsWith(github.ref, 'refs/tags/')"
needs: [ linux-cross ]
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- run: pip install "maturin>=0.12.19,<0.13"
- name: deploy
run: maturin upload --skip-existing --username "$MATURIN_USERNAME" *.whl
env:
MATURIN_USERNAME: ${{ secrets.TWINE_USERNAME }}
MATURIN_PASSWORD: ${{ secrets.TWINE_PASSWORD }}