Skip to content

Commit eec58be

Browse files
authored
Merge pull request #302 from IntelPython/feature/add_wheels
Add wheels upload to anaconda
2 parents 58b09c3 + d65189c commit eec58be

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

.github/workflows/conda-package.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ jobs:
6767

6868
- name: Store conda paths as envs
6969
shell: bash -l {0}
70-
run: echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\" '/' >> $GITHUB_ENV
70+
run: |
71+
echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\" '/' >> $GITHUB_ENV
72+
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
7173
7274
# boa is an extention to conda so we can use mamba resolver in conda build
7375
- name: Install conda-build
@@ -88,6 +90,12 @@ jobs:
8890
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
8991
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
9092

93+
- name: Upload wheels artifact
94+
uses: actions/[email protected]
95+
with:
96+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
97+
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
98+
9199
test:
92100
name: Test ['${{ matrix.os }}', python='${{ matrix.python }}']
93101

@@ -215,6 +223,11 @@ jobs:
215223
with:
216224
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
217225

226+
- name: Download wheels artifact
227+
uses: actions/[email protected]
228+
with:
229+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
230+
218231
- name: Setup miniconda
219232
uses: conda-incubator/[email protected]
220233
with:
@@ -230,3 +243,8 @@ jobs:
230243
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
231244
env:
232245
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
246+
247+
- name: Upload Wheels
248+
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.whl
249+
env:
250+
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}

conda-recipe/bld.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if EXIST "%PLATFORM_DIR%" (
4545
@REM %PYTHON% -m pip install --no-index --no-deps --no-build-isolation . -v
4646
if NOT "%WHEELS_OUTPUT_FOLDER%"=="" (
4747
rem Install and assemble wheel package from the build bits
48-
"%PYTHON%" setup.py install bdist_wheel --single-version-externally-managed --record=record.txt
48+
"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt bdist_wheel
4949
if errorlevel 1 exit 1
5050
copy dist\dpbench*.whl %WHEELS_OUTPUT_FOLDER%
5151
if errorlevel 1 exit 1

conda-recipe/build.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,10 @@ fi
2424
# $PYTHON -m pip install --no-index --no-deps --no-build-isolation . -v
2525

2626
# Build wheel package
27-
if [ "$CONDA_PY" == "36" ]; then
28-
WHEELS_BUILD_ARGS="-p manylinux1_x86_64"
29-
else
30-
WHEELS_BUILD_ARGS="-p manylinux2014_x86_64"
31-
fi
3227
if [ -n "${WHEELS_OUTPUT_FOLDER}" ]; then
33-
$PYTHON setup.py install bdist_wheel ${WHEELS_BUILD_ARGS} --single-version-externally-managed --record=record.txt
34-
cp dist/dpnp*.whl ${WHEELS_OUTPUT_FOLDER}
28+
$PYTHON setup.py install --single-version-externally-managed --record=record.txt bdist_wheel -p manylinux2014_x86_64
29+
mkdir -p ${WHEELS_OUTPUT_FOLDER}
30+
cp dist/dpbench*.whl ${WHEELS_OUTPUT_FOLDER}
3531
else
3632
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
3733
fi

0 commit comments

Comments
 (0)