1313 # Follow oneAPI installation instruction for conda, since intel channel is not longer available
1414 # CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
1515 CHANNELS : ' -c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
16+ CONDA_BUILD_INDEX_ENV_PY_VER : ' 3.12' # conda does not support python 3.13
1617 CONDA_BUILD_VERSION : ' 24.11.2'
1718 CONDA_INDEX_VERSION : ' 0.5.0'
1819 RERUN_TESTS_ON_FAILURE : ' true'
2425
2526jobs :
2627 build :
27- name : Build ['${{ matrix.os }}', python='${{ matrix.python }}']
28+ name : Build
2829
2930 strategy :
31+ fail-fast : false
3032 matrix :
31- python : ['3.9', '3.10', '3.11', '3.12']
33+ python : ['3.9', '3.10', '3.11', '3.12', '3.13' ]
3234 os : [ubuntu-22.04, windows-2019]
3335
3436 permissions :
4143 run :
4244 shell : ${{ matrix.os == 'windows-2019' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
4345
44- continue-on-error : true
45-
4646 steps :
4747 - name : Cancel Previous Runs
4848 uses : styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
@@ -55,18 +55,27 @@ jobs:
5555 fetch-depth : 0
5656
5757 - name : Setup miniconda
58+ id : setup_miniconda
59+ continue-on-error : true
5860 uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
5961 with :
6062 miniforge-version : latest
6163 use-mamba : ' true'
6264 channels : conda-forge
6365 conda-remove-defaults : ' true'
64- python-version : ${{ matrix.python }}
66+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER }}
6567 activate-environment : ' build'
6668
67- # Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
68- - name : Disable speed limit check in mamba
69- run : echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
69+ - name : ReSetup miniconda
70+ if : steps.setup_miniconda.outcome == 'failure'
71+ uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
72+ with :
73+ miniforge-version : latest
74+ use-mamba : ' true'
75+ channels : conda-forge
76+ conda-remove-defaults : ' true'
77+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
78+ activate-environment : ' build'
7079
7180 - name : Store conda paths as envs
7281 shell : bash -el {0}
7584 echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
7685
7786 - name : Install conda-build
87+ id : install_conda_build
88+ continue-on-error : true
89+ run : mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}
90+
91+ - name : ReInstall conda-build
92+ if : steps.install_conda_build.outcome == 'failure'
7893 run : mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}
7994
8095 - name : Build conda package
@@ -83,33 +98,33 @@ jobs:
8398 MAX_BUILD_CMPL_MKL_VERSION : ' 2025.1a0'
8499
85100 - name : Upload artifact
86- uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5 .0
101+ uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6 .0
87102 with :
88103 name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
89104 path : ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
90105
91106 - name : Upload wheels artifact
92- uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5 .0
107+ uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6 .0
93108 with :
94109 name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
95110 path : ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
96111
97112 test_linux :
98- name : Test ['ubuntu-latest', python='${{ matrix.python }}']
113+ name : Test
99114
100115 needs : build
101116
102- runs-on : ubuntu-latest
117+ runs-on : ${{ matrix.os }}
103118
104119 defaults :
105120 run :
106121 shell : bash -el {0}
107122
108123 strategy :
124+ fail-fast : false
109125 matrix :
110- python : ['3.9', '3.10', '3.11', '3.12']
111-
112- continue-on-error : true
126+ python : ['3.9', '3.10', '3.11', '3.12', '3.13']
127+ os : [ubuntu-latest]
113128
114129 env :
115130 channel-path : ' ${{ github.workspace }}/channel/'
@@ -130,13 +145,26 @@ jobs:
130145 tar -xvf ${{ env.pkg-path-in-channel }}/${{ env.PACKAGE_NAME }}-*.tar.bz2 -C ${{ env.extracted-pkg-path }}
131146
132147 - name : Setup miniconda
148+ id : setup_miniconda
149+ continue-on-error : true
133150 uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
134151 with :
135152 miniforge-version : latest
136153 use-mamba : ' true'
137154 channels : conda-forge
138155 conda-remove-defaults : ' true'
139- python-version : ${{ matrix.python }}
156+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
157+ activate-environment : ${{ env.TEST_ENV_NAME }}
158+
159+ - name : ReSetup miniconda
160+ if : steps.setup_miniconda.outcome == 'failure'
161+ uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
162+ with :
163+ miniforge-version : latest
164+ use-mamba : ' true'
165+ channels : conda-forge
166+ conda-remove-defaults : ' true'
167+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
140168 activate-environment : ${{ env.TEST_ENV_NAME }}
141169
142170 - name : Install conda-index
@@ -158,11 +186,24 @@ jobs:
158186 echo PACKAGE_VERSION=${PACKAGE_VERSION}
159187 echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
160188
189+ # conda-index does not support python 3.13
190+ - name : Remove conda-index
191+ run : mamba remove conda-index
192+
161193 - name : Install dpnp
162- run : mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
194+ id : install_dpnp
195+ continue-on-error : true
196+ run : |
197+ mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
198+ env :
199+ TEST_CHANNELS : ' -c ${{ env.channel-path }} ${{ env.CHANNELS }}'
200+
201+ - name : ReInstall dpnp
202+ if : steps.install_dpnp.outcome == 'failure'
203+ run : |
204+ mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
163205 env :
164206 TEST_CHANNELS : ' -c ${{ env.channel-path }} ${{ env.CHANNELS }}'
165- MAMBA_NO_LOW_SPEED_LIMIT : 1
166207
167208 - name : List installed packages
168209 run : mamba list
@@ -193,21 +234,21 @@ jobs:
193234 python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
194235
195236 test_windows :
196- name : Test ['windows-2019', python='${{ matrix.python }}']
237+ name : Test
197238
198239 needs : build
199240
200- runs-on : windows-2019
241+ runs-on : ${{ matrix.os }}
201242
202243 defaults :
203244 run :
204245 shell : cmd /C CALL {0}
205246
206247 strategy :
248+ fail-fast : false
207249 matrix :
208- python : ['3.9', '3.10', '3.11', '3.12']
209-
210- continue-on-error : true
250+ python : ['3.9', '3.10', '3.11', '3.12', '3.13']
251+ os : [windows-2019]
211252
212253 env :
213254 channel-path : ' ${{ github.workspace }}\channel\'
@@ -244,7 +285,7 @@ jobs:
244285 use-mamba : ' true'
245286 channels : conda-forge
246287 conda-remove-defaults : ' true'
247- python-version : ${{ matrix.python }}
288+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER }}
248289 activate-environment : ${{ env.TEST_ENV_NAME }}
249290
250291 - name : Store conda paths as envs
@@ -279,6 +320,10 @@ jobs:
279320 echo PACKAGE_VERSION: %PACKAGE_VERSION%
280321 (echo PACKAGE_VERSION=%PACKAGE_VERSION%) >> %GITHUB_ENV%
281322
323+ # conda-index does not support python 3.13
324+ - name : Remove conda-index
325+ run : mamba remove conda-index
326+
282327 - name : Install dpnp
283328 run : |
284329 @echo on
@@ -325,13 +370,13 @@ jobs:
325370 python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
326371
327372 upload :
328- name : Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
373+ name : Upload
329374
330375 needs : [test_linux, test_windows]
331376
332377 strategy :
333378 matrix :
334- python : ['3.9', '3.10', '3.11', '3.12']
379+ python : ['3.9', '3.10', '3.11', '3.12', '3.13' ]
335380 os : [ubuntu-22.04, windows-2019]
336381
337382 runs-on : ${{ matrix.os }}
@@ -406,7 +451,7 @@ jobs:
406451 channels : conda-forge
407452 conda-remove-defaults : ' true'
408453 run-post : ' false'
409- python-version : ' 3.12 '
454+ python-version : ' 3.13 '
410455 activate-environment : ' cleanup'
411456
412457 - name : Install anaconda-client
0 commit comments