Skip to content

Commit

Permalink
Merge branch 'ci_gdb' of https://github.com/roxx30198/numba-dpex into…
Browse files Browse the repository at this point in the history
… ci_gdb
  • Loading branch information
roxx30198 committed Nov 7, 2023
2 parents 2a23208 + 3abc8bd commit 3af92de
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 28 deletions.
37 changes: 13 additions & 24 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:

defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }}

strategy:
fail-fast: false
Expand Down Expand Up @@ -187,23 +187,22 @@ jobs:
- name: Smoke test
run: python -c "import dpnp, dpctl, numba_dpex; dpctl.lsplatform()"

# - name: Run tests
# run: |
# pytest -q -ra --disable-warnings --pyargs ${{ env.MODULE_NAME }} -vv
- name: Run tests
run: |
pytest -q -ra --disable-warnings --pyargs ${{ env.MODULE_NAME }} -vv
# - name: Run examples
# shell: bash -l {0}
# run: |
# cd ${{ env.EXAMPLES_PATH }}
# for script in $(find . \( -not -name "_*" -not -name "side-by-side*" -not -name "vectorize.py" -not -name "scan.py" -and -name "*.py" \))
# do
# echo "Executing ${script}"
# python ${script} || exit 1
# done
- name: Run examples
shell: bash -l {0}
run: |
cd ${{ env.EXAMPLES_PATH }}
for script in $(find . \( -not -name "_*" -not -name "side-by-side*" -not -name "vectorize.py" -not -name "scan.py" -and -name "*.py" \))
do
echo "Executing ${script}"
python ${script} || exit 1
done
- name: Run gdb tests
if: runner.os == 'Linux'
shell: bash -el {0}
run: |
conda install pexpect
wget -nc -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fcea1bcd-6a63-4849-b304-906ff71dc2c0/l_dpcpp_dbg_p_2023.2.0.49333_offline.sh
Expand All @@ -214,16 +213,6 @@ jobs:
source $ONEAPI_ROOT/debugger/latest/env/vars.sh
pytest -q -ra --disable-warnings --pyargs ${{ env.GDB_TESTS_PATH }} -vv
if: runner.os == 'Windows'
run: |
conda install pexpect
wget -nc -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/fcea1bcd-6a63-4849-b304-906ff71dc2c0/l_dpcpp_dbg_p_2023.2.0.49333_offline.sh
chmod +x l_dpcpp_dbg_p_2023.2.0.49333_offline.sh
mkdir /tmp/gdb
export ONEAPI_ROOT=/tmp/gdb
./l_dpcpp_dbg_p_2023.2.0.49333_offline.sh -a -s --eula accept --install-dir $ONEAPI_ROOT
source $ONEAPI_ROOT/debugger/latest/env/vars.sh
pytest -q -ra --disable-warnings --pyargs ${{ env.GDB_TESTS_PATH }} -vv || exit 1
upload_anaconda:
name: Upload dppy/label/dev ['${{ matrix.os }}', python='${{ matrix.python }}']
Expand Down
7 changes: 5 additions & 2 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
@REM used BUILD_PREFIX as compiler installed in build section of meta.yml
set "PATH=%BUILD_PREFIX%\Library\bin-llvm;%PATH%"

%PYTHON% setup.py install --single-version-externally-managed --record=record.txt
set "SKBUILD_ARGS=-G Ninja --"
set "SKBUILD_ARGS=%SKBUILD_ARGS% -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"

%PYTHON% setup.py install --single-version-externally-managed --record=record.txt %SKBUILD_ARGS%

rem Build wheel package
if NOT "%WHEELS_OUTPUT_FOLDER%"=="" (
%PYTHON% setup.py bdist_wheel --build-number %GIT_DESCRIBE_NUMBER%
%PYTHON% setup.py bdist_wheel --build-number %GIT_DESCRIBE_NUMBER% %SKBUILD_ARGS%
if errorlevel 1 exit 1
copy dist\numba_dpex*.whl %WHEELS_OUTPUT_FOLDER%
if errorlevel 1 exit 1
Expand Down
6 changes: 4 additions & 2 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ set -euxo pipefail
# starting from dpcpp_impl_linux-64=2022.0.0=intel_3610
export PATH=$CONDA_PREFIX/bin-llvm:$PATH

${PYTHON} setup.py install --single-version-externally-managed --record=record.txt
SKBUILD_ARGS=(-G Ninja -- -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON)

${PYTHON} setup.py install --single-version-externally-managed --record=record.txt "${SKBUILD_ARGS[@]}"

# Build wheel package
WHEELS_BUILD_ARGS=(-p manylinux2014_x86_64 --build-number "$GIT_DESCRIBE_NUMBER")
if [[ -v WHEELS_OUTPUT_FOLDER ]]; then
$PYTHON setup.py bdist_wheel "${WHEELS_BUILD_ARGS[@]}"
$PYTHON setup.py bdist_wheel "${WHEELS_BUILD_ARGS[@]}" "${SKBUILD_ARGS[@]}"
cp dist/numba_dpex*.whl "${WHEELS_OUTPUT_FOLDER[@]}"
fi
1 change: 1 addition & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ requirements:
- python
- setuptools >=63.*
- scikit-build >=0.15*
- ninja # [not win]
- cmake >=3.26*
- numba >=0.57*
- dpctl >=0.14*
Expand Down

0 comments on commit 3af92de

Please sign in to comment.