mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 09:50:01 +00:00
Build linux and macOS wheels on GitHub Actions. (#409)
This commit is contained in:
parent
12506d8d91
commit
2849f5582a
4 changed files with 154 additions and 5 deletions
67
.github/workflows/linux.yml
vendored
Normal file
67
.github/workflows/linux.yml
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
name: Build Linux Wheels
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
create:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Cythonize
|
||||
shell: bash
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip -V
|
||||
pip install -r requirements.txt
|
||||
make cython
|
||||
#python setup.py sdist
|
||||
|
||||
- name: Build wheels
|
||||
shell: bash
|
||||
run: |
|
||||
make linux-wheel
|
||||
|
||||
- name: Run test (3.8)
|
||||
run: |
|
||||
pip install pytest
|
||||
pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse
|
||||
pytest -v test
|
||||
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Run test (3.7)
|
||||
run: |
|
||||
pip install pytest
|
||||
pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse
|
||||
pytest -v test
|
||||
|
||||
- name: Set up Python 3.6
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.6
|
||||
|
||||
- name: Run test (3.6)
|
||||
run: |
|
||||
pip install pytest
|
||||
pip install -v msgpack --only-binary :all: --no-index -f dist/wheelhouse
|
||||
pytest -v test
|
||||
|
||||
|
||||
- name: Upload Wheels
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: linux-wheels
|
||||
path: ./dist/wheelhouse/
|
||||
76
.github/workflows/mac.yml
vendored
Normal file
76
.github/workflows/mac.yml
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
name: Build macOS Wheels
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
create:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: "3.8"
|
||||
|
||||
- name: Cythonize
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r requirements.txt
|
||||
make cython
|
||||
|
||||
- name: Build wheel
|
||||
run: |
|
||||
pip install setuptools wheel
|
||||
python setup.py bdist_wheel
|
||||
|
||||
- name: Run test
|
||||
run: |
|
||||
pip install pytest
|
||||
pip install -v msgpack --only-binary :all: -f dist/ --no-index
|
||||
pytest -v test
|
||||
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: "3.7"
|
||||
|
||||
- name: Build wheel
|
||||
run: |
|
||||
pip install setuptools wheel
|
||||
python setup.py bdist_wheel
|
||||
|
||||
- name: Run test
|
||||
run: |
|
||||
pip install pytest
|
||||
pip install -v msgpack --only-binary :all: -f dist/ --no-index
|
||||
pytest -v test
|
||||
|
||||
|
||||
- name: Set up Python 3.6
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: "3.6"
|
||||
|
||||
- name: Build wheel
|
||||
run: |
|
||||
pip install setuptools wheel
|
||||
python setup.py bdist_wheel
|
||||
|
||||
- name: Run test
|
||||
run: |
|
||||
pip install pytest
|
||||
pip install -v msgpack --only-binary :all: -f dist/ --no-index
|
||||
pytest -v test
|
||||
|
||||
|
||||
- name: Upload Wheels
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: macos-wheels
|
||||
path: ./dist/
|
||||
8
Makefile
8
Makefile
|
|
@ -30,10 +30,10 @@ clean:
|
|||
|
||||
.PHONY: update-docker
|
||||
update-docker:
|
||||
docker pull quay.io/pypa/manylinux1_i686
|
||||
docker pull quay.io/pypa/manylinux1_x86_64
|
||||
docker pull quay.io/pypa/manylinux2010_i686
|
||||
docker pull quay.io/pypa/manylinux2010_x86_64
|
||||
|
||||
.PHONY: linux-wheel
|
||||
linux-wheel:
|
||||
docker run --rm -ti -v `pwd`:/project -w /project quay.io/pypa/manylinux1_i686 bash docker/buildwheel.sh
|
||||
docker run --rm -ti -v `pwd`:/project -w /project quay.io/pypa/manylinux1_x86_64 bash docker/buildwheel.sh
|
||||
docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2010_i686 bash docker/buildwheel.sh
|
||||
docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2010_x86_64 bash docker/buildwheel.sh
|
||||
|
|
|
|||
|
|
@ -10,5 +10,11 @@ echo "arch=$ARCH"
|
|||
for V in "${PYTHON_VERSIONS[@]}"; do
|
||||
PYBIN=/opt/python/$V/bin
|
||||
rm -rf build/ # Avoid lib build by narrow Python is used by wide python
|
||||
$PYBIN/python setup.py bdist_wheel -p manylinux1_${ARCH}
|
||||
$PYBIN/python setup.py bdist_wheel
|
||||
done
|
||||
|
||||
cd dist
|
||||
for whl in *.whl; do
|
||||
auditwheel repair "$whl"
|
||||
rm "$whl"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue