20
20
- name : Set pkgs_dirs
21
21
run : |
22
22
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
23
+
23
24
- name : Cache conda packages
24
25
uses : actions/cache@v3
25
26
env :
@@ -34,24 +35,28 @@ jobs:
34
35
35
36
- name : Add conda to system path
36
37
run : echo $CONDA/bin >> $GITHUB_PATH
38
+
37
39
- name : Install conda-build
38
40
run : conda install conda-build
41
+
39
42
- name : Build conda package
40
43
run : |
41
44
CHANNELS="-c conda-forge -c https://software.repos.intel.com/python/conda --override-channels"
42
45
VERSIONS="--python ${{ matrix.python }}"
43
46
TEST="--no-test"
47
+ echo "CONDA_BLD=${CONDA}/conda-bld/linux-64" >> $GITHUB_ENV
44
48
45
49
conda build \
46
50
$TEST \
47
51
$VERSIONS \
48
52
$CHANNELS \
49
53
conda-recipe-cf
54
+
50
55
- name : Upload artifact
51
56
uses : actions/upload-artifact@v3
52
57
with :
53
58
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
54
- path : /usr/share/miniconda/conda-bld/linux-64 /${{ env.PACKAGE_NAME }}-*.tar.bz2
59
+ path : ${{ env.CONDA_BLD }} /${{ env.PACKAGE_NAME }}-*.tar.bz2
55
60
56
61
test :
57
62
needs : build
89
94
conda create -n test_mkl_umath $PACKAGE_NAME python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
90
95
- name : Display lockfile
91
96
run : cat lockfile
97
+
92
98
- name : Set pkgs_dirs
93
99
run : |
94
100
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
101
+
95
102
- name : Cache conda packages
96
103
uses : actions/cache@v3
97
104
env :
@@ -110,6 +117,7 @@ jobs:
110
117
conda create -n test_mkl_umath python=${{ matrix.python }} $PACKAGE_NAME pytest $CHANNELS
111
118
# Test installed packages
112
119
conda list -n test_mkl_umath
120
+
113
121
- name : Run tests
114
122
run : |
115
123
source $CONDA/etc/profile.d/conda.sh
@@ -128,11 +136,13 @@ jobs:
128
136
- uses : actions/checkout@v3
129
137
with :
130
138
fetch-depth : 0
131
- - uses : conda-incubator/setup-miniconda@v2
139
+
140
+ - uses : conda-incubator/setup-miniconda@v3
132
141
with :
133
- auto-activate-base : true
134
- conda-build-version : " *"
135
- activate-environment : true
142
+ miniforge-variant : Miniforge3
143
+ miniforge-version : latest
144
+ activate-environment : build
145
+ channels : conda-forge
136
146
python-version : ${{ matrix.python }}
137
147
138
148
- name : Cache conda packages
@@ -146,8 +156,23 @@ jobs:
146
156
restore-keys : |
147
157
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
148
158
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
159
+
160
+ - name : Store conda paths as envs
161
+ shell : bash -l {0}
162
+ run : |
163
+ echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> $GITHUB_ENV
164
+
165
+ - name : Install conda build
166
+ run : |
167
+ conda activate
168
+ conda install -y conda-build
169
+ conda list -n base
170
+
149
171
- name : Build conda package
150
- run : conda build --no-test --python ${{ matrix.python }} -c conda-forge -c https://software.repos.intel.com/python/conda --override-channels conda-recipe-cf
172
+ run : |
173
+ conda activate
174
+ conda build --no-test --python ${{ matrix.python }} -c conda-forge -c https://software.repos.intel.com/python/conda --override-channels conda-recipe-cf
175
+
151
176
- name : Upload artifact
152
177
uses : actions/upload-artifact@v3
153
178
with :
@@ -175,27 +200,32 @@ jobs:
175
200
uses : actions/download-artifact@v3
176
201
with :
177
202
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
178
- - uses : conda-incubator/setup-miniconda@v2
203
+ - uses : conda-incubator/setup-miniconda@v3
179
204
with :
180
- auto-update-conda : true
181
- conda-build- version : ' * '
182
- miniconda-version : ' latest '
183
- activate-environment : mkl_umath_test
205
+ miniforge-variant : Miniforge3
206
+ miniforge- version : latest
207
+ activate-environment : build
208
+ channels : conda-forge
184
209
python-version : ${{ matrix.python }}
210
+
185
211
- name : Create conda channel with the artifact bit
186
212
shell : cmd /C CALL {0}
187
213
run : |
188
214
echo ${{ env.workdir }}
189
215
mkdir ${{ env.workdir }}\channel\win-64
190
216
move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64
191
217
dir ${{ env.workdir }}\channel\win-64
218
+
192
219
- name : Index the channel
193
220
shell : cmd /C CALL {0}
194
- run : conda index ${{ env.workdir }}\channel
221
+ run : |
222
+ conda activate
223
+ conda index ${{ env.workdir }}\channel
195
224
196
225
- name : Dump mkl_umath version info from created channel into ver.json
197
226
shell : cmd /C CALL {0}
198
227
run : |
228
+ conda activate
199
229
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
200
230
- name : Output content of produced ver.json
201
231
shell : pwsh
@@ -210,6 +240,7 @@ jobs:
210
240
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
211
241
SET PACKAGE_VERSION=%%F
212
242
)
243
+ conda activate
213
244
conda install -n mkl_umath_test ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
214
245
- name : Display lockfile content
215
246
shell : pwsh
@@ -241,6 +272,7 @@ jobs:
241
272
- name : Report content of test environment
242
273
shell : cmd /C CALL {0}
243
274
run : |
275
+ conda activate
244
276
echo "Value of CONDA enviroment variable was: " %CONDA%
245
277
echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX%
246
278
conda info && conda list -n mkl_umath_test
0 commit comments