-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (127 loc) · 3.84 KB
/
ci.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: CI
on:
- push
- pull_request
- workflow_dispatch
jobs:
linux:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- name: checkout
uses: actions/checkout@v2
- name: Setup dependencies
run: |
set -eux
for py in cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311; do
/opt/python/${py}/bin/python -m pip install ninja wheel cython
done
- name: Fetch source dependencies
env:
IVPM_PYTHON: /opt/python/cp37-cp37m/bin/python
run: |
set -eux
${IVPM_PYTHON} -m pip install ivpm twine auditwheel
${IVPM_PYTHON} -m ivpm update -a
ls packages/python
ls packages/python/bin
./packages/python/bin/python -m pip install cython setuptools wheel auditwheel build twine
- name: Build wheel
env:
BUILD_NUM: ${{ github.run_id }}
run: |
set -eux
for py in cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311; do
/opt/python/${py}/bin/python setup.py bdist_wheel
done
- name: Audit Wheels
env:
IVPM_PYTHON: /opt/python/cp37-cp37m/bin/python
run: |
for whl in dist/*.whl; do
${IVPM_PYTHON} repair $whl
done
- name: Publish to PyPi
if: startsWith(github.ref, 'refs/heads/main')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
./packages/python/bin/twine upload wheelhouse/*.whl
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Fetch dependencies
run: |
python3 --version
python3 -m pip install ivpm
python3 -m ivpm update -a
./packages/python/bin/python3 -m pip install cython setuptools wheel build twine
- name: Build wheel
env:
BUILD_NUM: ${{ github.run_id }}
run: |
./packages/python/bin/python3 setup.py bdist_wheel
- name: Publish to PyPi
if: startsWith(github.ref, 'refs/heads/main')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
./packages/python/bin/python3 -m twine upload dist/*.whl
windows:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
include:
- platform: windows-latest
build_arch: x64
python_arch: x64
spec: '3.8'
- platform: windows-latest
build_arch: x64
python_arch: x64
spec: '3.9'
- platform: windows-latest
build_arch: x64
python_arch: x64
spec: '3.10'
- platform: windows-latest
build_arch: x64
python_arch: x64
spec: '3.11'
# - platform: windows-latest
# build_arch: x64
# python_arch: x86
# spec: '3.10'
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install python ${{ matrix.spec }}
uses: actions/setup-python@v2
with:
architecture: ${{ matrix.python_arch }}
python-version: ${{ matrix.spec }}
- name: Build/Test Package
shell: bash
env:
BUILD_NUM: ${{ github.run_id }}
run: |
python -V
python -m pip install ivpm
python -m ivpm update -a
ls packages/python
ls packages/python/Lib
ls packages/python/Scripts
./packages/python/Scripts/python -m pip install cython setuptools wheel build twine
./packages/python/Scripts/python setup.py build bdist_wheel
ls dist
- name: Publish to PyPi
if: startsWith(github.ref, 'refs/heads/main')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
shell: bash
run: |
./packages/python/Scripts/python -m twine upload dist/*.whl