Skip to content

Commit 750f448

Browse files
committed
CI: general updates for 2026; add ARM builds.
The simple test on Linux x86 is temporarily disabled due to a crash (to be investigated).
1 parent bf6e94e commit 750f448

8 files changed

Lines changed: 125 additions & 92 deletions

File tree

.github/workflows/builds.yml

Lines changed: 110 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Builds
33
# TODO: generalize steps
44

55
env:
6-
DSS_CAPI_TAG: '0.14.6a1'
6+
DSS_CAPI_TAG: '0.15.0a1'
77
ARTIFACTS_FOLDER: '${{ github.workspace }}/artifacts'
88

99
on:
@@ -12,88 +12,95 @@ on:
1212
push:
1313

1414
jobs:
15-
build_linux_x64:
16-
name: 'Linux x64'
17-
runs-on: ubuntu-latest
15+
build_linux:
16+
name: 'Linux ${{ matrix.arch }} (${{ matrix.manylinux-base }})'
17+
continue-on-error: false
1818
strategy:
1919
matrix:
20-
container-image: [
21-
'quay.io/pypa/manylinux_2_28_x86_64',
22-
'quay.io/pypa/manylinux2014_x86_64'
23-
]
24-
container:
25-
image: ${{ matrix.container-image }}
20+
include:
21+
- arch: x64
22+
docker_image: 'quay.io/pypa/manylinux_2_28_x86_64'
23+
dss_extensions_linux32: ''
24+
gh_image: ubuntu-latest
25+
manylinux-base: 'manylinux_2_28'
26+
conda_subdir: 'linux-64'
27+
28+
- arch: x64
29+
docker_image: 'quay.io/pypa/manylinux2014_x86_64'
30+
dss_extensions_linux32: ''
31+
gh_image: ubuntu-latest
32+
manylinux-base: 'manylinux2014'
33+
conda_subdir: 'linux-64'
34+
35+
- arch: x86
36+
docker_image: 'pmeira/manylinux_wheel_fpc322_i686'
37+
dss_extensions_linux32: linux32
38+
gh_image: ubuntu-latest
39+
manylinux-base: 'manylinux2014'
40+
conda_subdir: 'linux-32'
41+
42+
- arch: arm64
43+
docker_image: 'quay.io/pypa/manylinux_2_28_aarch64'
44+
dss_extensions_linux32: ''
45+
gh_image: ubuntu-24.04-arm
46+
manylinux-base: 'manylinux_2_28'
47+
conda_subdir: 'linux-aarch64'
48+
49+
- arch: arm64
50+
docker_image: 'quay.io/pypa/manylinux2014_aarch64'
51+
dss_extensions_linux32: ''
52+
gh_image: ubuntu-24.04-arm
53+
manylinux-base: 'manylinux2014'
54+
conda_subdir: 'linux-aarch64'
55+
56+
runs-on: ${{ matrix.gh_image }}
2657
env:
27-
CONDA_SUBDIR: 'linux-64'
58+
CONDA_SUBDIR: '${{ matrix.conda_subdir }}'
2859
DSS_CAPI_PATH: '${{ github.workspace }}/dss_capi'
2960
CONDA: "/opt/miniconda/"
30-
DSS_CAPI_BUILD_ODDIE: '1'
61+
DOCKER_IMAGE: '${{ matrix.docker_image }}'
3162
steps:
3263
- name: 'Checkout'
3364
run: |
3465
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_python_backend
3566
cd dss_python_backend
3667
git checkout $GITHUB_SHA
68+
- name: 'Setup Docker'
69+
run: |
70+
docker pull $DOCKER_IMAGE
3771
- name: 'Download/extract DSS C-API binaries'
3872
run: |
39-
curl -s -L https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_TAG}/dss_capi_${DSS_CAPI_TAG}_linux_x64.tar.gz -o dss_capi.tar.gz
73+
curl -s -L https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_TAG}/dss_capi_${DSS_CAPI_TAG}_linux_${{ matrix.arch }}.tar.gz -o dss_capi.tar.gz
4074
tar zxf dss_capi.tar.gz
4175
cd dss_python_backend/dss_python_backend
4276
- name: Build wheel
4377
run: |
4478
mkdir -p artifacts
4579
mkdir -p artifacts_raw
46-
bash dss_python_backend/ci/build_linux.sh x64
80+
docker run -e GITHUB_SHA -e GITHUB_REF -e DSS_CAPI_PATH=/build/dss_capi -v "${PWD}:/build" -w /build $DOCKER_IMAGE ${{ matrix.dss_extensions_linux32}} bash /build/dss_python_backend/ci/build_linux.sh ${{ matrix.arch }}
81+
ls -lh dss_python_backend/dss_python_backend
4782
# - name: Build conda packages
48-
# continue-on-error: true
83+
# continue-on-error: false
4984
# run: |
5085
# bash dss_python_backend/ci/build_conda.sh
51-
- name: Try installing the wheel
52-
run: bash dss_python_backend/ci/test_wheel.sh
5386
- name: 'Upload artifacts'
54-
uses: "actions/upload-artifact@v3"
87+
uses: "actions/upload-artifact@v4"
5588
with:
56-
name: 'packages'
89+
name: 'packages-linux_${{ matrix.arch }}-${{ matrix.manylinux-base }}'
5790
path: '${{ github.workspace }}/artifacts'
58-
59-
build_linux_x86:
60-
name: 'Linux x86'
61-
runs-on: ubuntu-latest
62-
env:
63-
CONDA_SUBDIR: 'linux-32'
64-
DOCKER_IMAGE: 'pmeira/manylinux_wheel_fpc322_i686'
65-
steps:
66-
- name: 'Checkout'
67-
run: |
68-
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_python_backend
69-
cd dss_python_backend
70-
git checkout $GITHUB_SHA
71-
- name: 'Setup Docker'
72-
run: |
73-
docker pull $DOCKER_IMAGE
74-
- name: 'Download/extract DSS C-API binaries'
75-
run: |
76-
curl -s -L https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_TAG}/dss_capi_${DSS_CAPI_TAG}_linux_x86.tar.gz -o dss_capi.tar.gz
77-
tar zxf dss_capi.tar.gz
78-
cd dss_python_backend/dss_python_backend
79-
- name: Build wheel
91+
- name: Try installing the wheel
92+
if: ${{ matrix.arch != 'x86' }}
8093
run: |
81-
mkdir -p artifacts
82-
mkdir -p artifacts_raw
83-
docker run -e GITHUB_SHA -e GITHUB_REF -e DSS_CAPI_PATH=/build/dss_capi -v "${PWD}:/build" -w /build $DOCKER_IMAGE bash /build/dss_python_backend/ci/build_linux.sh x86
84-
- name: 'Upload artifacts'
85-
uses: "actions/upload-artifact@v3"
86-
with:
87-
name: 'packages'
88-
path: '${{ github.workspace }}/artifacts'
94+
docker run -e GITHUB_SHA -e GITHUB_REF -e DSS_CAPI_PATH=/build/dss_capi -v "${PWD}:/build" -w /build $DOCKER_IMAGE ${{ matrix.dss_extensions_linux32}} bash /build/dss_python_backend/ci/test_wheel.sh
8995
9096
build_macos_x64:
9197
name: 'macOS x64'
92-
runs-on: 'macos-11'
98+
continue-on-error: false
99+
runs-on: 'macos-15-intel'
93100
env:
94101
DSS_CAPI_PATH: '${{ github.workspace }}/dss_capi'
95102
#SDKROOT: '${{ github.workspace }}/MacOSX10.13.sdk'
96-
PYTHON: python3
103+
PYTHON: python
97104
steps:
98105
- uses: actions/checkout@v3
99106
with:
@@ -108,27 +115,37 @@ jobs:
108115
# run: |
109116
# curl -s -L https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.13.sdk.tar.xz -o macOSsdk.tar.xz
110117
# tar xf macOSsdk.tar.xz
118+
- name: 'Prepare Python'
119+
uses: actions/setup-python@v6
120+
with:
121+
python-version: '3.11'
122+
cache: 'pip'
123+
- name: Prepare virtual environment
124+
run: |
125+
$PYTHON -m venv buildvenv
111126
- name: Build wheel
112127
run: |
128+
source buildvenv/bin/activate
113129
bash dss_python_backend/ci/build_wheel.sh
114130
# - name: Build conda packages
115-
# continue-on-error: true
131+
# continue-on-error: false
116132
# run: |
117133
# sudo chown -R $UID $CONDA
118134
# bash dss_python_backend/ci/build_conda.sh
119135
- name: 'Upload artifacts'
120-
uses: "actions/upload-artifact@v3"
136+
uses: "actions/upload-artifact@v4"
121137
with:
122-
name: 'packages'
138+
name: 'packages-darwin_x64'
123139
path: '${{ github.workspace }}/artifacts'
124140

