Skip to content

Commit b185586

Browse files
committed
Extend GH workflow with Conda build to upload wheels
1 parent 1167a7c commit b185586

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

.github/workflows/conda-package.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ jobs:
5555
- name: Install conda-build
5656
run: conda install conda-build
5757

58+
- name: Store conda paths as envs
59+
shell: bash -el {0}
60+
run: |
61+
echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/linux-64/" >> $GITHUB_ENV
62+
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE/" >> $GITHUB_ENV
63+
5864
- name: Build conda package
5965
run: |
6066
CHANNELS="-c conda-forge -c https://software.repos.intel.com/python/conda --override-channels"
@@ -71,16 +77,20 @@ jobs:
7177
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
7278
with:
7379
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
74-
path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.conda
80+
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda
81+
82+
- name: Upload wheels artifact
83+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
84+
with:
85+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
86+
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
7587

7688
build_windows:
7789
runs-on: windows-latest
7890

7991
strategy:
8092
matrix:
8193
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
82-
env:
83-
conda-bld: C:\Miniconda\conda-bld\win-64\
8494

8595
steps:
8696
- name: Cancel Previous Runs
@@ -115,14 +125,26 @@ jobs:
115125
- name: Setup MSVC
116126
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
117127

128+
- name: Store conda paths as envs
129+
shell: bash -el {0}
130+
run: |
131+
echo "CONDA_BLD=$CONDA_PREFIX\conda-bld\win-64\" >> $GITHUB_ENV
132+
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE\" >> $GITHUB_ENV
133+
118134
- name: Build conda package
119135
run: conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe
120136

121137
- name: Upload artifact
122138
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
123139
with:
124140
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
125-
path: ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.conda
141+
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda
142+
143+
- name: Upload wheels artifact
144+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
145+
with:
146+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
147+
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
126148

127149
test_linux:
128150
needs: build_linux

0 commit comments

Comments
 (0)