forked from ijl/orjson
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (47 loc) · 1.91 KB
/
Copy pathmanylinux2014.yaml
File metadata and controls
47 lines (47 loc) · 1.91 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
name: manylinux2014
on:
push:
branches:
- '*'
tags:
- '*'
jobs:
manylinux2014:
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' },
]
env:
PATH: /github/home/.local/bin:/github/home/.cargo/bin:/opt/python/${{ matrix.python.abi }}/bin:/opt/rh/devtoolset-10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CC: "gcc"
CFLAGS: "-O2 -fno-plt -flto"
LDFLAGS: "-O2 -flto -Wl,--as-needed"
container:
image: quay.io/pypa/manylinux2014_x86_64:latest
options: --user 0
steps:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-06-22 --profile minimal -y
- uses: actions/checkout@v2
- run: python3 -m pip install --user --upgrade pip "maturin>=0.12.19,<0.13" wheel
- run: cargo fetch
- run: maturin build --no-sdist --release --strip --cargo-extra-args="--features=unstable-simd,yyjson" --compatibility manylinux2014 --interpreter python${{ matrix.python.version }}
- run: python3 -m pip install --user target/wheels/orjson*.whl
- run: python3 -m pip install --user -r test/requirements.txt -r integration/requirements.txt
- run: pytest -s -rxX -v test
- run: python3 -m pip uninstall -y numpy
- run: pytest -s -rxX -v test
- run: ./integration/run thread
- run: ./integration/run http
- run: git config --global --add safe.directory /__w/orjson/orjson
- name: deploy
run: maturin upload --skip-existing --username "$MATURIN_USERNAME" target/wheels/orjson-*.whl
if: "startsWith(github.ref, 'refs/tags/')"
env:
MATURIN_USERNAME: ${{ secrets.TWINE_USERNAME }}
MATURIN_PASSWORD: ${{ secrets.TWINE_PASSWORD }}