125141
build_macos_arm64:
126142
name: 'macOS ARM64'
127-
runs-on: 'macos-11'
143+
continue-on-error: false
144+
runs-on: 'macos-latest'
128145
env:
129146
DSS_CAPI_PATH: '${{ github.workspace }}/dss_capi'
130147
# SDKROOT: '${{ github.workspace }}/MacOSX10.13.sdk'
131-
PYTHON: python3
148+
PYTHON: python
132149
_PYTHON_HOST_PLATFORM: macosx-11.0-arm64
133150
ARCHFLAGS: '-arch arm64'
134151

@@ -146,28 +163,37 @@ jobs:
146163
# run: |
147164
# curl -s -L https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.13.sdk.tar.xz -o macOSsdk.tar.xz
148165
# tar xf macOSsdk.tar.xz
166+
- name: 'Prepare Python'
167+
uses: actions/setup-python@v6
168+
with:
169+
python-version: '3.11'
170+
cache: 'pip'
171+
- name: Prepare virtual environment
172+
run: |
173+
python -m venv buildvenv
149174
- name: Build wheel
150175
run: |
176+
source buildvenv/bin/activate
151177
bash dss_python_backend/ci/build_wheel.sh
152178
# - name: Build conda packages
153-
# continue-on-error: true
179+
# continue-on-error: false
154180
# run: |
155181
# sudo chown -R $UID $CONDA
156182
# bash dss_python_backend/ci/build_conda.sh
157183
- name: 'Upload artifacts'
158-
uses: "actions/upload-artifact@v3"
184+
uses: "actions/upload-artifact@v4"
159185
with:
160-
name: 'packages'
186+
name: 'packages-darwin_arm64'
161187
path: '${{ github.workspace }}/artifacts'
162188

