Skip to content

Commit 512f624

Browse files
committed
use dedicated build envs in conda-package workflows
1 parent c488eb1 commit 512f624

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

.github/workflows/conda-package-cf.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ jobs:
104104
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
105105
with:
106106
miniforge-version: latest
107-
auto-activate: true
108-
activate-environment: base
107+
activate-environment: build
109108
channels: conda-forge
110109
python-version: ${{ matrix.python }}
111110

@@ -121,15 +120,17 @@ jobs:
121120
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
122121
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
123122
124-
- name: Install conda-build
125-
run: conda install conda-build
126-
127123
- name: Store conda paths as envs
128124
shell: bash -el {0}
129125
run: |
130-
echo "CONDA_BLD=$CONDA_PREFIX\\conda-bld\\win-64\\" >> "$GITHUB_ENV"
126+
echo "CONDA_BLD=$CONDA\\conda-bld\\win-64\\" >> "$GITHUB_ENV"
131127
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE\\" >> "$GITHUB_ENV"
132128
129+
- name: Install conda build
130+
run: |
131+
conda install -n base -y conda-build
132+
conda list -n base
133+
133134
- name: Build conda package
134135
run: conda build --no-test --python ${{ matrix.python }} -c conda-forge -c conda-forge/label/python_rc --override-channels conda-recipe-cf
135136

.github/workflows/conda-package.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ jobs:
104104
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
105105
with:
106106
miniforge-version: latest
107-
auto-activate: true
108-
activate-environment: base
107+
activate-environment: build
109108
channels: conda-forge
110109
python-version: ${{ matrix.python }}
111110

@@ -121,15 +120,17 @@ jobs:
121120
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
122121
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
123122
124-
- name: Install conda-build
125-
run: conda install conda-build
126-
127123
- name: Store conda paths as envs
128124
shell: bash -el {0}
129125
run: |
130-
echo "CONDA_BLD=$CONDA_PREFIX\\conda-bld\\win-64\\" >> "$GITHUB_ENV"
126+
echo "CONDA_BLD=$CONDA\\conda-bld\\win-64\\" >> "$GITHUB_ENV"
131127
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE\\" >> "$GITHUB_ENV"
132128
129+
- name: Install conda build
130+
run: |
131+
conda install -n base -y conda-build
132+
conda list -n base
133+
133134
- name: Build conda package
134135
run: conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge -c conda-forge/label/python_rc --override-channels conda-recipe
135136

0 commit comments

Comments
 (0)