Skip to content

Commit e70a2f1

Browse files
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
1 parent 109b4c2 commit e70a2f1

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

.github/workflows/conda-package.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,24 @@ jobs:
7878
strategy:
7979
matrix:
8080
python: ['3.9', '3.10', '3.11', '3.12']
81-
env:
82-
conda-bld: C:\Miniconda\conda-bld\win-64\
8381
steps:
8482
- uses: actions/checkout@v4.1.7
8583
with:
8684
fetch-depth: 0
85+
8786
- uses: conda-incubator/setup-miniconda@v3
8887
with:
89-
auto-activate-base: true
90-
conda-build-version: "*"
91-
activate-environment: true
88+
miniforge-version: latest
89+
activate-environment: test
90+
channels: conda-forge
9291
python-version: ${{ matrix.python }}
9392

93+
- name: Install conda build
94+
run: |
95+
conda activate
96+
conda install -y conda-build
97+
conda list -n base
98+
9499
- name: Cache conda packages
95100
uses: actions/cache@v4
96101
env:
@@ -102,19 +107,26 @@ jobs:
102107
restore-keys: |
103108
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
104109
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
110+
105111
- name: Store conda paths as envs
106112
shell: bash -l {0}
107113
run: |
114+
echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> $GITHUB_ENV
108115
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
116+
109117
- name: Build conda package
110118
env:
111119
OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides
112-
run: conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c conda-forge --override-channels conda-recipe
120+
run: |
121+
conda activate
122+
conda build --no-test --python ${{ matrix.python }} --numpy 2 -c conda-forge --override-channels conda-recipe
123+
113124
- name: Upload artifact
114125
uses: actions/upload-artifact@v4.4.0
115126
with:
116127
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
117-
path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2
128+
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
129+
118130
- name: Upload wheels artifact
119131
uses: actions/upload-artifact@v4.4.0
120132
with:

0 commit comments

Comments
 (0)