Skip to content

Commit 76f231a

Browse files
Install conda build as a separate step
This way conda build is installed in base environment of the miniforge, rather than underlying miniconda3
1 parent 43e3eb1 commit 76f231a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/conda-package.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,20 @@ jobs:
8484
- uses: actions/checkout@v4.1.7
8585
with:
8686
fetch-depth: 0
87+
8788
- uses: conda-incubator/setup-miniconda@v3
8889
with:
8990
miniforge-version: latest
90-
conda-build-version: "*"
91-
activate-environment: true
91+
activate-environment: test
9292
channels: conda-forge
9393
python-version: ${{ matrix.python }}
9494

95+
- name: Install conda build
96+
run: |
97+
conda activate
98+
conda install -y conda-build
99+
conda list -n base
100+
95101
- name: Cache conda packages
96102
uses: actions/cache@v4
97103
env:
@@ -103,19 +109,25 @@ jobs:
103109
restore-keys: |
104110
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
105111
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
112+
106113
- name: Store conda paths as envs
107114
shell: bash -l {0}
108115
run: |
109116
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
117+
110118
- name: Build conda package
111119
env:
112120
OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides
113-
run: conda build --no-test --python ${{ matrix.python }} --numpy 2 -c conda-forge --override-channels conda-recipe
121+
run: |
122+
conda activate
123+
conda build --no-test --python ${{ matrix.python }} --numpy 2 -c conda-forge --override-channels conda-recipe
124+
114125
- name: Upload artifact
115126
uses: actions/upload-artifact@v4.4.0
116127
with:
117128
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
118129
path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2
130+
119131
- name: Upload wheels artifact
120132
uses: actions/upload-artifact@v4.4.0
121133
with:

0 commit comments

Comments
 (0)