Skip to content

Commit a7e4f56

Browse files
committed
.github/workflows: adding linux arm64
1 parent aac6fb1 commit a7e4f56

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed

.github/workflows/build.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,121 @@ jobs:
126126
with:
127127
path: ./wheelhouse/*.whl
128128
name: ${{ env.WHEEL_NAME }}
129+
build_manylinux_arm64:
130+
name: Build ManyLinux arm64 wheels
131+
strategy:
132+
matrix:
133+
os: ["ubuntu-22.04-arm"]
134+
runs-on: ${{ matrix.os }}
135+
env:
136+
PIP_NO_VERIFY: 0
137+
PIP_VERBOSE: 1
138+
CIBW_BUILD_VERBOSITY: 2
139+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
140+
CIBW_MANYLINUX_I686_IMAGE: manylinux_2_28
141+
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux_2_28
142+
CIBW_MANYLINUX_PYPY_I686_IMAGE: manylinux_2_28
143+
CIBW_BEFORE_BUILD: pip install setuptools==58.0.1&&pip install -U Cython&&pip install -U wheel numpy
144+
CIBW_BEFORE_TEST: pip install -U Cython
145+
CIBW_TEST_REQUIRES: pytest pandas polars
146+
CIBW_TEST_COMMAND: >
147+
cd .. &&
148+
pytest -k "not RSI and not threading" {project}/tests
149+
CIBW_TEST_SKIP: "*win32 cp*"
150+
CIBW_SKIP: "pp* cp*-musllinux*"
151+
steps:
152+
- name: Checkout repository
153+
uses: actions/checkout@v4
154+
- name: Install GCC and CMake
155+
run: |
156+
sudo apt-get update
157+
sudo apt-get install -y gcc g++ cmake
158+
- name: Make script executable
159+
run: chmod +x ./tools/build_wheel_linux.sh
160+
- name: Build TA-Lib
161+
run: ./tools/build_wheel_linux.sh
162+
shell: bash
163+
- name: Build wheels
164+
uses: pypa/[email protected]
165+
env:
166+
CIBW_ARCHS_LINUX: aarch64
167+
CIBW_BUILD_FRONTEND: build
168+
CIBW_ENVIRONMENT_LINUX : >
169+
TA_LIBRARY_PATH="ta-lib-install/lib"
170+
TA_INCLUDE_PATH="ta-lib-install/include"
171+
PIP_NO_BUILD_ISOLATION=false
172+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
173+
export LD_LIBRARY_PATH="/project/ta-lib-install/lib:$LD_LIBRARY_PATH"
174+
auditwheel repair -w {dest_dir} {wheel}
175+
- name: Set wheel name
176+
run: |
177+
echo "WHEEL_NAME=ta_lib-${{env.TALIB_PY_VER}}-manylinux_aarch64" >> $GITHUB_ENV
178+
- name: Upload wheels
179+
uses: actions/upload-artifact@v4
180+
with:
181+
path: ./wheelhouse/*.whl
182+
name: ${{ env.WHEEL_NAME }}
183+
build_musllinux_aarch64:
184+
name: Build MuslLinux arm64 wheels
185+
strategy:
186+
matrix:
187+
os: ["ubuntu-22.04"]
188+
runs-on: ${{ matrix.os }}
189+
env:
190+
PIP_NO_VERIFY: 0
191+
PIP_VERBOSE: 1
192+
CIBW_BUILD_VERBOSITY: 2
193+
CIBW_BEFORE_BUILD: pip install setuptools==58.0.1&&pip install Cython==0.29.37&&pip install -U wheel numpy
194+
CIBW_BEFORE_TEST: apk add bash&&bash setup_rust.sh&&. "$HOME/.cargo/env"&&pip install Cython==0.29.37&&pip install -U maturin&&pip install -U polars
195+
CIBW_TEST_REQUIRES: pytest pandas polars
196+
CIBW_TEST_COMMAND: >
197+
cd .. &&
198+
pytest -k "not RSI and not threading" {project}/tests
199+
CIBW_TEST_SKIP: "*win32 cp*"
200+
CIBW_SKIP: "pp* cp*-manylinux*"
201+
steps:
202+
- name: Checkout repository
203+
uses: actions/checkout@v4
204+
- name: Setup latest Alpine Linux
205+
uses: jirutka/setup-alpine@v1
206+
with:
207+
branch: v3.15
208+
packages: >
209+
build-base
210+
bash
211+
curl
212+
unzip
213+
gcc
214+
g++
215+
cmake
216+
arch: aarch64
217+
volumes: ${{ github.workspace }}:/project
218+
- name: Make script executable
219+
run: chmod +x ./tools/build_wheel_linux.sh
220+
- name: Build TA-Lib
221+
run: |
222+
./tools/build_wheel_linux.sh
223+
shell: alpine.sh {0}
224+
- name: Build wheels
225+
uses: pypa/[email protected]
226+
env:
227+
CIBW_ARCHS_LINUX: x86_64
228+
CIBW_BUILD_FRONTEND: build
229+
CIBW_ENVIRONMENT_LINUX : >
230+
TA_LIBRARY_PATH="ta-lib-install/lib"
231+
TA_INCLUDE_PATH="ta-lib-install/include"
232+
PIP_NO_BUILD_ISOLATION=false
233+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
234+
export LD_LIBRARY_PATH="/project/ta-lib-install/lib:$LD_LIBRARY_PATH"
235+
auditwheel repair -w {dest_dir} {wheel}
236+
- name: Set wheel name
237+
run: |
238+
echo "WHEEL_NAME=ta_lib-${{env.TALIB_PY_VER}}-musllinux_aarch64" >> $GITHUB_ENV
239+
- name: Upload wheels
240+
uses: actions/upload-artifact@v4
241+
with:
242+
path: ./wheelhouse/*.whl
243+
name: ${{ env.WHEEL_NAME }}
129244
build_windows_amd64:
130245
name: Build Windows amd64 wheels
131246
strategy:

0 commit comments

Comments
 (0)