2020 - name : Set pkgs_dirs
2121 run : |
2222 echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
23+
2324 - name : Cache conda packages
2425 uses : actions/cache@v3
2526 env :
@@ -34,24 +35,28 @@ jobs:
3435
3536 - name : Add conda to system path
3637 run : echo $CONDA/bin >> $GITHUB_PATH
38+
3739 - name : Install conda-build
3840 run : conda install conda-build
41+
3942 - name : Build conda package
4043 run : |
4144 CHANNELS="-c conda-forge -c https://software.repos.intel.com/python/conda --override-channels"
4245 VERSIONS="--python ${{ matrix.python }}"
4346 TEST="--no-test"
47+ echo "CONDA_BLD=${CONDA}/conda-bld/linux-64" >> $GITHUB_ENV
4448
4549 conda build \
4650 $TEST \
4751 $VERSIONS \
4852 $CHANNELS \
4953 conda-recipe-cf
54+
5055 - name : Upload artifact
5156 uses : actions/upload-artifact@v3
5257 with :
5358 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
5560
5661 test :
5762 needs : build
8994 conda create -n test_mkl_umath $PACKAGE_NAME python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
9095 - name : Display lockfile
9196 run : cat lockfile
97+
9298 - name : Set pkgs_dirs
9399 run : |
94100 echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
101+
95102 - name : Cache conda packages
96103 uses : actions/cache@v3
97104 env :
@@ -110,6 +117,7 @@ jobs:
110117 conda create -n test_mkl_umath python=${{ matrix.python }} $PACKAGE_NAME pytest $CHANNELS
111118 # Test installed packages
112119 conda list -n test_mkl_umath
120+
113121 - name : Run tests
114122 run : |
115123 source $CONDA/etc/profile.d/conda.sh
@@ -128,11 +136,13 @@ jobs:
128136 - uses : actions/checkout@v3
129137 with :
130138 fetch-depth : 0
131- - uses : conda-incubator/setup-miniconda@v2
139+
140+ - uses : conda-incubator/setup-miniconda@v3
132141 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
136146 python-version : ${{ matrix.python }}
137147
138148 - name : Cache conda packages
@@ -146,8 +156,23 @@ jobs:
146156 restore-keys : |
147157 ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
148158 ${{ 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+
149171 - 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+
151176 - name : Upload artifact
152177 uses : actions/upload-artifact@v3
153178 with :
@@ -175,27 +200,32 @@ jobs:
175200 uses : actions/download-artifact@v3
176201 with :
177202 name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
178- - uses : conda-incubator/setup-miniconda@v2
203+ - uses : conda-incubator/setup-miniconda@v3
179204 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
184209 python-version : ${{ matrix.python }}
210+
185211 - name : Create conda channel with the artifact bit
186212 shell : cmd /C CALL {0}
187213 run : |
188214 echo ${{ env.workdir }}
189215 mkdir ${{ env.workdir }}\channel\win-64
190216 move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64
191217 dir ${{ env.workdir }}\channel\win-64
218+
192219 - name : Index the channel
193220 shell : cmd /C CALL {0}
194- run : conda index ${{ env.workdir }}\channel
221+ run : |
222+ conda activate
223+ conda index ${{ env.workdir }}\channel
195224
196225 - name : Dump mkl_umath version info from created channel into ver.json
197226 shell : cmd /C CALL {0}
198227 run : |
228+ conda activate
199229 conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json
200230 - name : Output content of produced ver.json
201231 shell : pwsh
@@ -210,6 +240,7 @@ jobs:
210240 FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
211241 SET PACKAGE_VERSION=%%F
212242 )
243+ conda activate
213244 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
214245 - name : Display lockfile content
215246 shell : pwsh
@@ -241,6 +272,7 @@ jobs:
241272 - name : Report content of test environment
242273 shell : cmd /C CALL {0}
243274 run : |
275+ conda activate
244276 echo "Value of CONDA enviroment variable was: " %CONDA%
245277 echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX%
246278 conda info && conda list -n mkl_umath_test
0 commit comments