diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 0eefa64..8d20236 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -51,7 +51,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} - path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2 + path: $CONDA/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2 test: needs: build @@ -128,11 +128,13 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: conda-incubator/setup-miniconda@v2 + + - uses: conda-incubator/setup-miniconda@v3 with: - auto-activate-base: true - conda-build-version: "*" - activate-environment: true + miniforge-variant: Miniforge3 + miniforge-version: latest + activate-environment: build + channels: conda-forge python-version: ${{ matrix.python }} - name: Cache conda packages @@ -146,8 +148,23 @@ jobs: restore-keys: | ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + + - name: Store conda paths as envs + shell: bash -l {0} + run: | + echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> $GITHUB_ENV + + - name: Install conda build + run: | + conda activate + conda install -y conda-build + conda list -n base + - name: Build conda package - run: conda build --no-test --python ${{ matrix.python }} -c conda-forge -c https://software.repos.intel.com/python/conda --override-channels conda-recipe-cf + run: | + conda activate + conda build --no-test --python ${{ matrix.python }} -c conda-forge -c https://software.repos.intel.com/python/conda --override-channels conda-recipe-cf + - name: Upload artifact uses: actions/upload-artifact@v3 with: @@ -175,13 +192,14 @@ jobs: uses: actions/download-artifact@v3 with: name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true - conda-build-version: '*' - miniconda-version: 'latest' - activate-environment: mkl_umath_test + miniforge-variant: Miniforge3 + miniforge-version: latest + activate-environment: build + channels: conda-forge python-version: ${{ matrix.python }} + - name: Create conda channel with the artifact bit shell: cmd /C CALL {0} run: | @@ -189,13 +207,17 @@ jobs: mkdir ${{ env.workdir }}\channel\win-64 move ${{ env.PACKAGE_NAME }}-*.tar.bz2 ${{ env.workdir }}\channel\win-64 dir ${{ env.workdir }}\channel\win-64 + - name: Index the channel shell: cmd /C CALL {0} - run: conda index ${{ env.workdir }}\channel + run: | + conda activate + conda index ${{ env.workdir }}\channel - name: Dump mkl_umath version info from created channel into ver.json shell: cmd /C CALL {0} run: | + conda activate conda search ${{ env.PACKAGE_NAME }} -c ${{ env.workdir }}/channel --override-channels --info --json > ${{ env.workdir }}\ver.json - name: Output content of produced ver.json shell: pwsh @@ -210,6 +232,7 @@ jobs: FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO ( SET PACKAGE_VERSION=%%F ) + conda activate 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 - name: Display lockfile content shell: pwsh @@ -241,6 +264,7 @@ jobs: - name: Report content of test environment shell: cmd /C CALL {0} run: | + conda activate echo "Value of CONDA enviroment variable was: " %CONDA% echo "Value of CONDA_PREFIX enviroment variable was: " %CONDA_PREFIX% conda info && conda list -n mkl_umath_test