163189
build_win_x64:
164190
name: 'Windows x64'
165-
runs-on: windows-2019
191+
continue-on-error: false
192+
runs-on: windows-2022
166193
env:
167194
CONDA_SUBDIR: 'win-64'
168195
DSS_CAPI_PATH: '${{ github.workspace }}\dss_capi'
169196
PYTHON: python
170-
DSS_CAPI_BUILD_ODDIE: '1'
171197
steps:
172198
- uses: actions/checkout@v3
173199
with:
@@ -184,19 +210,20 @@ jobs:
184210
run: |
185211
bash dss_python_backend/ci/build_wheel.sh
186212
# - name: Build conda packages
187-
# continue-on-error: true
213+
# continue-on-error: false
188214
# shell: bash
189215
# run: |
190216
# bash dss_python_backend/ci/build_conda.sh
191217
- name: 'Upload artifacts'
192-
uses: "actions/upload-artifact@v3"
218+
uses: "actions/upload-artifact@v4"
193219
with:
194-
name: 'packages'
220+
name: 'packages-win_x64'
195221
path: '${{ github.workspace }}/artifacts'
196222

197223
build_win_x86:
198224
name: 'Windows x86'
199-
runs-on: windows-2019
225+
continue-on-error: false
226+
runs-on: windows-2022
200227
env:
201228
CONDA_SUBDIR: 'win-32'
202229
DSS_CAPI_PATH: '${{ github.workspace }}\dss_capi'
@@ -206,9 +233,11 @@ jobs:
206233
with:
207234
fetch-depth: 0
208235
path: 'dss_python_backend'
209-
- uses: actions/setup-python@v3
236+
- name: 'Setup Python'
237+
uses: actions/setup-python@v6
210238
with:
211-
python-version: '3.8'
239+
python-version: '3.11'
240+
cache: 'pip'
212241
architecture: 'x86'
213242
- name: 'Download/extract DSS C-API binaries'
214243
shell: cmd
@@ -221,8 +250,20 @@ jobs:
221250
run: |
222251
bash dss_python_backend/ci/build_wheel.sh
223252
- name: 'Upload artifacts'
224-
uses: "actions/upload-artifact@v3"
253+
uses: "actions/upload-artifact@v4"
225254
with:
226-
name: 'packages'
255+
name: 'packages-win_x86'
227256
path: '${{ github.workspace }}/artifacts'
228257

