@@ -10,6 +10,7 @@ permissions: read-all
1010
1111env :
1212 CHANNELS : ' -c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
13+ TEST_ENV_NAME : ' test_onemkl_interfaces'
1314 BUILD_DEP_PKGS : >-
1415 mkl-devel-dpcpp
1516 tbb-devel
2425 scikit-build
2526
2627jobs :
27- build_and_test :
28- name : Run on ['${{ matrix.os }}', python='${{ matrix.python }}']
28+ test_by_tag :
29+ name : Run on ['${{ matrix.os }}', python='${{ matrix.python }}'] with oneMKL tag
2930
3031 strategy :
3132 matrix :
4243 run :
4344 shell : ${{ matrix.os == 'windows-2019' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
4445
45- continue-on-error : true
46+ continue-on-error : false
4647
4748 steps :
4849 - name : Cancel Previous Runs
6364 channels : conda-forge
6465 conda-remove-defaults : ' true'
6566 python-version : ${{ matrix.python }}
66- activate-environment : ' test_onemkl_interfaces '
67+ activate-environment : ${{ env.TEST_ENV_NAME }}
6768
6869 # Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
6970 - name : Disable speed limit check in mamba
9899 python -m pytest -ra --pyargs dpnp.tests
99100 env :
100101 SYCL_CACHE_PERSISTENT : 1
102+
103+ test_by_branch :
104+ name : Run on ['${{ matrix.os }}', python='${{ matrix.python }}'] with oneMKL develop branch
105+
106+ strategy :
107+ matrix :
108+ python : ['3.12']
109+ os : [ubuntu-22.04] # windows-2019 - no DFT support for Windows in oneMKL
110+
111+ permissions :
112+ # Needed to cancel any previous runs that are not completed for a given workflow
113+ actions : write
114+
115+ runs-on : ${{ matrix.os }}
116+
117+ defaults :
118+ run :
119+ shell : ${{ matrix.os == 'windows-2019' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
120+
121+ continue-on-error : true
122+
123+ env :
124+ onemkl-source-dir : ' ${{ github.workspace }}/onemkl/'
125+
126+ steps :
127+ - name : Cancel Previous Runs
128+ uses : styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
129+ with :
130+ access_token : ${{ github.token }}
131+
132+ - name : Checkout DPNP repo
133+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
134+ with :
135+ fetch-depth : 0
136+
137+ - name : Checkout oneMKL repo
138+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
139+ with :
140+ repository : ' oneapi-src/oneMKL'
141+ ref : ' develop'
142+ path : ${{ env.onemkl-source-dir }}
143+ fetch-depth : 0
144+
145+ - name : oneMKL ls info
146+ run : |
147+ ls -la ${{ env.onemkl-source-dir }}
148+
149+ - name : Setup miniconda
150+ uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
151+ with :
152+ miniforge-version : latest
153+ use-mamba : ' true'
154+ channels : conda-forge
155+ conda-remove-defaults : ' true'
156+ python-version : ${{ matrix.python }}
157+ activate-environment : ${{ env.TEST_ENV_NAME }}
158+
159+ # Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
160+ - name : Disable speed limit check in mamba
161+ run : echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
162+
163+ - name : Install dpnp build dependencies
164+ run : |
165+ mamba install ${{ env.DPCPP_PKG }} ${{ env.BUILD_DEP_PKGS }} ${{ env.CHANNELS }}
166+ env :
167+ DPCPP_PKG : ${{ matrix.os == 'windows-2019' && 'dpcpp_win-64 vs_win-64=2017.9' || 'dpcpp_linux-64' }}
168+
169+ - name : Conda info
170+ run : |
171+ mamba info
172+ mamba list
173+
174+ - name : Build and install DPNP package
175+ run : |
176+ python scripts/build_locally.py --onemkl-interfaces --onemkl-interfaces-dir=${{ env.onemkl-source-dir }} --verbose
177+
178+ - name : Smoke test
179+ run : |
180+ python -m dpctl -f
181+ python -c "import dpnp; print(dpnp.__version__)"
182+
183+ - name : Install pytest
184+ run : |
185+ mamba install pytest ${{ env.CHANNELS }}
186+
187+ - name : Run tests
188+ run : |
189+ python -m pytest -ra --pyargs dpnp.tests
190+ env :
191+ SYCL_CACHE_PERSISTENT : 1
0 commit comments