Skip to content

Commit 883ab20

Browse files
committed
break up Windows conda channel creation steps
also only copy ver.json conditionally
1 parent 0e15e7d commit 883ab20

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/conda-package.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,17 +304,28 @@ jobs:
304304
run: |
305305
mkdir ${{ env.GITHUB_WORKSPACE }}\channel\win-64
306306
move ${{ env.PACKAGE_NAME }}-*.conda ${{ env.GITHUB_WORKSPACE }}\channel\win-64
307-
python -m conda_index ${{ env.GITHUB_WORKSPACE }}/channel
307+
dir ${{ env.GITHUB_WORKSPACE }}\channel\win-64
308308
309-
# Test channel
309+
- name: Index the channel
310+
shell: cmd /C CALL {0}
311+
run: conda index ${{ env.GITHUB_WORKSPACE }}\channel
312+
313+
- name: Dump mkl_random version info from created channel into ver.json
314+
shell: cmd /C CALL {0}
315+
run: |
310316
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.GITHUB_WORKSPACE }}/channel --override-channels --info --json > ${{ env.GITHUB_WORKSPACE }}\ver.json
311-
more ${{ env.GITHUB_WORKSPACE }}\ver.json
317+
318+
- name: Output content of produced ver.json
319+
shell: pwsh
320+
run: Get-Content -Path ${{ env.GITHUB_WORKSPACE }}\ver.json
312321

313322
- name: Collect dependencies
314323
shell: cmd
315324
run: |
316325
@ECHO ON
317-
copy /Y ${{ env.GITHUB_WORKSPACE }}\ver.json .
326+
IF NOT EXIST ver.json (
327+
copy /Y ${{ env.workdir }}\ver.json .
328+
)
318329
set "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%"
319330
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
320331
SET PACKAGE_VERSION=%%F

0 commit comments

Comments
 (0)