Skip to content

Commit 0c749a8

Browse files
Use conda-build-verson=*, fixed syntax for branching
Use of lower case 'if not exist ver.json' instead of 'IF NOT EXIST ver.json' was responsible to a silent failure to retrieve specification of build dpctl that went unnoticed since gh-919
1 parent e0bd0d7 commit 0c749a8

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

.github/workflows/conda-package.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
- uses: conda-incubator/setup-miniconda@v2
7474
with:
7575
auto-activate-base: true
76+
conda-build-version: "*"
7677
activate-environment: ""
7778

7879
- name: Cache conda packages
@@ -86,8 +87,6 @@ jobs:
8687
restore-keys: |
8788
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
8889
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
89-
- name: Install conda-build
90-
run: conda install conda-build
9190
- name: Build conda package
9291
run: conda build --no-test --python ${{ matrix.python }} -c intel -c main --override-channels conda-recipe
9392
- name: Upload artifact
@@ -194,30 +193,32 @@ jobs:
194193
with:
195194
use-only-tar-bz2: true
196195
auto-update-conda: true
196+
conda-build-version: '*'
197197
miniconda-version: 'latest'
198198
activate-environment: "dpctl_test"
199-
- name: Install conda-build
200-
shell: cmd /C CALL {0}
201-
# Needed to be able to run conda index
202-
run: conda install conda-build
203-
- name: Create conda channel
199+
- name: Create conda channel with the artifact bit
204200
shell: cmd /C CALL {0}
205201
run: |
206202
echo ${{ env.workdir }}
207203
mkdir ${{ env.workdir }}\channel\win-64
208204
move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64
209-
conda index ${{ env.workdir }}/channel
210-
# Test channel
205+
dir ${{ env.workdir }}\channel\win-64
206+
- name: Index the channel
207+
shell: cmd /C CALL {0}
208+
run: conda index ${{ env.workdir }}\channel
209+
210+
- name: Dump dpctl version info from created channel
211+
shell: cmd /C CALL {0}
212+
run: |
211213
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
212214
type ${{ env.workdir }}\ver.json
213215
- name: Collect dependencies
214216
shell: cmd /C CALL {0}
215217
run: |
216-
@ECHO ON
217-
if not exist ver.json (
218+
IF NOT EXIST ver.json (
218219
copy /Y ${{ env.workdir }}\ver.json .
219220
)
220-
set "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%"
221+
SET "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%"
221222
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
222223
SET PACKAGE_VERSION=%%F
223224
)
@@ -245,7 +246,9 @@ jobs:
245246
shell: cmd /C CALL {0}
246247
run: |
247248
@ECHO ON
248-
copy /Y ${{ env.workdir }}\ver.json .
249+
IF NOT EXIST ver.json (
250+
copy /Y ${{ env.workdir }}\ver.json .
251+
)
249252
set "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%"
250253
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
251254
SET PACKAGE_VERSION=%%F

0 commit comments

Comments
 (0)