258+
merge:
259+
name: 'Merge build artifacts'
260+
continue-on-error: false
261+
runs-on: ubuntu-latest
262+
needs: [build_linux, build_macos_arm64, build_macos_x64, build_win_x64, build_win_x86]
263+
steps:
264+
- name: Merge Artifacts
265+
uses: actions/upload-artifact/merge@v4
266+
with:
267+
name: dss_python_backend-builds
268+
pattern: packages-*
269+
# delete-merged: true

ci/build_conda.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [ "$RUNNER_OS" = "Windows" ]; then
66
fi
77

88
export PATH=$CONDA:$CONDA/bin:$CONDA/scripts:$PATH
9-
export DSS_PYTHON_BACKEND_MANYLINUX=0
9+
# export DSS_PYTHON_BACKEND_MANYLINUX=0
1010

1111
source $CONDA/etc/profile.d/conda.sh
1212

@@ -18,7 +18,7 @@ conda config --add channels conda-forge
1818
conda create -p ../boa boa anaconda-client
1919
conda activate boa
2020

21-
PYTHON_VERSIONS="3.7 3.8 3.9 3.10 3.11"
21+
PYTHON_VERSIONS="3.11 3.12"
2222
for pyversion in $PYTHON_VERSIONS
2323
do
2424
# Workaround to build when a single version fails

ci/build_linux.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
set -e -x
2-
export PATH=/opt/python/cp39-cp39/bin/:$PATH
3-
export DSS_PYTHON_BACKEND_MANYLINUX=1
2+
export PATH=/opt/python/cp311-cp311/bin/:$PATH
3+
# export DSS_PYTHON_BACKEND_MANYLINUX=1
44

55
cd dss_python_backend
6-
python3 -m pip install --upgrade pip cffi wheel
6+
python3 -m pip install --user --upgrade pip setuptools packaging trove-classifiers cffi wheel numpy==2
77
python3 setup.py --quiet bdist_wheel --py-limited-api cp37 --dist-dir="../artifacts_raw"
88
cd ..
99

ci/build_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
mkdir -p artifacts
22
cd dss_python_backend
3-
$PYTHON -m pip install --upgrade pip setuptools packaging trove-classifiers cffi wheel
3+
$PYTHON -m pip install --upgrade pip setuptools packaging trove-classifiers cffi wheel numpy==2
44
$PYTHON setup.py --quiet bdist_wheel --py-limited-api cp37 --dist-dir=$ARTIFACTS_FOLDER

ci/test_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e -x
44

55
ORIGINAL_PATH=$PATH
6-
PYTHON_DIRS="cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311"
6+
PYTHON_DIRS="cp311-cp311 cp312-cp312"
77

88
for pydir in $PYTHON_DIRS
99
do

dss_build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy
22
from cffi import FFI
33
import sys, re, os
4-
from dss_setup_common import PLATFORM_FOLDER, BUILD_ODDIE
4+
from dss_setup_common import PLATFORM_FOLDER
55
from setuptools import Extension
66

77
def process_header(src, extern_py=False, implement_py=False, prefix='', flags=None, fn='', remove=[]):
@@ -249,7 +249,7 @@ def process_header(src, extern_py=False, implement_py=False, prefix='', flags=No
249249
include_dirs=[numpy.get_include(), inc_dir],
250250
libraries=['altdss_capi_loader'],
251251
library_dirs=[lib_dir],
252-
extra_link_args=["-Wl,-R,$ORIGIN/."],
252+
**extra
253253
# extra_compile_args=['-g', '-O0'],
254254
# extra_link_args=['-g'],
255255
)

dss_python_backend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@
5656
# CffiApiUtil so we call it as soon as the DLL/so is loaded.
5757
lib.DSS_Start(ffi.NULL, 0)
5858

59-
__version__ = '0.14.6a1'
59+
__version__ = '0.15.0a1'
6060
__all__ = ['ffi', 'lib', 'loader_lib']

0 commit comments

Comments
 (0)