1
+ on :
2
+ workflow_dispatch :
3
+ push :
4
+ tags :
5
+ - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6
+
7
+ name : Creating release
8
+
9
+ env :
10
+ CIBW_TEST_EXTRAS : test
11
+ CIBW_TEST_COMMAND : " pytest {project}/tests"
12
+ CIBW_TEST_SKIP : " *_arm64 *_universal2:arm64"
13
+ CIBW_ARCHS_MACOS : " x86_64 universal2"
14
+ CIBW_BEFORE_BUILD_LINUX : " yum install -y gcc && curl -sL http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && tar -zxvf ta-lib-0.4.0-src.tar.gz && rm ta-lib-0.4.0-src.tar.gz && cd ta-lib && ./configure && make && make install"
15
+ CIBW_BEFORE_BUILD_MACOS : " brew install ta-lib"
16
+ CIBW_BEFORE_BUILD_WINDOWS : " curl -sL http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-msvc.zip -o $HOME/ta-lib.zip --create-dirs && 7z x $HOME/ta-lib.zip -o/c/ta-lib && mv /c/ta-lib/ta-lib/* /c/ta-lib/ && rm -rf /c/ta-lib/ta-lib && cd /c/ta-lib/c/make/cdr/win32/msvc && nmake"
17
+
18
+
19
+ jobs :
20
+ # Build & test simple source release before wasting hours building and
21
+ # testing the binary build matrix.
22
+ sdist :
23
+ name : Creating source release
24
+ runs-on : ubuntu-latest
25
+ steps :
26
+ - uses : actions/checkout@v2
27
+
28
+ - name : Setting up Python
29
+ uses : actions/setup-python@v2
30
+ with :
31
+ python-version : 3.8
32
+
33
+ - name : Installing python build dependencies
34
+ run : |
35
+ python -m pip install --upgrade pip
36
+ python -m pip install --upgrade setuptools
37
+
38
+ - name : Building source distribution
39
+ run : |
40
+ pip install -e ".[release]"
41
+ python setup.py sdist
42
+
43
+ - name : Ensuring documentation builds
44
+ run : |
45
+ cd docs && make clean && make html
46
+
47
+ - uses : actions/upload-artifact@v2
48
+ with :
49
+ path : dist/*.tar.gz
50
+
51
+ build_wheels :
52
+ needs : [sdist]
53
+ name : " [${{ strategy.job-index }}/${{ strategy.job-total }}] py${{ matrix.py }} on ${{ matrix.os }}"
54
+ runs-on : ${{ matrix.os }}
55
+ strategy :
56
+ fail-fast : true
57
+ matrix :
58
+ os : [ubuntu-20.04, windows-2019, macos-10.15]
59
+ # cp - CPython
60
+ # pp - PyPy
61
+ py : [cp37", "cp38", "cp39", "cp310", "pp37"]
62
+
63
+ steps :
64
+ - uses : actions/checkout@v2
65
+
66
+ - uses : actions/setup-python@v2
67
+ name : Setting up Python
68
+ with :
69
+ python-version : ' 3.8'
70
+
71
+ - name : Set up QEMU
72
+ if : runner.os == 'Linux'
73
+ uses : docker/setup-qemu-action@v1
74
+ with :
75
+ platforms : all
76
+
77
+ - name : Build & test wheels
78
+
79
+ env :
80
+ CIBW_ARCHS_LINUX : auto aarch64 ppc64le
81
+ CIBW_BUILD : " ${{ matrix.py }}-*"
82
+
83
+ - uses : actions/upload-artifact@v2
84
+ with :
85
+ path : ./wheelhouse/*.whl
0 commit comments