Skip to content

Commit 70b395d

Browse files
committed
Use python 3.12 in env where to run conda commands
and create a dedicated env for install built dpnp package
1 parent ed5a333 commit 70b395d

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/conda-package.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
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'
@@ -61,7 +62,7 @@ jobs:
6162
use-mamba: 'true'
6263
channels: conda-forge
6364
conda-remove-defaults: 'true'
64-
python-version: ${{ matrix.python }}
65+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
6566
activate-environment: 'build'
6667

6768
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
@@ -136,8 +137,8 @@ jobs:
136137
use-mamba: 'true'
137138
channels: conda-forge
138139
conda-remove-defaults: 'true'
139-
python-version: ${{ matrix.python }}
140-
activate-environment: ${{ env.TEST_ENV_NAME }}
140+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
141+
activate-environment: 'index'
141142

142143
- name: Install conda-index
143144
run: mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
@@ -159,7 +160,9 @@ jobs:
159160
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
160161
161162
- name: Install dpnp
162-
run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
163+
run: |
164+
mamba create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
165+
mamba activate ${{ env.TEST_ENV_NAME }}
163166
env:
164167
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'
165168
MAMBA_NO_LOW_SPEED_LIMIT: 1
@@ -244,8 +247,8 @@ jobs:
244247
use-mamba: 'true'
245248
channels: conda-forge
246249
conda-remove-defaults: 'true'
247-
python-version: ${{ matrix.python }}
248-
activate-environment: ${{ env.TEST_ENV_NAME }}
250+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
251+
activate-environment: 'index'
249252

250253
- name: Store conda paths as envs
251254
run: |
@@ -254,7 +257,7 @@ jobs:
254257
(echo CONDA_LIB_BIN_PATH=%CONDA_PREFIX%\Library\bin\) >> %GITHUB_ENV%
255258
256259
- name: Install conda-index
257-
run: mamba install conda-index"<=${{ env.CONDA_INDEX_VERSION }}"
260+
run: mamba install conda-index=${{ env.CONDA_INDEX_VERSION }}
258261

259262
- name: Create conda channel
260263
run: |
@@ -282,7 +285,8 @@ jobs:
282285
- name: Install dpnp
283286
run: |
284287
@echo on
285-
mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
288+
mamba create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
289+
mamba activate ${{ env.TEST_ENV_NAME }}
286290
env:
287291
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'
288292
MAMBA_NO_LOW_SPEED_LIMIT: 1

0 commit comments

Comments
 (0)