Skip to content

Commit ce1bcf8

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 ce1bcf8

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/conda-package.yml

Lines changed: 12 additions & 2 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,23 @@ 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
113121
run: conda build --no-test --python ${{ matrix.python }} --numpy 2 -c conda-forge --override-channels conda-recipe
122+
114123
- name: Upload artifact
115124
uses: actions/upload-artifact@v4.4.0
116125
with:
117126
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
118127
path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2
128+
119129
- name: Upload wheels artifact
120130
uses: actions/upload-artifact@v4.4.0
121131
with:

0 commit comments

Comments
 (0)