Skip to content

Commit 0b45906

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 0b45906

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,24 @@ 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 }}/dependecies
17+
- uses: actions/upload-artifact@v2
18+
with:
19+
name: dependencies
20+
path: ${{ github.workspace }}/dependencies/**
21+
1022
build:
1123
runs-on: ubuntu-latest
1224
strategy:
1325
matrix:
1426
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
27+
needs: [build_talib]
1528
steps:
1629
- uses: actions/checkout@v2
1730
- name: Set up Python ${{ matrix.python-version }}
@@ -24,11 +37,14 @@ jobs:
2437
python -m pip install -r requirements.txt
2538
python -m pip install -r requirements_test.txt
2639
pip install flake8 pytest
27-
./tools/build_talib_from_source.bash $DEPS_PATH
2840
env:
2941
DEPS_PATH: ${{ github.workspace }}/dependencies
3042
TA_INCLUDE_PATH: ${{ github.workspace }}/dependencies/include
3143
TA_LIBRARY_PATH: ${{ github.workspace }}/dependencies/lib
44+
- uses: actions/download-artifact@v2
45+
with:
46+
name: depedencies
47+
path: ${{ github.workspace }}/depedencies
3248
- name: Build cython modules in-place
3349
run: |
3450
python setup.py build_ext --inplace --include-dirs=$TA_INCLUDE_PATH --library-dirs=$TA_LIBRARY_PATH

0 commit comments

Comments
 (0)