From e70a2f1a0e942f38be57070323fed42858632166 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Thu, 12 Sep 2024 08:53:13 -0500 Subject: [PATCH 1/3] Changes to fix Windows build step in conda-package workflow Install conda build as a separate step This way conda build is installed in base environment of the miniforge, rather than underlying miniconda3 Correct CONDA_BLD value for build_windows set of conda-packages --- .github/workflows/conda-package.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index b9a5a11ec9..66f79eeb52 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -78,19 +78,24 @@ jobs: strategy: matrix: python: ['3.9', '3.10', '3.11', '3.12'] - env: - conda-bld: C:\Miniconda\conda-bld\win-64\ steps: - uses: actions/checkout@v4.1.7 with: fetch-depth: 0 + - uses: conda-incubator/setup-miniconda@v3 with: - auto-activate-base: true - conda-build-version: "*" - activate-environment: true + miniforge-version: latest + activate-environment: test + channels: conda-forge python-version: ${{ matrix.python }} + - name: Install conda build + run: | + conda activate + conda install -y conda-build + conda list -n base + - name: Cache conda packages uses: actions/cache@v4 env: @@ -102,19 +107,26 @@ jobs: restore-keys: | ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + - name: Store conda paths as envs shell: bash -l {0} run: | + echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> $GITHUB_ENV echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV + - name: Build conda package env: OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides - run: conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c conda-forge --override-channels conda-recipe + run: | + conda activate + conda build --no-test --python ${{ matrix.python }} --numpy 2 -c conda-forge --override-channels conda-recipe + - name: Upload artifact uses: actions/upload-artifact@v4.4.0 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} - path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2 + path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2 + - name: Upload wheels artifact uses: actions/upload-artifact@v4.4.0 with: From 0e1d1667d3771a6e53a89e2d584b1994de75f1d1 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 13 Sep 2024 05:47:34 -0500 Subject: [PATCH 2/3] Use mambaforge variant --- .github/workflows/conda-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 66f79eeb52..e05d3ccc13 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -85,8 +85,9 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: + miniforge-variant: Mambaforge miniforge-version: latest - activate-environment: test + activate-environment: build channels: conda-forge python-version: ${{ matrix.python }} From 5faef12677e1ca23de6acfc2dc1d7d218152227b Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 13 Sep 2024 06:36:19 -0500 Subject: [PATCH 3/3] Add entry to changes in this PR to CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fc4f8eee8..7fa2a94fa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Maintenance * Update black version used in Python code style workflow [gh-1828](https://github.com/IntelPython/dpctl/pull/1828) +* Fixed CI/CD workflow for building conda packages on Windows [gh-1831](https://github.com/IntelPython/dpctl/pull/1831) ## [0.18.0] - Sept. XX, 2024