-
Notifications
You must be signed in to change notification settings - Fork 6
74 lines (73 loc) · 2.54 KB
/
pythonpackage.yml
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
name: pycld3_ci
on: [push]
jobs:
macos_wheels:
name: Build MacOS wheels
# Note: the container MacOS version may differ from the SDK
# used to build Python there. It is the latter that determines
# the wheel's platform tag.
# https://github.com/actions/virtual-environments/tree/master/images/macos
# https://github.com/MacPython/wiki/wiki/Spinning-wheels
# https://github.com/actions/virtual-environments/issues/696
runs-on: [macOS-10.15]
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
brew install -v protobuf
{ protoc --version; sw_vers; python3 -c "import distutils.util; print(distutils.util.get_platform())"; } > system_info.log
python -m pip install --upgrade --disable-pip-version-check -r requirements-dev.txt
python -m pip install --upgrade --disable-pip-version-check delocate
- name: Build wheels
run: |
USE_CYTHON=1 python setup.py --quiet build
python -m pip wheel -v --no-deps --wheel-dir wheels/ .
- name: Repair wheels
run: |
delocate-listdeps --all ./wheels/*.whl
delocate-wheel -w wheelhouse -v ./wheels/*.whl
- uses: actions/upload-artifact@v1
with:
name: MacOS cp${{ matrix.python-version }} wheel
path: wheelhouse/
- uses: actions/upload-artifact@v1
with:
name: System information
path: system_info.log
sdist:
name: Build source distribution (sdist)
runs-on: [ubuntu-latest]
strategy:
max-parallel: 4
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends g++ protobuf-compiler libprotobuf-dev
python -m pip install --upgrade --disable-pip-version-check -r requirements-dev.txt
- name: Build sdist
env:
USE_CYTHON: 1
run: |
python setup.py --verbose build
python setup.py --verbose sdist
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: Source distribution
path: dist/