Build TA-Lib wheels for Windows #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build TA-Lib wheels for Windows | |
on: | |
workflow_dispatch: | |
env: | |
TALIB_C_VER: 0.4.0 | |
TALIB_PY_VER: 0.5.3 | |
PIP_NO_VERIFY: 0 | |
PIP_VERBOSE: 1 | |
CIBW_BUILD_VERBOSITY: 2 | |
CIBW_BEFORE_BUILD: pip install -U setuptools wheel numpy Cython | |
CIBW_TEST_REQUIRES: pytest pandas polars | |
CIBW_TEST_COMMAND: > | |
cd .. && | |
pytest --rootdir=C: -k "not RSI and not threading" {project}/tests | |
CIBW_TEST_SKIP: "*win32 cp37* cp38* cp39*" | |
CIBW_SKIP: "pp*" | |
MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT: 1 | |
jobs: | |
build_amd64: | |
name: Build Windows amd64 wheels | |
strategy: | |
matrix: | |
os: ["windows-2022"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Set up MSVC for x64 | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64 | |
- name: Build TA-Lib C library | |
run: build_windows.cmd | |
shell: cmd | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.22.0 | |
env: | |
CIBW_ARCHS_WINDOWS: AMD64 | |
CIBW_ENVIRONMENT_WINDOWS: > | |
TA_LIBRARY_PATH="ta-lib-$TALIB_C_VER\\_build;$LIB" | |
TA_INCLUDE_PATH="ta-lib-$TALIB_C_VER\\include;$INCLUDE" | |
PIP_NO_BUILD_ISOLATION=false | |
- name: Set wheel name | |
run: | | |
echo ("WHEEL_NAME=" + "ta_lib-" + $env:TALIB_PY_VER + "-win_amd64") >> $env:GITHUB_ENV | |
- name: Upload wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/*.whl | |
name: ${{ env.WHEEL_NAME }} | |
build_x86: | |
name: Build Windows x86 wheels | |
strategy: | |
matrix: | |
os: ["windows-2022"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Set up MSVC for x86 | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64_x86 | |
- name: Build TA-Lib C library | |
run: build_windows.cmd | |
shell: cmd | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.22.0 | |
env: | |
CIBW_ARCHS_WINDOWS: x86 | |
CIBW_ENVIRONMENT_WINDOWS: > | |
TA_LIBRARY_PATH="ta-lib-$TALIB_C_VER\\_build;$LIB" | |
TA_INCLUDE_PATH="ta-lib-$TALIB_C_VER\\include;$INCLUDE" | |
PIP_NO_BUILD_ISOLATION=false | |
- name: Set wheel name | |
run: | | |
echo ("WHEEL_NAME=" + "ta_lib-" + $env:TALIB_PY_VER + "-win32") >> $env:GITHUB_ENV | |
- name: Upload wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/*.whl | |
name: ${{ env.WHEEL_NAME }} |