2525
2626jobs:
2727 build:
28- name: Build ['${{ matrix.os }}', python='${{ matrix.python }}']
28+ name: Build
2929
3030 strategy:
31+ fail-fast: false
3132 matrix:
3233 python: ['3.9', '3.10', '3.11', '3.12', '3.13']
3334 os: [ubuntu-22.04, windows-2019]
4243 run:
4344 shell: ${{ matrix.os == 'windows-2019' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
4445
45- continue-on-error: true
46-
4746 steps:
4847 - name: Cancel Previous Runs
4948 uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
5655 fetch-depth: 0
5756
5857 - name: Setup miniconda
58+ id: setup_miniconda
59+ continue-on-error: true
5960 uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
6061 with:
6162 miniforge-version: latest
6566 python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
6667 activate-environment: 'build'
6768
68- # Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
69- - name: Disable speed limit check in mamba
70- 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'
7179
7280 - name: Store conda paths as envs
7381 shell: bash -el {0}
7684 echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
7785
7886 - 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'
7993 run: mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}
8094
8195 - name: Build conda package
@@ -84,33 +98,33 @@ jobs:
8498 MAX_BUILD_CMPL_MKL_VERSION: '2025.1a0'
8599
86100 - name: Upload artifact
87- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5 .0
101+ uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6 .0
88102 with:
89103 name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
90104 path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
91105
92106 - name: Upload wheels artifact
93- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5 .0
107+ uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6 .0
94108 with:
95109 name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
96110 path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
97111
98112 test_linux:
99- name: Test ['ubuntu-latest', python='${{ matrix.python }}']
113+ name: Test
100114
101115 needs: build
102116
103- runs-on: ubuntu-latest
117+ runs-on: ${{ matrix.os }}
104118
105119 defaults:
106120 run:
107121 shell: bash -el {0}
108122
109123 strategy:
124+ fail-fast: false
110125 matrix:
111126 python: ['3.9', '3.10', '3.11', '3.12', '3.13']
112-
113- continue-on-error: true
127+ os: [ubuntu-latest]
114128
115129 env:
116130 channel-path: '${{ github.workspace }}/channel/'
@@ -131,6 +145,19 @@ jobs:
131145 tar -xvf ${{ env.pkg-path-in-channel }}/${{ env.PACKAGE_NAME }}-*.tar.bz2 -C ${{ env.extracted-pkg-path }}
132146
133147 - name: Setup miniconda
148+ id: setup_miniconda
149+ continue-on-error: true
150+ uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
151+ with:
152+ miniforge-version: latest
153+ use-mamba: 'true'
154+ channels: conda-forge
155+ conda-remove-defaults: 'true'
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'
134161 uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
135162 with:
136163 miniforge-version: latest
@@ -164,11 +191,19 @@ jobs:
164191 run: mamba remove conda-index
165192
166193 - name: Install dpnp
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'
167203 run: |
168204 mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
169205 env:
170206 TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'
171- MAMBA_NO_LOW_SPEED_LIMIT: 1
172207
173208 - name: List installed packages
174209 run: mamba list
@@ -199,21 +234,21 @@ jobs:
199234 python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
200235
201236 test_windows:
202- name: Test ['windows-2019', python='${{ matrix.python }}']
237+ name: Test
203238
204239 needs: build
205240
206- runs-on: windows-2019
241+ runs-on: ${{ matrix.os }}
207242
208243 defaults:
209244 run:
210245 shell: cmd /C CALL {0}
211246
212247 strategy:
248+ fail-fast: false
213249 matrix:
214250 python: ['3.9', '3.10', '3.11', '3.12', '3.13']
215-
216- continue-on-error: true
251+ os: [windows-2019]
217252
218253 env:
219254 channel-path: '${{ github.workspace }}\channel\'
@@ -335,7 +370,7 @@ jobs:
335370 python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
336371
337372 upload:
338- name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
373+ name: Upload
339374
340375 needs: [test_linux, test_windows]
341376
0 commit comments