@@ -11,36 +11,61 @@ jobs:
1111 strategy :
1212 fail-fast : false
1313 matrix :
14- os : [ubuntu-latest, macOS -latest, windows-latest]
15- python-version : [3.6, 3.7 ]
14+ os : [ubuntu-latest, macos -latest, windows-latest]
15+ arch : [auto ]
1616 include :
17- - { os: ubuntu-latest, python-version: 3.6, python-abis: "cp36-cp36m" }
18- - { os: ubuntu-latest, python-version: 3.7, python-abis: "cp37-cp37m" }
19- - { os: windows-latest, python-version: 3.7, build-static: 1 }
17+ - os : ubuntu-latest
18+ arch : aarch64
2019
2120 steps :
2221 - name : Check out code
2322 uses : actions/checkout@v2
2423
25- - name : Set up conda ${{ matrix.python-version }}
24+ - name : Set up QEMU
25+ if : ${{ matrix.arch == 'aarch64' }}
26+ uses : docker/setup-qemu-action@v1
27+
28+ - name : Build wheels
29+ uses : pypa/cibuildwheel@v1.11.1
2630 env :
27- PYTHON : ${{ matrix.python-version }}
28- shell : bash
31+ CIBW_ARCHS : ${{ matrix.arch }}
32+ CIBW_SKIP : pp* *-musllinux* *i686 cp27-* cp35-* cp38-* cp39-* cp310-* cp311-*
33+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux1
34+ CIBW_MANYLINUX_AARCH64_IMAGE : manylinux2014
35+
36+ - name : Install Python
37+ uses : actions/setup-python@v4
38+ if : ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
39+ with :
40+ python-version : ' 3.7'
41+
42+ - name : Build source
43+ if : ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'auto' }}
2944 run : |
30- source ./.github/workflows/install-conda.sh
31- if [[ `uname` == "Darwin" ]]; then
32- brew reinstall gcc@10
33- fi
45+ python setup.py sdist --formats=gztar --dist-dir=./wheelhouse
3446
35- - name : Deploy packages
36- if : startsWith(github.ref, 'refs/tags/') && matrix.no-deploy != '1'
47+ - name : Release to pypi
3748 shell : bash
3849 env :
39- DOCKER_IMAGE : " quay.io/pypa/manylinux1_x86_64"
40- PYABI : ${{ matrix.python-abis }}
41- BUILD_STATIC : ${{ matrix.build-static }}
4250 TWINE_USERNAME : ${{ secrets.PYPI_USER }}
4351 TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
4452 run : |
45- source ./.github/workflows/reload-env.sh
46- source ./.github/workflows/upload-packages.sh
53+ if [[ "$GITHUB_REPOSITORY" == "mars-project/shared_memory38" ]]; then
54+ PYPI_REPO="https://upload.pypi.org/legacy/"
55+ else
56+ PYPI_REPO="https://test.pypi.org/legacy/"
57+ fi
58+ echo "[distutils]" > ~/.pypirc
59+ echo "index-servers =" >> ~/.pypirc
60+ echo " pypi" >> ~/.pypirc
61+ echo "[pypi]" >> ~/.pypirc
62+ echo "repository=$PYPI_REPO" >> ~/.pypirc
63+ python -m pip install twine
64+ python -m twine upload -r pypi --skip-existing wheelhouse/*
65+
66+ - name : Upload artifacts to github
67+ uses : actions/upload-artifact@v1
68+ if : ${{ always() }}
69+ with :
70+ name : wheels
71+ path : ./wheelhouse
0 commit comments