Skip to content

Commit fe43949

Browse files
committed
Add GH action to check build with oneMKL interfaces
1 parent 11771fb commit fe43949

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Test oneMKL interfaces
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
permissions: read-all
10+
11+
env:
12+
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
13+
BUILD_DEP_PKGS: >-
14+
mkl-devel-dpcpp
15+
tbb-devel
16+
dpctl
17+
onedpl-devel
18+
setuptools
19+
numpy
20+
cython
21+
cmake
22+
ninja
23+
scikit-build
24+
25+
jobs:
26+
build:
27+
name: Build ['${{ matrix.os }}', python='${{ matrix.python }}']
28+
29+
strategy:
30+
matrix:
31+
python: ['3.12']
32+
os: [ubuntu-22.04, windows-2019]
33+
34+
permissions:
35+
# Needed to cancel any previous runs that are not completed for a given workflow
36+
actions: write
37+
38+
runs-on: ${{ matrix.os }}
39+
40+
defaults:
41+
run:
42+
shell: ${{ matrix.os == 'windows-2019' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
43+
44+
continue-on-error: true
45+
46+
steps:
47+
- name: Cancel Previous Runs
48+
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
49+
with:
50+
access_token: ${{ github.token }}
51+
52+
- name: Checkout DPNP repo
53+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
54+
with:
55+
fetch-depth: 0
56+
57+
- name: Setup miniconda
58+
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
59+
with:
60+
miniforge-version: latest
61+
use-mamba: 'true'
62+
channels: conda-forge
63+
conda-remove-defaults: 'true'
64+
python-version: ${{ matrix.python }}
65+
activate-environment: 'test_onemkl_interfaces'
66+
67+
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
68+
- name: Disable speed limit check in mamba
69+
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
70+
71+
- name: Install dpnp build dependencies
72+
run: |
73+
mamba install ${{ env.DPCPP_PKG }} ${{ env.BUILD_DEP_PKGS }} ${{ env.CHANNELS }}
74+
env:
75+
DPCPP_PKG: ${{ matrix.os == 'windows-2019' && 'dpcpp_win-64' || 'dpcpp_linux-64' }}
76+
# DPCPP_PKG: 'dpcpp_linux-64'
77+
# DPCPP_PKG: 'dpcpp_${{ matrix.os == 'windows-2019' && 'win' || 'linux' }}-64'
78+
79+
- name: Conda info
80+
run: |
81+
mamba info
82+
mamba list
83+
84+
- name: Build and install DPNP package
85+
run: |
86+
python scripts/build_locally.py --onemkl-interfaces --verbose
87+
88+
- name: Smoke test
89+
run: |
90+
python -m dpctl -f
91+
python -c "import dpnp; print(dpnp.__version__)"
92+
93+
- name: Run tests
94+
run: |
95+
python -m pytest -ra --pyargs dpnp.tests
96+
env:
97+
SYCL_CACHE_PERSISTENT: 1

0 commit comments

Comments
 (0)