Skip to content

Commit 90cac76

Browse files
Fix issue with Windows build/test steps
1 parent 826a330 commit 90cac76

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

.github/workflows/conda-package.yml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,13 @@ jobs:
128128
- uses: actions/checkout@v3
129129
with:
130130
fetch-depth: 0
131-
- uses: conda-incubator/setup-miniconda@v2
131+
132+
- uses: conda-incubator/setup-miniconda@v3
132133
with:
133-
auto-activate-base: true
134-
conda-build-version: "*"
135-
activate-environment: true
134+
miniforge-variant: Miniforge
135+
miniforge-version: latest
136+
activate-environment: build
137+
channels: conda-forge
136138
python-version: ${{ matrix.python }}
137139

138140
- name: Cache conda packages
@@ -146,8 +148,18 @@ jobs:
146148
restore-keys: |
147149
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
148150
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
151+
152+
- name: Install conda build
153+
run: |
154+
conda activate
155+
conda install -y conda-build
156+
conda list -n base
157+
149158
- name: Build conda package
150-
run: conda build --no-test --python ${{ matrix.python }} -c conda-forge -c https://software.repos.intel.com/python/conda --override-channels conda-recipe-cf
159+
run: |
160+
conda activate
161+
conda build --no-test --python ${{ matrix.python }} -c conda-forge -c https://software.repos.intel.com/python/conda --override-channels conda-recipe-cf
162+
151163
- name: Upload artifact
152164
uses: actions/upload-artifact@v3
153165
with:
@@ -175,27 +187,32 @@ jobs:
175187
uses: actions/download-artifact@v3
176188
with:
177189
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
178-
- uses: conda-incubator/setup-miniconda@v2
190+
- uses: conda-incubator/setup-miniconda@v3
179191
with:
180-
auto-update-conda: true
181-
conda-build-version: '*'
182-
miniconda-version: 'latest'
183-
activate-environment: mkl_umath_test
192+
miniforge-variant: Miniforge
193+
miniforge-version: latest
194+
activate-environment: build
195+
channels: conda-forge
184196
python-version: ${{ matrix.python }}
197+
185198
- name: Create conda channel with the artifact bit
186199
shell: cmd /C CALL {0}
187200
run: |
188201
echo ${{ env.workdir }}
189202
mkdir ${{ env.workdir }}\channel\win-64
190203
move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64
191204
dir ${{ env.workdir }}\channel\win-64
205+
192206
- name: Index the channel
193207
shell: cmd /C CALL {0}
194-
run: conda index ${{ env.workdir }}\channel
208+
run: |
209+
conda activate
210+
conda index ${{ env.workdir }}\channel
195211
196212
- name: Dump mkl_umath version info from created channel into ver.json
197213
shell: cmd /C CALL {0}
198214
run: |
215+
conda activate
199216
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
200217
- name: Output content of produced ver.json
201218
shell: pwsh
@@ -210,6 +227,7 @@ jobs:
210227
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
211228
SET PACKAGE_VERSION=%%F
212229
)
230+
conda activate
213231
conda install -n mkl_umath_test ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
214232
- name: Display lockfile content
215233
shell: pwsh
@@ -241,6 +259,7 @@ jobs:
241259
- name: Report content of test environment
242260
shell: cmd /C CALL {0}
243261
run: |
262+
conda activate
244263
echo "Value of CONDA enviroment variable was: " %CONDA%
245264
echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX%
246265
conda info && conda list -n mkl_umath_test

0 commit comments

Comments
 (0)