From e0bd0d7127adb37780222eb9aae8e2f6498e0655 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Tue, 27 Dec 2022 15:59:30 -0600 Subject: [PATCH 1/3] Build dpctl on Windows for Python 3.10 as well --- .github/workflows/conda-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 6cba03a850..922ee9d876 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -63,7 +63,7 @@ jobs: strategy: matrix: - python: ['3.8', '3.9'] + python: ['3.8', '3.9', '3.10'] env: conda-bld: C:\Miniconda\conda-bld\win-64\ steps: @@ -177,7 +177,7 @@ jobs: strategy: matrix: - python: ['3.8', '3.9'] + python: ['3.8', '3.9', '3.10'] experimental: [false] runner: [windows-latest] continue-on-error: ${{ matrix.experimental }} From 0c749a80a1071f12d968a56261a95b536472dca0 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Tue, 27 Dec 2022 19:41:07 -0600 Subject: [PATCH 2/3] 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 --- .github/workflows/conda-package.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 922ee9d876..6d35d7be65 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -73,6 +73,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true + conda-build-version: "*" activate-environment: "" - name: Cache conda packages @@ -86,8 +87,6 @@ jobs: restore-keys: | ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- - - name: Install conda-build - run: conda install conda-build - name: Build conda package run: conda build --no-test --python ${{ matrix.python }} -c intel -c main --override-channels conda-recipe - name: Upload artifact @@ -194,30 +193,32 @@ jobs: with: use-only-tar-bz2: true auto-update-conda: true + conda-build-version: '*' miniconda-version: 'latest' activate-environment: "dpctl_test" - - name: Install conda-build - shell: cmd /C CALL {0} - # Needed to be able to run conda index - run: conda install conda-build - - name: Create conda channel + - name: Create conda channel with the artifact bit shell: cmd /C CALL {0} run: | echo ${{ env.workdir }} mkdir ${{ env.workdir }}\channel\win-64 move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64 - conda index ${{ env.workdir }}/channel - # Test channel + dir ${{ env.workdir }}\channel\win-64 + - name: Index the channel + shell: cmd /C CALL {0} + run: conda index ${{ env.workdir }}\channel + + - name: Dump dpctl version info from created channel + shell: cmd /C CALL {0} + run: | conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json type ${{ env.workdir }}\ver.json - name: Collect dependencies shell: cmd /C CALL {0} run: | - @ECHO ON - if not exist ver.json ( + IF NOT EXIST ver.json ( copy /Y ${{ env.workdir }}\ver.json . ) - set "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%" + SET "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%" FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO ( SET PACKAGE_VERSION=%%F ) @@ -245,7 +246,9 @@ jobs: shell: cmd /C CALL {0} run: | @ECHO ON - copy /Y ${{ env.workdir }}\ver.json . + IF NOT EXIST ver.json ( + copy /Y ${{ env.workdir }}\ver.json . + ) set "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%" FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO ( SET PACKAGE_VERSION=%%F From 81a9ef85ae9966b0fd3ff17aad04db593ea950e9 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 30 Dec 2022 10:06:12 -0600 Subject: [PATCH 3/3] Separate outputting ver.json into separate step --- .github/workflows/conda-package.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 6d35d7be65..f81e635e60 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -207,11 +207,12 @@ jobs: shell: cmd /C CALL {0} run: conda index ${{ env.workdir }}\channel - - name: Dump dpctl version info from created channel + - name: Dump dpctl version info from created channel into ver.json shell: cmd /C CALL {0} run: | conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json - type ${{ env.workdir }}\ver.json + - name: Output content of produced ver.json + run: Get-Content -Path ${{ env.workdir }}\ver.json - name: Collect dependencies shell: cmd /C CALL {0} run: | @@ -224,10 +225,7 @@ jobs: ) conda install ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile - name: Display lockfile content - shell: cmd /C CALL {0} - run: | - echo "Outputting content of lockfile:" - type lockfile + run: Get-Content -Path .\lockfile - name: Cache conda packages uses: actions/cache@v3 env: