@@ -3,7 +3,7 @@ name: Builds
33# TODO: generalize steps
44
55env :
6- DSS_CAPI_TAG : ' 0.14.4 '
6+ DSS_CAPI_TAG : ' 0.15.0b3 '
77 ARTIFACTS_FOLDER : ' ${{ github.workspace }}/artifacts'
88
99on :
1212 push :
1313
1414jobs :
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 : ' quay.io/pypa/manylinux_2_34_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/"
61+ DOCKER_IMAGE : ' ${{ matrix.docker_image }}'
3062 steps :
3163 - name : ' Checkout'
3264 run : |
3365 git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_python_backend
3466 cd dss_python_backend
3567 git checkout $GITHUB_SHA
68+ - name : ' Setup Docker'
69+ run : |
70+ docker pull $DOCKER_IMAGE
3671 - name : ' Download/extract DSS C-API binaries'
3772 run : |
38- 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
3974 tar zxf dss_capi.tar.gz
4075 cd dss_python_backend/dss_python_backend
4176 - name : Build wheel
4277 run : |
4378 mkdir -p artifacts
4479 mkdir -p artifacts_raw
45- 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
4682 # - name: Build conda packages
47- # continue-on-error: true
83+ # continue-on-error: false
4884 # run: |
4985 # bash dss_python_backend/ci/build_conda.sh
50- - name : Try installing the wheel
51- run : bash dss_python_backend/ci/test_wheel.sh
5286 - name : ' Upload artifacts'
53- uses : " actions/upload-artifact@v3 "
87+ uses : " actions/upload-artifact@v4 "
5488 with :
55- name : ' packages'
89+ name : ' packages-linux_${{ matrix.arch }}-${{ matrix.manylinux-base }} '
5690 path : ' ${{ github.workspace }}/artifacts'
57-
58- build_linux_x86 :
59- name : ' Linux x86'
60- runs-on : ubuntu-latest
61- env :
62- CONDA_SUBDIR : ' linux-32'
63- DOCKER_IMAGE : ' pmeira/manylinux_wheel_fpc322_i686'
64- steps :
65- - name : ' Checkout'
66- run : |
67- git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_python_backend
68- cd dss_python_backend
69- git checkout $GITHUB_SHA
70- - name : ' Setup Docker'
71- run : |
72- docker pull $DOCKER_IMAGE
73- - name : ' Download/extract DSS C-API binaries'
74- run : |
75- 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
76- tar zxf dss_capi.tar.gz
77- cd dss_python_backend/dss_python_backend
78- - name : Build wheel
91+ - name : Try installing the wheel
92+ continue-on-error : ${{ matrix.arch == 'x86' }}
7993 run : |
80- mkdir -p artifacts
81- mkdir -p artifacts_raw
82- 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
83- - name : ' Upload artifacts'
84- uses : " actions/upload-artifact@v3"
85- with :
86- name : ' packages'
87- 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
8895
8996 build_macos_x64 :
9097 name : ' macOS x64'
91- runs-on : ' macos-11'
98+ continue-on-error : false
99+ runs-on : ' macos-15-intel'
92100 env :
93101 DSS_CAPI_PATH : ' ${{ github.workspace }}/dss_capi'
94102 # SDKROOT: '${{ github.workspace }}/MacOSX10.13.sdk'
95- PYTHON : python3
103+ PYTHON : python
104+ MACOSX_DEPLOYMENT_TARGET : " 11.0"
96105 steps :
97106 - uses : actions/checkout@v3
98107 with :
@@ -107,30 +116,47 @@ jobs:
107116 # run: |
108117 # curl -s -L https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.13.sdk.tar.xz -o macOSsdk.tar.xz
109118 # tar xf macOSsdk.tar.xz
119+ - name : ' Prepare Python'
120+ uses : actions/setup-python@v6
121+ with :
122+ python-version : ' 3.11'
123+ cache : ' pip'
124+ - name : Prepare virtual environment
125+ run : |
126+ $PYTHON -m venv buildvenv
110127 - name : Build wheel
111128 run : |
129+ source buildvenv/bin/activate
112130 bash dss_python_backend/ci/build_wheel.sh
113131 # - name: Build conda packages
114- # continue-on-error: true
132+ # continue-on-error: false
115133 # run: |
116134 # sudo chown -R $UID $CONDA
117135 # bash dss_python_backend/ci/build_conda.sh
118136 - name : ' Upload artifacts'
119- uses : " actions/upload-artifact@v3 "
137+ uses : " actions/upload-artifact@v4 "
120138 with :
121- name : ' packages'
139+ name : ' packages-darwin_x64 '
122140 path : ' ${{ github.workspace }}/artifacts'
141+ - name : Try installing the wheel
142+ continue-on-error : true
143+ shell : bash
144+ run : |
145+ python -m pip install artifacts/dss_python_backend-*.whl
146+ python -c 'from dss_python_backend import lib, ffi; lib.DSS_NewCircuit(ffi.NULL, b"test123"); assert ffi.string(lib.Circuit_Get_Name(ffi.NULL)) == b"test123"'
147+ python -c 'from dss_python_backend import _fastdss'
123148
124149 build_macos_arm64 :
125150 name : ' macOS ARM64'
126- runs-on : ' macos-11'
151+ continue-on-error : false
152+ runs-on : ' macos-15'
127153 env :
128154 DSS_CAPI_PATH : ' ${{ github.workspace }}/dss_capi'
129155 # SDKROOT: '${{ github.workspace }}/MacOSX10.13.sdk'
130- PYTHON : python3
156+ PYTHON : python
131157 _PYTHON_HOST_PLATFORM : macosx-11.0-arm64
132158 ARCHFLAGS : ' -arch arm64'
133-
159+ MACOSX_DEPLOYMENT_TARGET : " 11.0 "
134160 steps :
135161 - uses : actions/checkout@v3
136162 with :
@@ -145,23 +171,40 @@ jobs:
145171 # run: |
146172 # curl -s -L https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.13.sdk.tar.xz -o macOSsdk.tar.xz
147173 # tar xf macOSsdk.tar.xz
174+ - name : ' Prepare Python'
175+ uses : actions/setup-python@v6
176+ with :
177+ python-version : ' 3.11'
178+ cache : ' pip'
179+ - name : Prepare virtual environment
180+ run : |
181+ python -m venv buildvenv
148182 - name : Build wheel
149183 run : |
184+ source buildvenv/bin/activate
150185 bash dss_python_backend/ci/build_wheel.sh
151186 # - name: Build conda packages
152- # continue-on-error: true
187+ # continue-on-error: false
153188 # run: |
154189 # sudo chown -R $UID $CONDA
155190 # bash dss_python_backend/ci/build_conda.sh
156191 - name : ' Upload artifacts'
157- uses : " actions/upload-artifact@v3 "
192+ uses : " actions/upload-artifact@v4 "
158193 with :
159- name : ' packages'
194+ name : ' packages-darwin_arm64 '
160195 path : ' ${{ github.workspace }}/artifacts'
196+ - name : Try installing the wheel
197+ continue-on-error : true
198+ shell : bash
199+ run : |
200+ python -m pip install artifacts/dss_python_backend-*.whl
201+ python -c 'from dss_python_backend import lib, ffi; lib.DSS_NewCircuit(ffi.NULL, b"test123"); assert ffi.string(lib.Circuit_Get_Name(ffi.NULL)) == b"test123"'
202+ python -c 'from dss_python_backend import _fastdss'
161203
162204 build_win_x64 :
163205 name : ' Windows x64'
164- runs-on : windows-2019
206+ continue-on-error : false
207+ runs-on : windows-2022
165208 env :
166209 CONDA_SUBDIR : ' win-64'
167210 DSS_CAPI_PATH : ' ${{ github.workspace }}\dss_capi'
@@ -182,19 +225,28 @@ jobs:
182225 run : |
183226 bash dss_python_backend/ci/build_wheel.sh
184227 # - name: Build conda packages
185- # continue-on-error: true
228+ # continue-on-error: false
186229 # shell: bash
187230 # run: |
188231 # bash dss_python_backend/ci/build_conda.sh
189232 - name : ' Upload artifacts'
190- uses : " actions/upload-artifact@v3 "
233+ uses : " actions/upload-artifact@v4 "
191234 with :
192- name : ' packages'
235+ name : ' packages-win_x64 '
193236 path : ' ${{ github.workspace }}/artifacts'
237+ - name : Try installing the wheel
238+ continue-on-error : true
239+ shell : bash
240+ run : |
241+ python -m pip install artifacts/dss_python_backend-*.whl
242+ python -c "from dss_python_backend import lib, ffi; lib.DSS_NewCircuit(ffi.NULL, b'test123'); assert ffi.string(lib.Circuit_Get_Name(ffi.NULL)) == b'test123'"
243+ python -c "from dss_python_backend import _fastdss"
244+
194245
195246 build_win_x86 :
196247 name : ' Windows x86'
197- runs-on : windows-2019
248+ continue-on-error : false
249+ runs-on : windows-2022
198250 env :
199251 CONDA_SUBDIR : ' win-32'
200252 DSS_CAPI_PATH : ' ${{ github.workspace }}\dss_capi'
@@ -204,9 +256,11 @@ jobs:
204256 with :
205257 fetch-depth : 0
206258 path : ' dss_python_backend'
207- - uses : actions/setup-python@v3
259+ - name : ' Setup Python'
260+ uses : actions/setup-python@v6
208261 with :
209- python-version : ' 3.8'
262+ python-version : ' 3.11'
263+ cache : ' pip'
210264 architecture : ' x86'
211265 - name : ' Download/extract DSS C-API binaries'
212266 shell : cmd
@@ -219,8 +273,27 @@ jobs:
219273 run : |
220274 bash dss_python_backend/ci/build_wheel.sh
221275 - name : ' Upload artifacts'
222- uses : " actions/upload-artifact@v3 "
276+ uses : " actions/upload-artifact@v4 "
223277 with :
224- name : ' packages'
278+ name : ' packages-win_x86 '
225279 path : ' ${{ github.workspace }}/artifacts'
280+ - name : Try installing the wheel
281+ continue-on-error : true
282+ shell : bash
283+ run : |
284+ python -m pip install artifacts/dss_python_backend-*.whl
285+ python -c "from dss_python_backend import lib, ffi; lib.DSS_NewCircuit(ffi.NULL, b'test123'); assert ffi.string(lib.Circuit_Get_Name(ffi.NULL)) == b'test123'"
286+ python -c "from dss_python_backend import _fastdss"
226287
288+ merge :
289+ name : ' Merge build artifacts'
290+ continue-on-error : false
291+ runs-on : ubuntu-latest
292+ needs : [build_linux, build_macos_arm64, build_macos_x64, build_win_x64, build_win_x86]
293+ steps :
294+ - name : Merge Artifacts
295+ uses : actions/upload-artifact/merge@v4
296+ with :
297+ name : dss_python_backend-builds
298+ pattern : packages-*
299+ # delete-merged: true
0 commit comments