Skip to content

Commit 346df36

Browse files
committed
break up Windows conda channel creation steps
also only copy ver.json conditionally
1 parent aad1670 commit 346df36

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
@@ -305,17 +305,28 @@ jobs:
305305
run: |
306306
mkdir ${{ env.GITHUB_WORKSPACE }}\channel\win-64
307307
move ${{ env.PACKAGE_NAME }}-*.conda ${{ env.GITHUB_WORKSPACE }}\channel\win-64
308-
python -m conda_index ${{ env.GITHUB_WORKSPACE }}/channel
308+
dir ${{ env.GITHUB_WORKSPACE }}\channel\win-64
309+
310+
- name: Index the channel
311+
shell: cmd /C CALL {0}
312+
run: conda index ${{ env.GITHUB_WORKSPACE }}\channel
309313

310-
# Test channel
314+
- name: Dump mkl_random version info from created channel into ver.json
315+
shell: cmd /C CALL {0}
316+
run: |
311317
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.GITHUB_WORKSPACE }}/channel --override-channels --info --json > ${{ env.GITHUB_WORKSPACE }}\ver.json
312-
more ${{ env.GITHUB_WORKSPACE }}\ver.json
318+
319+
- name: Output content of produced ver.json
320+
shell: pwsh
321+
run: Get-Content -Path ${{ env.GITHUB_WORKSPACE }}\ver.json
313322

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

0 commit comments

Comments
 (0)