-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (80 loc) · 2.14 KB
/
main.yml
File metadata and controls
85 lines (80 loc) · 2.14 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
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
name: OpenCTM Release
on: [push]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.10", "3.9", "3.8"]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Run tests
run: |
python -m pip install pipenv==2023.4.20
pipenv install -d --python ${{ matrix.python }}
pipenv run pytest tests
shell: bash
package-source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Build source package
run: python setup.py sdist
- name: Upload source package
uses: actions/upload-artifact@v1
with:
name: dist
path: dist/
package-wheel:
runs-on: ${{ matrix.os }}
needs: [test]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Build wheels
env:
CIBW_SKIP: cp27-* pp27-* cp34-*
run: |
pip install cibuildwheel
cibuildwheel --output-dir dist
shell: bash
- name: Upload wheels
uses: actions/upload-artifact@v1
with:
name: dist
path: dist/
publish:
runs-on: ubuntu-latest
needs: [test, package-source, package-wheel]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
with:
name: dist
path: dist/
- name: Publish to PyPI
if: github.event_name == 'push' && contains(github.event.ref, 'master')
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.pypi_user }}
password: ${{ secrets.pypi_password }}