-
Notifications
You must be signed in to change notification settings - Fork 5
129 lines (109 loc) · 3.31 KB
/
build.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
name: make binaries
on:
push:
tags:
- 'v[0-9]*'
jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
CIBW_BUILD: cp3[789]*
environment: TEST_PYPI_API_TOKEN
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.9']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
pip install --upgrade pip
pip install --upgrade build
- name: Install cibuildwheel
run: python -m pip install cibuildwheel
- name: Build wheels (ubuntu-latest)
if: matrix.os == 'ubuntu-latest'
run: python -m cibuildwheel --output-dir dist
- name: Build wheels (macos-latest)
if: matrix.os == 'macos-latest'
run: |
python --version
brew install llvm
export LIBRARY_PATH="/usr/local/opt/llvm/lib"
python -m cibuildwheel --output-dir dist
- name: Build wheels (windows-latest)
if: matrix.os == 'windows-latest'
run: python -m cibuildwheel --output-dir dist
- name: Install twine
run: python -m pip install twine
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
run: python -m twine upload --skip-existing --verbose dist/*
- uses: actions/upload-artifact@v2
with:
path: ./dist/*.whl
update_docs:
name: Updating docs
runs-on: ${{ matrix. os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: installing
run: |
pip install --upgrade pip
pip install --upgrade build
python -m build -C--global-option=build_ext -C--global-option=--inplace
pip install sphinx
pip install sphinx_rtd_theme
- name: make the docs
run: |
cd docs
sphinx-apidoc -o . ../snipar/
make html
- uses: actions/upload-artifact@v2
with:
path: ./docs/_build/
#######
# test:
# name: testing on ${{ matrix.os }} and ${{ matrix.python-version }}
# needs: build
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# # os: [ubuntu-latest, macos-latest, windows-latest]
# # python-version: ['3.6', '3.7.1', '3.8']
# os: [macos-latest]
# python-version: ['3.8']
# steps:
# - uses: actions/download-artifact@v2
# with:
# path: ./dist/
# - uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: installing
# run: |
# ls dist
# ls dist/artifact
# pip install --upgrade pip
# pip install wheel
# pip install --no-index --find-links=dist/artifact snipar
# - name: testing
# run: python -m unittest snipar.tesets