6
6
PACKAGE_NAME : mkl_random
7
7
MODULE_NAME : mkl_random
8
8
VER_SCRIPT1 : " import json; f = open('ver.json', 'r'); j = json.load(f); f.close(); "
9
- VER_SCRIPT2 : " d = j['dpctl '][0]; print('='.join((d[s] for s in ('version', 'build'))))"
9
+ VER_SCRIPT2 : " d = j['mkl_random '][0]; print('='.join((d[s] for s in ('version', 'build'))))"
10
10
11
11
jobs :
12
12
build_linux :
13
13
runs-on : ubuntu-latest
14
14
strategy :
15
15
matrix :
16
- python : [3.9]
16
+ python : [" 3.9", "3.10", "3.11", "3.12" ]
17
17
steps :
18
- - uses : actions/checkout@v2
18
+ - uses : actions/checkout@v4
19
19
with :
20
20
fetch-depth : 0
21
21
22
22
- name : Set pkgs_dirs
23
23
run : |
24
24
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
25
25
- name : Cache conda packages
26
- uses : actions/cache@v2
26
+ uses : actions/cache@v4
27
27
env :
28
28
CACHE_NUMBER : 0 # Increase to reset cache
29
29
with :
40
40
run : conda install conda-build
41
41
- name : Build conda package
42
42
run : |
43
- CHANNELS="-c intel -c defaults --override-channels"
43
+ CHANNELS="-c conda-forge -c intel --override-channels"
44
44
VERSIONS="--python ${{ matrix.python }}"
45
45
TEST="--no-test"
46
46
50
50
$CHANNELS \
51
51
conda-recipe
52
52
- name : Upload artifact
53
- uses : actions/upload-artifact@v2
53
+ uses : actions/upload-artifact@v4
54
54
with :
55
55
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
56
56
path : /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2
@@ -60,20 +60,20 @@ jobs:
60
60
61
61
strategy :
62
62
matrix :
63
- python : ['3.9']
63
+ python : ['3.9', '3.10', '3.11', '3.12' ]
64
64
env :
65
65
conda-bld : C:\Miniconda\conda-bld\win-64\
66
66
steps :
67
- - uses : actions/checkout@v2
67
+ - uses : actions/checkout@v4
68
68
with :
69
69
fetch-depth : 0
70
- - uses : conda-incubator/setup-miniconda@v2
70
+ - uses : conda-incubator/setup-miniconda@v3
71
71
with :
72
72
auto-activate-base : true
73
73
activate-environment : " "
74
74
75
75
- name : Cache conda packages
76
- uses : actions/cache@v3
76
+ uses : actions/cache@v4
77
77
env :
78
78
CACHE_NUMBER : 3 # Increase to reset cache
79
79
with :
86
86
- name : Install conda-build
87
87
run : conda install conda-build
88
88
- name : Build conda package
89
- run : conda build --no-test --python ${{ matrix.python }} -c intel -c defaults --override-channels conda-recipe
89
+ run : conda build --no-test --python ${{ matrix.python }} -c intel -c conda-forge --override-channels conda-recipe
90
90
- name : Upload artifact
91
- uses : actions/upload-artifact@v2
91
+ uses : actions/upload-artifact@v4
92
92
with :
93
93
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
94
94
path : ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2
@@ -99,16 +99,16 @@ jobs:
99
99
100
100
strategy :
101
101
matrix :
102
- python : [3.9]
102
+ python : [' 3.9', '3.10', '3.11', '3.12' ]
103
103
experimental : [false]
104
104
runner : [ubuntu-latest]
105
105
continue-on-error : ${{ matrix.experimental }}
106
106
env :
107
- CHANNELS : -c intel -c defaults --override-channels
107
+ CHANNELS : -c conda-forge -c intel --override-channels
108
108
109
109
steps :
110
110
- name : Download artifact
111
- uses : actions/download-artifact@v2
111
+ uses : actions/download-artifact@v4
112
112
with :
113
113
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
114
114
- name : Add conda to system path
@@ -135,7 +135,7 @@ jobs:
135
135
run : |
136
136
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
137
137
- name : Cache conda packages
138
- uses : actions/cache@v2
138
+ uses : actions/cache@v4
139
139
env :
140
140
CACHE_NUMBER : 0 # Increase to reset cache
141
141
with :
@@ -151,34 +151,34 @@ jobs:
151
151
. $CONDA/etc/profile.d/conda.sh
152
152
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
153
153
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
154
- conda create -n test_mkl_random $PACKAGE_NAME=${PACKAGE_VERSION} nose python=${{ matrix.python }} $CHANNELS
154
+ conda create -n test_mkl_random $PACKAGE_NAME=${PACKAGE_VERSION} pytest python=${{ matrix.python }} $CHANNELS
155
155
# Test installed packages
156
156
conda list
157
157
- name : Run tests
158
158
run : |
159
159
. $CONDA/etc/profile.d/conda.sh
160
160
conda activate test_mkl_random
161
- nosetests -v mkl_random
161
+ pytest -vv --pyargs mkl_random
162
162
163
163
test_windows :
164
164
needs : build_windows
165
165
runs-on : ${{ matrix.runner }}
166
166
167
167
strategy :
168
168
matrix :
169
- python : ['3.9']
169
+ python : ['3.9', '3.10', '3.11', '3.12' ]
170
170
experimental : [false]
171
171
runner : [windows-latest]
172
172
continue-on-error : ${{ matrix.experimental }}
173
173
env :
174
- CHANNELS : -c intel -c defaults --override-channels
174
+ CHANNELS : -c conda-forge -c intel --override-channels
175
175
176
176
steps :
177
177
- name : Download artifact
178
- uses : actions/download-artifact@v2
178
+ uses : actions/download-artifact@v4
179
179
with :
180
180
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
181
- - uses : conda-incubator/setup-miniconda@v2
181
+ - uses : conda-incubator/setup-miniconda@v3
182
182
with :
183
183
auto-activate-base : true
184
184
activate-environment : " "
@@ -205,7 +205,7 @@ jobs:
205
205
conda create -n test_mkl_random ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
206
206
more lockfile
207
207
- name : Cache conda packages
208
- uses : actions/cache@v3
208
+ uses : actions/cache@v4
209
209
env :
210
210
CACHE_NUMBER : 3 # Increase to reset cache
211
211
with :
@@ -224,10 +224,10 @@ jobs:
224
224
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
225
225
SET PACKAGE_VERSION=%%F
226
226
)
227
- conda create -n test_mkl_random ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% nose python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }}
227
+ conda create -n test_mkl_random ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }}
228
228
# Test installed packages
229
229
conda list
230
230
- name : Run tests
231
231
run : |
232
232
conda activate -n test_mkl_random
233
- nosetests -v ${{ env.MODULE_NAME }}
233
+ pytest -v --pyargs ${{ env.MODULE_NAME }}
0 commit comments