Skip to content

Commit 5f49bf3

Browse files
committed
Working on release workflow.
1 parent a85fe02 commit 5f49bf3

File tree

1 file changed

+32
-18
lines changed

1 file changed

+32
-18
lines changed

.github/workflows/release.yml

+32-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,39 @@
11
on:
22
workflow_dispatch:
33
push:
4-
tags:
5-
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
4+
5+
# tags:
6+
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
67

78
name: Creating release
89

910
env:
10-
CIBW_TEST_EXTRAS: test
11+
CIBW_BEFORE_TEST: "pip install -r requirements_test.txt"
1112
CIBW_TEST_COMMAND: "pytest {project}/tests"
1213
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"
14+
CIBW_ARCHS_MACOS: "x86_64 arm64"
15+
CIBW_BEFORE_BUILD: "pip install -r requirements_dev.txt"
16+
# Polars is needed for the test suite, and Polars currently is only building binary packages for py3.6.
17+
# So, we have to install rust before every build.
18+
CIBW_BEFORE_BUILD_LINUX: |
19+
yum install -y gcc && \
20+
curl -4 --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh && \
21+
sh rustup.sh -y && \
22+
curl -L -s https://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz -o ta.tar.gz && \
23+
tar -zxvf ta.tar.gz && \
24+
rm ta.tar.gz && \
25+
cd ta-lib && \
26+
./configure && \
27+
make && \
28+
make install
1529
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-
30+
CIBW_BEFORE_BUILD_WINDOWS: |
31+
curl -L -s https://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-msvc.zip -o ta.zip && ^
32+
7z x $HOME/ta-lib.zip -o/c/ta-lib && ^
33+
mv /c/ta-lib/ta-lib/* /c/ta-lib/ && ^
34+
rm -rf /c/ta-lib/ta-lib && ^
35+
cd /c/ta-lib/c/make/cdr/win32/msvc && ^
36+
nmake
1837
1938
jobs:
2039
# Build & test simple source release before wasting hours building and
@@ -32,18 +51,15 @@ jobs:
3251

3352
- name: Installing python build dependencies
3453
run: |
35-
python -m pip install --upgrade pip
36-
python -m pip install --upgrade setuptools
54+
python -m pip install --upgrade pip wheel
55+
python -m pip install -r requirements.txt
56+
python -m pip install -r requirements_test.txt
57+
pip install flake8 pytest
3758
3859
- name: Building source distribution
3960
run: |
40-
pip install -e ".[release]"
4161
python setup.py sdist
4262
43-
- name: Ensuring documentation builds
44-
run: |
45-
cd docs && make clean && make html
46-
4763
- uses: actions/upload-artifact@v2
4864
with:
4965
path: dist/*.tar.gz
@@ -53,12 +69,10 @@ jobs:
5369
name: "[${{ strategy.job-index }}/${{ strategy.job-total }}] py${{ matrix.py }} on ${{ matrix.os }}"
5470
runs-on: ${{ matrix.os }}
5571
strategy:
56-
fail-fast: true
72+
fail-fast: false
5773
matrix:
5874
os: [ubuntu-20.04, windows-2019, macos-10.15]
59-
# cp - CPython
60-
# pp - PyPy
61-
py: [cp37", "cp38", "cp39", "cp310", "pp37"]
75+
py: ["cp37", "cp38", "cp39", "cp310"]
6276

6377
steps:
6478
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)