diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index b9a5a11ec9..e05d3ccc13 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -78,19 +78,25 @@ 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-variant: Mambaforge + miniforge-version: latest + activate-environment: build + 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 +108,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: 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