From db53bf666b62ba5e91a93255e1b2b7b2f0910c11 Mon Sep 17 00:00:00 2001 From: Vahid Tavanashad Date: Tue, 20 May 2025 17:28:20 -0700 Subject: [PATCH] add specific version --- .github/workflows/conda-package.yml | 18 +++++++++++++----- conda-recipe/meta.yaml | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index f3bc08d2..895cf6f8 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -55,7 +55,7 @@ jobs: - name: Build conda package run: | - CHANNELS="-c conda-forge -c https://software.repos.intel.com/python/conda --override-channels" + CHANNELS="-c https://software.repos.intel.com/python/conda -c conda-forge --override-channels" VERSIONS="--python ${{ matrix.python }}" TEST="--no-test" @@ -101,8 +101,17 @@ jobs: mkdir -p $GITHUB_WORKSPACE/channel/linux-64 mv ${PACKAGE_NAME}-*.conda $GITHUB_WORKSPACE/channel/linux-64 conda index $GITHUB_WORKSPACE/channel - # Test channel - conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels + + - name: Test conda channel + run: | + conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels --info --json > $GITHUB_WORKSPACE/ver.json + cat $GITHUB_WORKSPACE/ver.json + + - name: Get package version + run: | + export PACKAGE_VERSION=$(python -c "${{ env.VER_SCRIPT1 }} ${{ env.VER_SCRIPT2 }}") + echo PACKAGE_VERSION=${PACKAGE_VERSION} + echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV - name: Collect dependencies run: | @@ -131,8 +140,7 @@ jobs: - name: Install mkl_fft run: | CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}" - conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python }} "scipy>=1.10" $CHANNELS - conda install -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME pytest $CHANNELS + conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${{ env.PACKAGE_VERSION }} python=${{ matrix.python }} pytest "scipy>=1.10" $CHANNELS # Test installed packages conda list -n ${{ env.TEST_ENV_NAME }} diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 75f227a2..ea540910 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -20,6 +20,7 @@ requirements: - python - setuptools >=77 - mkl-devel + - mkl-devel 2024.2.* # [py==39 or py==310] - cython - numpy-base run: