Skip to content

Commit 8722ece

Browse files
committed
Speedup tests by only compiling ta-lib once.
It's stored as an artifact and passed into the test matrix jobs.
1 parent 99359d5 commit 8722ece

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/tests.yml

+18-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,25 @@ on:
77
branches: [ master ]
88

99
jobs:
10+
build_talib:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Build talib
15+
run: |
16+
./tools/build_talib_from_source.bash ${{ github.workspace }}/dependencies
17+
- uses: actions/upload-artifact@v2
18+
with:
19+
name: dependencies
20+
path: ${{ github.workspace }}/dependencies/
21+
if-no-files-found: error
22+
1023
build:
1124
runs-on: ubuntu-latest
1225
strategy:
1326
matrix:
1427
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
28+
needs: [build_talib]
1529
steps:
1630
- uses: actions/checkout@v2
1731
- name: Set up Python ${{ matrix.python-version }}
@@ -24,11 +38,14 @@ jobs:
2438
python -m pip install -r requirements.txt
2539
python -m pip install -r requirements_test.txt
2640
pip install flake8 pytest
27-
./tools/build_talib_from_source.bash $DEPS_PATH
2841
env:
2942
DEPS_PATH: ${{ github.workspace }}/dependencies
3043
TA_INCLUDE_PATH: ${{ github.workspace }}/dependencies/include
3144
TA_LIBRARY_PATH: ${{ github.workspace }}/dependencies/lib
45+
- uses: actions/download-artifact@v2
46+
with:
47+
name: depedencies
48+
path: ${{ github.workspace }}/depedencies
3249
- name: Build cython modules in-place
3350
run: |
3451
python setup.py build_ext --inplace --include-dirs=$TA_INCLUDE_PATH --library-dirs=$TA_LIBRARY_PATH

0 commit comments

Comments
 (0)