@@ -49,34 +49,27 @@ jobs:
49
49
- name : Checkout ${{ env.PACKAGE_NAME }} repo
50
50
uses : actions/checkout@v4
51
51
with :
52
+ # We need tags to build proper version
52
53
fetch-depth : 0
53
54
54
55
- name : Setup miniconda
55
- uses : conda-incubator/ setup-miniconda@v3
56
+ uses : ./.github/actions/ setup-miniconda
56
57
with :
57
- python-version : ${{ inputs.python-version }}
58
- miniforge-variant : Mambaforge
59
- miniforge-version : latest
58
+ python-version : ${{ matrix.python }}
60
59
activate-environment : " build"
61
60
channels : ${{ env.CHANNELS }}
62
61
channel-priority : " disabled"
63
- run-post : false
64
-
65
- - name : Disable defautls
66
- run : conda config --remove channels defaults
62
+ dependencies : " conda-build"
63
+ environment-file : environment/conda-package-build.yml
67
64
68
65
- name : Store conda paths as envs
69
66
run : |
70
67
echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\" '/' >> $GITHUB_ENV
71
68
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
72
69
echo "WHEELS_NAME=$PACKAGE_NAME" | tr "-" "_" >> $GITHUB_ENV
73
70
74
- # boa is an extention to conda so we can use mamba resolver in conda build
75
- - name : Install conda-build
76
- run : mamba install boa
77
-
78
71
- name : Build conda package
79
- run : conda mambabuild --no-test --python ${{ matrix.python }} conda-recipe
72
+ run : conda build --no-test --python ${{ matrix.python }} conda-recipe
80
73
81
74
- name : Upload artifact
82
75
uses : actions/upload-artifact@v4
@@ -107,28 +100,32 @@ jobs:
107
100
python : ['3.9', '3.10', '3.11']
108
101
os : [ubuntu-20.04, ubuntu-latest, windows-latest]
109
102
experimental : [false]
110
- use_mlir : [false]
111
103
scope : ['tests', 'examples', 'gdb']
112
104
exclude :
113
105
- os : windows-latest
114
106
scope : ' gdb'
115
107
116
- continue-on-error : ${{ matrix.experimental || matrix.use_mlir }}
108
+ continue-on-error : ${{ matrix.experimental }}
117
109
118
110
steps :
111
+ - name : Checkout setup config
112
+ uses : actions/checkout@v4
113
+ with :
114
+ sparse-checkout : |
115
+ .github/actions
116
+ environment
117
+ pyproject.toml
118
+ sparse-checkout-cone-mode : false
119
+
119
120
- name : Setup miniconda
120
- uses : conda-incubator/ setup-miniconda@v3
121
+ uses : ./.github/actions/ setup-miniconda
121
122
with :
122
123
python-version : ${{ matrix.python }}
123
- miniforge-variant : Mambaforge
124
- miniforge-version : latest
125
124
activate-environment : " test"
126
125
channels : ${{ env.CHANNELS }}
127
126
channel-priority : " disabled"
128
- run-post : false
129
-
130
- - name : Disable defautls
131
- run : conda config --remove channels defaults
127
+ dependencies : " conda-index;pytest-cov;conda-tree"
128
+ environment-file : environment/conda-package-test.yml
132
129
133
130
- name : Store conda paths as envs
134
131
shell : bash -l {0}
@@ -153,10 +150,6 @@ jobs:
153
150
mkdir -p ${EXTRACTED_PKG_PATH}
154
151
tar -xvf ${PKG_PATH_IN_CHANNEL}${PACKAGE_NAME}-*.tar.bz2 -C ${EXTRACTED_PKG_PATH} --force-local
155
152
156
- - name : Install conda build
157
- run : |
158
- mamba install conda-build conda-index
159
-
160
153
- name : Create conda channel
161
154
# Note conda index (instead of python -m conda_index) may find legacy
162
155
# conda-build index.
@@ -165,7 +158,7 @@ jobs:
165
158
166
159
- name : Test conda channel
167
160
run : |
168
- mamba search ${{ env.PACKAGE_NAME }} -c ${{ env.CHANNEL_PATH }} --override-channels --info --json > ${{ env.VER_JSON_PATH }}
161
+ conda search ${{ env.PACKAGE_NAME }} -c ${{ env.CHANNEL_PATH }} --override-channels --info --json > ${{ env.VER_JSON_PATH }}
169
162
cat ${{ env.VER_JSON_PATH }}
170
163
171
164
- name : Collect dependencies
@@ -176,14 +169,8 @@ jobs:
176
169
177
170
# We want to make sure that all dependecies install automatically.
178
171
# intel::intel-opencl-rt is needed for set-intel-ocl-icd-registry.ps1
179
- # TODO: remove pytest dependency directly, once resolved:
180
- # https://github.com/pytest-dev/pytest/issues/12036
181
- - name : Install builded package
182
- run : mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} intel::intel-opencl-rt pytest-cov pytest=8.0.1 conda-tree -c ${{ env.CHANNEL_PATH }}
183
-
184
- - name : Install numba-mlir
185
- if : matrix.use_mlir
186
- run : mamba install numba-mlir -c dppy/label/dev -c conda-forge -c intel
172
+ - name : Install built package
173
+ run : conda install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} intel::intel-opencl-rt -c ${{ env.CHANNEL_PATH }}
187
174
188
175
- name : Setup OpenCL CPU device
189
176
if : runner.os == 'Windows'
@@ -192,13 +179,6 @@ jobs:
192
179
$script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
193
180
&$script_path
194
181
195
- - name : Checkout setup config
196
- uses : actions/checkout@v4
197
- with :
198
- sparse-checkout : |
199
- pyproject.toml
200
- sparse-checkout-cone-mode : false
201
-
202
182
- name : List installed packages
203
183
run : conda list
204
184
@@ -210,9 +190,7 @@ jobs:
210
190
run : conda-tree depends -t numba-dpex
211
191
212
192
- name : Smoke test
213
- env :
214
- NUMBA_DPEX_USE_MLIR : ${{ matrix.use_mlir && '1' || '0' }}
215
- run : python -c "import dpnp, dpctl, numba_dpex; dpctl.lsplatform()"
193
+ run : python -c "import dpnp, dpctl, numba_dpex; dpctl.lsplatform(verbosity=2)"
216
194
217
195
- name : Smoke test - test import with no default device
218
196
env :
@@ -221,8 +199,6 @@ jobs:
221
199
222
200
- name : Run tests
223
201
if : ${{ matrix.scope == 'tests' }}
224
- env :
225
- NUMBA_DPEX_USE_MLIR : ${{ matrix.use_mlir && '1' || '0' }}
226
202
run : |
227
203
pytest -q -ra --disable-warnings --pyargs ${{ env.MODULE_NAME }} -vv -k "not test_1d_strided_dpnp_array_in_kernel[2]"
228
204
@@ -232,7 +208,6 @@ jobs:
232
208
# and are possibly due to some driver/opencl compiler bug.
233
209
if : ${{ matrix.scope == 'tests' }}
234
210
env :
235
- NUMBA_DPEX_USE_MLIR : ${{ matrix.use_mlir && '1' || '0' }}
236
211
# Disabling device driver optimization to prevent catching bugs
237
212
# from driver compiler.
238
213
ONEAPI_DEVICE_SELECTOR : " opencl:cpu"
@@ -267,10 +242,10 @@ jobs:
267
242
export ONEAPI_ROOT=/tmp/gdb
268
243
./${{ env.GDB_INSTALLER }} -a -s --eula accept --install-dir $ONEAPI_ROOT
269
244
source $ONEAPI_ROOT/debugger/latest/env/vars.sh
270
- # We match only major and minor version because latest gdb is not
271
- # often available.
272
- gdb_version=$(echo "$GDB_INSTALLER" | grep -oP '\d+\.\d+ ' | head -n 1)
273
- icpx_version=$(conda list dpcpp-cpp-rt | tail -n 1 | awk '{print $2}' | grep -oP '\d+\.\d+' )
245
+ # We match only major version because latest gdb is not often
246
+ # available.
247
+ gdb_version=$(echo "$GDB_INSTALLER" | grep -oP '\d+' | head -n 1)
248
+ icpx_version=$(conda list dpcpp-cpp-rt | tail -n 1 | awk '{print $2}' | grep -oP '\d+' | head -n 1 )
274
249
if [ "$gdb_version" != "$icpx_version" ]; then
275
250
echo "Error: GDB version ($gdb_version) does not match icpx version ($icpx_version)"
276
251
exit 1
@@ -297,6 +272,13 @@ jobs:
297
272
continue-on-error : false
298
273
299
274
steps :
275
+ - name : Checkout setup config
276
+ uses : actions/checkout@v4
277
+ with :
278
+ sparse-checkout : |
279
+ .github/actions
280
+ environment
281
+
300
282
- name : Download artifact
301
283
uses : actions/download-artifact@v4
302
284
with :
@@ -308,18 +290,13 @@ jobs:
308
290
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
309
291
310
292
- name : Setup miniconda
311
- uses : conda-incubator/ setup-miniconda@v3
293
+ uses : ./.github/actions/ setup-miniconda
312
294
with :
313
295
python-version : ${{ matrix.python }}
314
- miniforge-variant : Mambaforge
315
- miniforge-version : latest
316
296
activate-environment : " anaconda"
317
- channels : ${{ env.CHANNELS }}
318
297
channel-priority : " disabled"
319
- run-post : false
320
-
321
- - name : Install anaconda-client
322
- run : mamba install anaconda-client
298
+ dependencies : " anaconda-client"
299
+ environment-file : environment/conda-package-anaconda.yml
323
300
324
301
- name : Upload
325
302
run : anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
@@ -342,21 +319,26 @@ jobs:
342
319
run :
343
320
shell : bash -el {0}
344
321
steps :
345
- - uses : conda-incubator/setup-miniconda@v3
322
+ - name : Checkout setup config
323
+ uses : actions/checkout@v4
346
324
with :
347
- run-post : false
348
- channel-priority : " disabled"
349
- channels : conda-forge
350
- python-version : ' 3.11'
325
+ sparse-checkout : |
326
+ .github/actions
327
+ environment
351
328
352
- - name : Install anaconda-client
353
- run : conda install anaconda-client
329
+ - name : Setup miniconda
330
+ uses : ./.github/actions/setup-miniconda
331
+ with :
332
+ python-version : ' 3.11'
333
+ activate-environment : " anaconda"
334
+ channel-priority : " disabled"
335
+ dependencies : " anaconda-client"
336
+ environment-file : environment/conda-package-anaconda.yml
354
337
355
338
- name : Checkout repo
356
339
uses : actions/checkout@v4
357
340
with :
358
341
repository : IntelPython/devops-tools
359
- fetch-depth : 0
360
342
361
343
- name : Cleanup old packages
362
344
run : |
0 commit comments