From 31009b53ec43c0588edfac2a5aeba47a8335a7e1 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Wed, 19 Aug 2026 00:04:12 -0700 Subject: [PATCH] Add conda-recipe-cf aligned with dpctl-feedstock on conda-forge's recipe and scripts --- .github/workflows/conda-package-cf.yml | 372 ++++++++++++++++++++++++ conda-recipe-cf/bld.bat | 46 +++ conda-recipe-cf/build.sh | 38 +++ conda-recipe-cf/conda_build_config.yaml | 18 ++ conda-recipe-cf/meta.yaml | 78 +++++ conda-recipe-cf/run_test.bat | 10 + conda-recipe-cf/run_test.sh | 7 + 7 files changed, 569 insertions(+) create mode 100644 .github/workflows/conda-package-cf.yml create mode 100644 conda-recipe-cf/bld.bat create mode 100755 conda-recipe-cf/build.sh create mode 100644 conda-recipe-cf/conda_build_config.yaml create mode 100644 conda-recipe-cf/meta.yaml create mode 100644 conda-recipe-cf/run_test.bat create mode 100755 conda-recipe-cf/run_test.sh diff --git a/.github/workflows/conda-package-cf.yml b/.github/workflows/conda-package-cf.yml new file mode 100644 index 0000000000..304a84da57 --- /dev/null +++ b/.github/workflows/conda-package-cf.yml @@ -0,0 +1,372 @@ +name: Conda package (conda-forge) + +on: + push: + branches: + - master + pull_request: + +permissions: read-all + +env: + PACKAGE_NAME: dpctl + MODULE_NAME: dpctl + TEST_ENV_NAME: test_dpctl + RECIPE_DIR: conda-recipe-cf + CHANNELS: "-c conda-forge --override-channels" + VER_SCRIPT1: "import json; f = open('ver.json', 'r'); j = json.load(f); f.close(); d = j['dpctl'][0];" + VER_SCRIPT2: "print('='.join((d[s] for s in ('version', 'build'))))" + CONDA_BUILD_VERSION: 26.3.0 + CONDA_INDEX_VERSION: 0.11.0 + +jobs: + build_linux: + runs-on: ubuntu-latest + timeout-minutes: 90 + + strategy: + matrix: + python: ['3.10', '3.11', '3.12', '3.13'] + python_spec: [''] + include: + - python: '3.14' + python_spec: '3.14.* *_cp314' + - python: '3.14' + python_spec: '3.14.* *_cp314t' + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + + - name: Set pkgs_dirs + run: | + echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc + - name: Cache conda packages + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + env: + CACHE_NUMBER: 3 # Increase to reset cache + with: + path: ~/.conda/pkgs + key: + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && contains(matrix.python_spec, 'cp314t') && 't' || '' }}-${{hashFiles('conda-recipe-cf/meta.yaml') }} + restore-keys: | + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && contains(matrix.python_spec, 'cp314t') && 't' || '' }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}- + - name: Add conda to system path + run: echo "$CONDA/bin" >> "$GITHUB_PATH" + - name: Update conda + run: | + conda update -n base --all + - name: Install conda-build + run: | + conda install -n base conda-build=${{ env.CONDA_BUILD_VERSION }} ${{ env.CHANNELS }} + - name: Show Conda info + run: | + conda info --all + - name: List base environment packages + run: | + conda list -n base + - name: Build conda package + run: | + if [ -n "${{ matrix.python_spec }}" ]; then + conda build --no-test --python "${{ matrix.python_spec }}" ${{ env.CHANNELS }} ${{ env.RECIPE_DIR }} + else + conda build --no-test --python ${{ matrix.python }} ${{ env.CHANNELS }} ${{ env.RECIPE_DIR }} + fi + - name: Upload artifact + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (contains(matrix.python_spec, 'cp314t') && '3.14t' || '3.14') || matrix.python }} + path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.conda + + build_windows: + runs-on: windows-latest + timeout-minutes: 150 + defaults: + run: + shell: cmd /C CALL {0} + + strategy: + matrix: + python: ['3.10', '3.11', '3.12', '3.13'] + python_spec: [''] + include: + - python: '3.14' + python_spec: '3.14.* *_cp314' + - python: '3.14' + python_spec: '3.14.* *_cp314t' + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 + with: + access_token: ${{ github.token }} + + # the recipe takes the version from git describe + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + + - uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 + with: + auto-update-conda: true + miniforge-version: latest + activate-environment: build + channels: conda-forge + conda-remove-defaults: true + python-version: ${{ matrix.python }} + conda-build-version: ${{ env.CONDA_BUILD_VERSION }} + - name: Store conda paths as envs + shell: bash -l {0} + run: | + echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> "$GITHUB_ENV" + - name: Show Conda info + run: | + conda info --all + - name: List base environment packages + run: | + conda list -n base + - name: Build conda package + env: + OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides + run: | + set "PYTHON_VER=${{ matrix.python_spec }}" + if "%PYTHON_VER%" NEQ "" ( + conda build --no-test --python "%PYTHON_VER%" ${{ env.CHANNELS }} ${{ env.RECIPE_DIR }} + ) else ( + conda build --no-test --python ${{ matrix.python }} ${{ env.CHANNELS }} ${{ env.RECIPE_DIR }} + ) + + - name: Upload artifact + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (contains(matrix.python_spec, 'cp314t') && '3.14t' || '3.14') || matrix.python }} + path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda + + test_linux: + needs: build_linux + runs-on: ${{ matrix.runner }} + timeout-minutes: 30 + + strategy: + matrix: + python: ['3.10', '3.11', '3.12', '3.13'] + python_spec: [''] + include: + - python: '3.14' + python_spec: '3.14.* *_cp314' + runner: ubuntu-22.04 + - python: '3.14' + python_spec: '3.14.* *_cp314t' + runner: ubuntu-22.04 + runner: [ubuntu-latest] + + steps: + - name: Download artifact + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (contains(matrix.python_spec, 'cp314t') && '3.14t' || '3.14') || matrix.python }} + - name: Add conda to system path + run: echo "$CONDA/bin" >> "$GITHUB_PATH" + - name: Update conda + run: | + conda update -n base --all + - name: Install conda-index + run: | + conda install -n base conda-index=${{ env.CONDA_INDEX_VERSION }} ${{ env.CHANNELS }} + - name: Show Conda info + run: | + conda info --all + - name: List base environment packages + run: | + conda list -n base + - name: Create conda channel + run: | + mkdir -p "$GITHUB_WORKSPACE/channel/linux-64" + conda index "$GITHUB_WORKSPACE/channel" || exit 1 + mv "${PACKAGE_NAME}"-*.conda "$GITHUB_WORKSPACE/channel/linux-64" || exit 1 + conda index "$GITHUB_WORKSPACE/channel" || exit 1 + # Test channel + conda search "$PACKAGE_NAME" -c "$GITHUB_WORKSPACE/channel" --override-channels --info --json > "$GITHUB_WORKSPACE/ver.json" + cat ver.json + - name: Collect dependencies + run: | + CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}" + export CHANNELS + PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}") + export PACKAGE_VERSION + PYTHON_VER="${{ matrix.python_spec }}" + if [ -z "${PYTHON_VER}" ]; then + PYTHON_VER="${{ matrix.python }}" + fi + # shellcheck disable=SC2086 + conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=${PACKAGE_VERSION} python="${PYTHON_VER}" $CHANNELS --only-deps --dry-run > lockfile + cat lockfile + - name: Set pkgs_dirs + run: | + echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc + - name: Cache conda packages + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + env: + CACHE_NUMBER: 3 # Increase to reset cache + with: + path: ~/.conda/pkgs + key: + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && contains(matrix.python_spec, 'cp314t') && 't' || '' }}-${{hashFiles('lockfile') }} + restore-keys: | + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && contains(matrix.python_spec, 'cp314t') && 't' || '' }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}- + - name: Install dpctl + run: | + CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}" + export CHANNELS + # intel-opencl-rt provides the OpenCL CPU device to run the tests on + TEST_DEPENDENCIES="pytest cython setuptools intel-opencl-rt" + export TEST_DEPENDENCIES + PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}") + PYTHON_VER="${{ matrix.python_spec }}" + if [ -z "${PYTHON_VER}" ]; then + PYTHON_VER="${{ matrix.python }}" + fi + export PACKAGE_VERSION + # shellcheck disable=SC2086 + conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=${PACKAGE_VERSION} $TEST_DEPENDENCIES python="${PYTHON_VER}" $CHANNELS + # Test installed packages + conda list -n "${{ env.TEST_ENV_NAME }}" + - name: Smoke test + run: | + . "$CONDA/etc/profile.d/conda.sh" + conda activate "${{ env.TEST_ENV_NAME }}" + python -c "import dpctl; dpctl.lsplatform(verbosity=2)" + - name: Create test temp dir + # create temporary empty folder to runs tests from + # https://github.com/pytest-dev/pytest/issues/11904 + run: mkdir -p "${GITHUB_WORKSPACE}/test_tmp" + - name: Run tests + working-directory: ${{ github.workspace }}/test_tmp + env: + SYCL_CACHE_PERSISTENT: 1 + run: | + . "$CONDA/etc/profile.d/conda.sh" + conda activate "${{ env.TEST_ENV_NAME }}" + python -m pytest -v --pyargs "${{ env.MODULE_NAME }}" + + test_windows: + needs: build_windows + runs-on: ${{ matrix.runner }} + timeout-minutes: 60 + defaults: + run: + shell: cmd /C CALL {0} + strategy: + matrix: + python: ['3.10', '3.11', '3.12', '3.13'] + python_spec: [''] + include: + - python: '3.14' + python_spec: '3.14.* *_cp314' + runner: windows-latest + - python: '3.14' + python_spec: '3.14.* *_cp314t' + runner: windows-latest + runner: [windows-latest] + env: + workdir: '${{ github.workspace }}' + + steps: + - name: Download artifact + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (contains(matrix.python_spec, 'cp314t') && '3.14t' || '3.14') || matrix.python }} + + - uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 + with: + auto-update-conda: true + miniforge-version: latest + channels: conda-forge + conda-remove-defaults: true + activate-environment: ${{ env.TEST_ENV_NAME }} + python-version: ${{ matrix.python }} + + - name: Install conda-index + run: | + conda install -n base conda-index=${{ env.CONDA_INDEX_VERSION }} + + - name: Show Conda info + run: | + conda info --all + + - name: List base environment packages + run: | + conda list -n base + + - name: Create conda channel with the artifact bit + run: | + @echo on + mkdir ${{ env.workdir }}\channel\win-64 + move ${{ env.PACKAGE_NAME }}-*.conda ${{ env.workdir }}\channel\win-64 + dir ${{ env.workdir }}\channel\win-64\ + + - name: Index the channel + run: | + @echo on + conda index ${{ env.workdir }}\channel + + - name: Dump dpctl version info from created channel into ver.json + run: | + @echo on + conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json + dir ${{ env.workdir }} + + - name: Install dpctl + run: | + @ECHO ON + IF NOT EXIST ver.json ( + copy /Y ${{ env.workdir }}\ver.json . + ) + set "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%" + FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO ( + SET PACKAGE_VERSION=%%F + ) + SET "PYTHON_VER=${{ matrix.python_spec }}" + IF "%PYTHON_VER%"=="" SET "PYTHON_VER=${{ matrix.python }}" + REM intel-opencl-rt provides the OpenCL CPU device to run the tests on + SET "TEST_DEPENDENCIES=pytest cython setuptools intel-opencl-rt" + conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python="%PYTHON_VER%" -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} + + - name: Report content of test environment + run: | + conda info && conda list -n ${{ env.TEST_ENV_NAME }} + + - name: Register the OpenCL CPU driver with the ICD loader + shell: pwsh + run: | + $vendors = "HKLM:\SOFTWARE\Khronos\OpenCL\Vendors" + $drivers = @(Get-ChildItem -Recurse -ErrorAction SilentlyContinue -Filter intelocl64.dll -Path "$env:CONDA_PREFIX\Library\bin") + if ($drivers.Count -eq 0) { throw "intel-opencl-rt installed no OpenCL CPU driver under $env:CONDA_PREFIX" } + if (-not (Test-Path $vendors)) { New-Item -Path $vendors -Force | Out-Null } + foreach ($driver in $drivers) { + New-ItemProperty -Path $vendors -Name $driver.FullName -Value 0 -PropertyType DWord -Force | Out-Null + } + Get-ItemProperty -Path $vendors + + - name: Smoke test + run: >- + conda activate ${{ env.TEST_ENV_NAME }} && python -m dpctl -f + + - name: Create empty temporary directory to run tests from + # create temporary empty folder to runs tests from + # https://github.com/pytest-dev/pytest/issues/11904 + run: >- + mkdir "${{ env.workdir }}\test_tmp" + + - name: Run tests + env: + SYCL_CACHE_PERSISTENT: 1 + working-directory: ${{ env.workdir }}\test_tmp + run: >- + conda activate ${{ env.TEST_ENV_NAME }} && python -m pytest -v -s --pyargs ${{ env.MODULE_NAME }} diff --git a/conda-recipe-cf/bld.bat b/conda-recipe-cf/bld.bat new file mode 100644 index 0000000000..f2352bc657 --- /dev/null +++ b/conda-recipe-cf/bld.bat @@ -0,0 +1,46 @@ +REM A workaround for activate-dpcpp.bat issue to be addressed in 2021.4 +set "LIB=%BUILD_PREFIX%\Library\lib;%BUILD_PREFIX%\compiler\lib;%LIB%" +set "INCLUDE=%BUILD_PREFIX%\include;%INCLUDE%" + +"%PYTHON%" setup.py clean --all + +REM useful for building in resources constrained VMs (public CI) +set "CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE" + +REM Try to detect SYCL resource/include dir from icpx +for /f "usebackq delims=" %%R in (`icpx --print-resource-dir 2^>NUL`) do ( + set "SYCL_RESOURCE_DIR=%%R" +) + +if defined SYCL_RESOURCE_DIR ( + if exist "%SYCL_RESOURCE_DIR%\include" ( + set "SYCL_INCLUDE_DIR_HINT=%SYCL_RESOURCE_DIR%" + ) +) + +set "CC=icx" +set "CXX=icx" + +set "CMAKE_GENERATOR=Ninja" +:: Make CMake verbose +set "VERBOSE=1" + +:: set CMAKE to use less threads to avoid OOM +set CMAKE_BUILD_PARALLEL_LEVEL=%CPU_COUNT% + +set "CMAKE_ARGS=%CMAKE_ARGS% -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=%PREFIX:\=/%/Library/include/level_zero" + +%PYTHON% -m build -w -n -x +if %ERRORLEVEL% neq 0 exit 1 + +:: wheel file was renamed +for /f %%f in ('dir /b /S .\dist') do ( + %PYTHON% -m pip install %%f ^ + --no-build-isolation ^ + --no-deps ^ + --only-binary :all: ^ + --no-index ^ + --prefix %PREFIX% ^ + -vv + if %ERRORLEVEL% neq 0 exit 1 +) diff --git a/conda-recipe-cf/build.sh b/conda-recipe-cf/build.sh new file mode 100755 index 0000000000..983ba5d76c --- /dev/null +++ b/conda-recipe-cf/build.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# This is necessary to help DPC++ find Intel libraries such as SVML, IRNG, etc in build prefix +export LIBRARY_PATH="$LIBRARY_PATH:${BUILD_PREFIX}/lib" + +# Intel LLVM must cooperate with compiler and sysroot from conda +echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot -target ${HOST}" > icpx_for_conda.cfg +ICPXCFG="$(pwd)/icpx_for_conda.cfg" +export ICPXCFG +ICXCFG="$(pwd)/icpx_for_conda.cfg" +export ICXCFG + +if [ -e "_skbuild" ]; then + ${PYTHON} setup.py clean --all +fi + +export CC=icx +export CXX=icpx + +export CMAKE_GENERATOR=Ninja +# Make CMake verbose +export VERBOSE=1 + +# set CMAKE to use less threads to avoid OOM +export CMAKE_BUILD_PARALLEL_LEVEL=${CPU_COUNT} + +CMAKE_ARGS="${CMAKE_ARGS} -DDPCTL_LEVEL_ZERO_INCLUDE_DIR=${PREFIX}/include/level_zero -DDPCTL_WITH_REDIST=ON" + +# -wnx flags mean: --wheel --no-isolation --skip-dependency-check +${PYTHON} -m build -w -n -x + +${PYTHON} -m pip install dist/dpctl*.whl \ + --no-build-isolation \ + --no-deps \ + --only-binary :all: \ + --no-index \ + --prefix "${PREFIX}" \ + -vv diff --git a/conda-recipe-cf/conda_build_config.yaml b/conda-recipe-cf/conda_build_config.yaml new file mode 100644 index 0000000000..dc810c8b5f --- /dev/null +++ b/conda-recipe-cf/conda_build_config.yaml @@ -0,0 +1,18 @@ +numpy: + - '2' +c_compiler: # [linux] + - gcc # [linux] +cxx_compiler: # [linux] + - gxx # [linux] +cxx_compiler_version: # [linux] + - '14' # [linux] +c_stdlib: # [linux] + - sysroot # [linux] +c_stdlib_version: # [linux] + - '2.28' # [linux] +c_stdlib: # [win] + - vs # [win] +cxx_compiler: # [win] + - vs2022 # [win] +c_compiler: # [win] + - vs2022 # [win] diff --git a/conda-recipe-cf/meta.yaml b/conda-recipe-cf/meta.yaml new file mode 100644 index 0000000000..9c87994d2e --- /dev/null +++ b/conda-recipe-cf/meta.yaml @@ -0,0 +1,78 @@ +{% set required_compiler_version = "2026.0.0" %} +package: + name: dpctl + version: {{ GIT_DESCRIBE_TAG }} + +source: + path: .. + +build: + number: {{ GIT_DESCRIBE_NUMBER }} + # let the public CI build without IPO, which needs more resources than the + # GitHub Actions runners provide + script_env: + - OVERRIDE_INTEL_IPO # [win] + ignore_run_exports: + - level-zero + missing_dso_whitelist: + - $RPATH/DPCTLSyclInterface.dll # [win] + skip: true # [osx or py<39] + +requirements: + # TODO: keep in sync with /pyproject.toml + build: + - {{ compiler('cxx') }} + - {{ stdlib('c') }} + - {{ compiler('dpcpp') }} >={{ required_compiler_version }} + - ninja >=1.11.1 # [linux] + - cmake >=3.29.0 + host: + - python + - pip >=24.0 + - level-zero-devel >=1.16 + - pybind11 >=3.0.2 + - intel-sycl-rt + - intel-cmplr-lib-rt + # Ensure we are using latest version of setuptools, since we don't need + # editable environments for release. + - setuptools >=69 + - wheel >=0.43 + - python-build >=1.1 + - scikit-build >=0.17.0 + - cython >=3.1.0 # [py>=313] + - cython >=3.0.10 # [py<313] + - numpy + # WARNING: check with doc how to upgrade + - versioneer ==0.29 + # versioneer dependency + - tomli # [py<311] + run: + - python + - {{ pin_compatible('intel-sycl-rt', min_pin='x.x', max_pin='x') }} + - {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }} + - numpy + +test: + requires: + - pip + - pytest + - cython + - setuptools + commands: + - pip check + - python -c "import dpctl; print(dpctl.__version__)" + - python -m dpctl -f + +about: + home: https://github.com/IntelPython/dpctl.git + license: Apache-2.0 + license_file: LICENSE + summary: 'A lightweight Python wrapper for a subset of SYCL API.' + description: | + Data Parallel Control or dpctl is a Python library that allows users to control the execution placement of a compute kernel on an XPU. + +extra: + recipe-maintainers: + - ndgrigorian + - antonwolfy + - vlad-perevezentsev diff --git a/conda-recipe-cf/run_test.bat b/conda-recipe-cf/run_test.bat new file mode 100644 index 0000000000..42816416d3 --- /dev/null +++ b/conda-recipe-cf/run_test.bat @@ -0,0 +1,10 @@ +@echo on + +"%PYTHON%" -c "import dpctl; print(dpctl.__version__)" +if %ERRORLEVEL% neq 0 exit 1 + +"%PYTHON%" -m dpctl -f +if %ERRORLEVEL% neq 0 exit 1 + +python -m pytest -q -ra --disable-warnings --pyargs dpctl -vv +if %ERRORLEVEL% neq 0 exit 1 diff --git a/conda-recipe-cf/run_test.sh b/conda-recipe-cf/run_test.sh new file mode 100755 index 0000000000..de137e0caa --- /dev/null +++ b/conda-recipe-cf/run_test.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +${PYTHON} -c "import dpctl; print(dpctl.__version__)" +${PYTHON} -m dpctl -f +${PYTHON} -m pytest -q -ra --disable-warnings --pyargs dpctl -vv