Backport 2.7.2 changelog #169
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Conda package using conda-forge | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| permissions: read-all | |
| env: | |
| PACKAGE_NAME: mkl-service | |
| MODULE_NAME: mkl | |
| TEST_ENV_NAME: test_mkl_service | |
| VER_SCRIPT1: "import json; f = open('ver.json', 'r'); j = json.load(f); f.close(); " | |
| VER_SCRIPT2: "d = j['mkl-service'][0]; print('='.join((d[s] for s in ('version', 'build'))))" | |
| jobs: | |
| build_linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Cancel Previous Runs | |
| uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 | |
| with: | |
| access_token: ${{ github.token }} | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set pkgs_dirs | |
| run: | | |
| echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc | |
| - name: Cache conda packages | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| env: | |
| CACHE_NUMBER: 0 # Increase to reset cache | |
| with: | |
| path: ~/.conda/pkgs | |
| key: | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- | |
| - name: Add conda to system path | |
| run: echo "$CONDA/bin" >> "$GITHUB_PATH" | |
| - name: Install conda-build | |
| run: conda install conda-build | |
| - name: Store conda paths as envs | |
| shell: bash -el {0} | |
| run: | | |
| echo "CONDA_BLD=/usr/share/miniconda/conda-bld/linux-64/" >> "$GITHUB_ENV" | |
| echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE/" >> "$GITHUB_ENV" | |
| - name: Build conda package | |
| run: | | |
| CHANNELS=(-c conda-forge -c conda-forge/label/python_rc --override-channels) | |
| VERSIONS=(--python "${{ matrix.python }}") | |
| TEST=(--no-test) | |
| conda build \ | |
| "${TEST[@]}" \ | |
| "${VERSIONS[@]}" \ | |
| "${CHANNELS[@]}" \ | |
| conda-recipe-cf | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | |
| path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda | |
| - name: Upload wheels artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }} | |
| path: ${{ env.WHEELS_OUTPUT_FOLDER }}mkl_service-*.whl | |
| build_windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Cancel Previous Runs | |
| uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 | |
| with: | |
| access_token: ${{ github.token }} | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 | |
| with: | |
| miniforge-version: latest | |
| activate-environment: build | |
| channels: conda-forge | |
| python-version: ${{ matrix.python }} | |
| - name: Update conda | |
| run: | | |
| conda update -n base --all | |
| - name: Install conda build | |
| run: | | |
| conda install -n base -y conda-build | |
| - name: Cache conda packages | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| env: | |
| CACHE_NUMBER: 3 # Increase to reset cache | |
| with: | |
| path: /home/runner/conda_pkgs_dir | |
| key: | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }} | |
| 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 -el {0} | |
| run: | | |
| echo "CONDA_BLD=$CONDA\\conda-bld\\win-64\\" >> "$GITHUB_ENV" | |
| echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE\\" >> "$GITHUB_ENV" | |
| - name: Show Conda info | |
| run: | | |
| conda info --all | |
| - name: List base environment packages | |
| run: | | |
| conda list -n base | |
| - name: Build conda package | |
| run: conda build --no-test --python ${{ matrix.python }} -c conda-forge -c conda-forge/label/python_rc --override-channels conda-recipe-cf | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | |
| path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda | |
| - name: Upload wheels artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }} | |
| path: ${{ env.WHEELS_OUTPUT_FOLDER }}mkl_service-*.whl | |
| test_linux: | |
| needs: build_linux | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| python: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| experimental: [false] | |
| runner: [ubuntu-latest] | |
| continue-on-error: ${{ matrix.experimental }} | |
| env: | |
| CHANNELS: -c conda-forge -c conda-forge/label/python_rc --override-channels | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | |
| - name: Add conda to system path | |
| run: echo "$CONDA/bin" >> "$GITHUB_PATH" | |
| - name: Install conda-build | |
| run: conda install conda-build | |
| - name: Create conda channel | |
| run: | | |
| mkdir -p "$GITHUB_WORKSPACE/channel/linux-64" | |
| conda index "$GITHUB_WORKSPACE/channel" || exit 1 | |
| mv "${PACKAGE_NAME}"-*.conda "$GITHUB_WORKSPACE/channel/linux-64" || exit 1 | |
| conda index "$GITHUB_WORKSPACE/channel" || exit 1 | |
| # Test channel | |
| conda search "$PACKAGE_NAME" -c "$GITHUB_WORKSPACE/channel" --override-channels --info --json > "$GITHUB_WORKSPACE/ver.json" | |
| cat ver.json | |
| - name: Collect dependencies | |
| run: | | |
| . "$CONDA/etc/profile.d/conda.sh" | |
| CHANNELS=(-c "$GITHUB_WORKSPACE/channel" -c conda-forge -c conda-forge/label/python_rc --override-channels) | |
| PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")" | |
| export PACKAGE_VERSION | |
| conda create -n "${{ env.TEST_ENV_NAME }}" "$PACKAGE_NAME=$PACKAGE_VERSION" "python=${{ matrix.python }}" "${CHANNELS[@]}" --only-deps --dry-run > lockfile | |
| cat lockfile | |
| - name: Set pkgs_dirs | |
| run: | | |
| echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc | |
| - name: Cache conda packages | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| env: | |
| CACHE_NUMBER: 0 # Increase to reset cache | |
| with: | |
| path: ~/.conda/pkgs | |
| key: | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }} | |
| restore-keys: | | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- | |
| - name: Install mkl-service | |
| run: | | |
| . "$CONDA/etc/profile.d/conda.sh" | |
| CHANNELS=(-c "$GITHUB_WORKSPACE/channel" -c conda-forge -c conda-forge/label/python_rc --override-channels) | |
| PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")" | |
| export PACKAGE_VERSION | |
| conda create -n "${{ env.TEST_ENV_NAME }}" "$PACKAGE_NAME=$PACKAGE_VERSION" pytest "python=${{ matrix.python }}" "${CHANNELS[@]}" | |
| # Test installed packages | |
| conda list | |
| - name: Run tests | |
| run: | | |
| . "$CONDA/etc/profile.d/conda.sh" | |
| conda activate ${{ env.TEST_ENV_NAME }} | |
| pytest -vv --pyargs ${{ env.MODULE_NAME }} | |
| test_windows: | |
| needs: build_windows | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| python: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| experimental: [false] | |
| runner: [windows-latest] | |
| continue-on-error: ${{ matrix.experimental }} | |
| env: | |
| CHANNELS: -c conda-forge -c conda-forge/label/python_rc --override-channels | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | |
| - uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 | |
| with: | |
| miniforge-version: latest | |
| channels: conda-forge | |
| activate-environment: ${{ env.TEST_ENV_NAME }} | |
| python-version: ${{ matrix.python }} | |
| - name: Install conda-index | |
| run: conda install conda-index | |
| - name: Create conda channel | |
| run: | | |
| mkdir ${{ env.GITHUB_WORKSPACE }}/channel/win-64 | |
| move ${{ env.PACKAGE_NAME }}-*.conda ${{ env.GITHUB_WORKSPACE }}/channel/win-64 | |
| python -m conda_index ${{ env.GITHUB_WORKSPACE }}/channel | |
| # Test channel | |
| conda search ${{ env.PACKAGE_NAME }} -c ${{ env.GITHUB_WORKSPACE }}/channel --override-channels --info --json > ${{ env.GITHUB_WORKSPACE }}/ver.json | |
| more ${{ env.GITHUB_WORKSPACE }}/ver.json | |
| - name: Collect dependencies | |
| shell: cmd | |
| run: | | |
| @ECHO ON | |
| copy /Y ${{ env.GITHUB_WORKSPACE }}\ver.json . | |
| set "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%" | |
| FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO ( | |
| SET PACKAGE_VERSION=%%F | |
| ) | |
| conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile | |
| more lockfile | |
| - name: Cache conda packages | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| env: | |
| CACHE_NUMBER: 3 # Increase to reset cache | |
| with: | |
| path: /home/runner/conda_pkgs_dir | |
| key: | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }} | |
| restore-keys: | | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- | |
| - name: Install mkl-service | |
| shell: cmd | |
| run: | | |
| @ECHO ON | |
| copy /Y ${{ env.GITHUB_WORKSPACE }}\ver.json . | |
| set "SCRIPT=%VER_SCRIPT1% %VER_SCRIPT2%" | |
| FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO ( | |
| SET PACKAGE_VERSION=%%F | |
| ) | |
| conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} | |
| # Test installed packages | |
| conda list | |
| - name: Run tests | |
| run: | | |
| conda activate ${{ env.TEST_ENV_NAME }} | |
| pytest -v --pyargs ${{ env.MODULE_NAME }} | |
| build_osx: | |
| runs-on: macos-26-intel | |
| strategy: | |
| matrix: | |
| python: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Cancel Previous Runs | |
| uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 | |
| with: | |
| access_token: ${{ github.token }} | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 | |
| with: | |
| miniforge-version: latest | |
| activate-environment: build | |
| channels: conda-forge | |
| python-version: ${{ matrix.python }} | |
| - name: Cache conda packages | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| env: | |
| CACHE_NUMBER: 0 # Increase to reset cache | |
| with: | |
| path: /Users/runner/conda_pkgs_dir | |
| key: | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- | |
| - name: Install conda-build | |
| shell: bash -el {0} | |
| run: | | |
| conda install -n base -y conda-build | |
| conda list -n base | |
| - name: Store conda paths as envs | |
| shell: bash -el {0} | |
| run: | | |
| echo "CONDA_BLD=$CONDA/conda-bld/osx-64/" >> "$GITHUB_ENV" | |
| echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE/" >> "$GITHUB_ENV" | |
| - name: Build conda package | |
| shell: bash -el {0} | |
| run: | | |
| CHANNELS=(-c conda-forge -c conda-forge/label/python_rc --override-channels) | |
| VERSIONS=(--python "${{ matrix.python }}") | |
| TEST=(--no-test) | |
| conda build \ | |
| "${TEST[@]}" \ | |
| "${VERSIONS[@]}" \ | |
| "${CHANNELS[@]}" \ | |
| conda-recipe-cf | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | |
| path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda | |
| - name: Upload wheels artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }} | |
| path: ${{ env.WHEELS_OUTPUT_FOLDER }}mkl_service-*.whl | |
| test_osx: | |
| needs: build_osx | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| python: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| experimental: [false] | |
| runner: [macos-26-intel] | |
| continue-on-error: ${{ matrix.experimental }} | |
| env: | |
| CHANNELS: -c conda-forge -c conda-forge/label/python_rc --override-channels | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} | |
| - uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1 | |
| with: | |
| miniforge-version: latest | |
| channels: conda-forge | |
| activate-environment: base | |
| - name: Install conda-index | |
| shell: bash -el {0} | |
| run: conda install -n base -y conda-index | |
| - name: Create conda channel | |
| shell: bash -el {0} | |
| run: | | |
| mkdir -p "$GITHUB_WORKSPACE/channel/osx-64" | |
| conda index "$GITHUB_WORKSPACE/channel" || exit 1 | |
| mv "${PACKAGE_NAME}"-*.conda "$GITHUB_WORKSPACE/channel/osx-64" || exit 1 | |
| conda index "$GITHUB_WORKSPACE/channel" || exit 1 | |
| # Test channel | |
| conda search "$PACKAGE_NAME" -c "$GITHUB_WORKSPACE/channel" --override-channels --info --json > "$GITHUB_WORKSPACE/ver.json" | |
| cat ver.json | |
| - name: Collect dependencies | |
| shell: bash -el {0} | |
| run: | | |
| CHANNELS=(-c "$GITHUB_WORKSPACE/channel" -c conda-forge -c conda-forge/label/python_rc --override-channels) | |
| PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")" | |
| export PACKAGE_VERSION | |
| conda create -n "${{ env.TEST_ENV_NAME }}" "$PACKAGE_NAME=$PACKAGE_VERSION" "python=${{ matrix.python }}" "${CHANNELS[@]}" --only-deps --dry-run > lockfile | |
| cat lockfile | |
| - name: Cache conda packages | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| env: | |
| CACHE_NUMBER: 0 # Increase to reset cache | |
| with: | |
| path: /Users/runner/conda_pkgs_dir | |
| key: | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }} | |
| restore-keys: | | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}- | |
| ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- | |
| - name: Install mkl-service | |
| shell: bash -el {0} | |
| run: | | |
| CHANNELS=(-c "$GITHUB_WORKSPACE/channel" -c conda-forge -c conda-forge/label/python_rc --override-channels) | |
| PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")" | |
| export PACKAGE_VERSION | |
| conda create -n "${{ env.TEST_ENV_NAME }}" "$PACKAGE_NAME=$PACKAGE_VERSION" pytest "python=${{ matrix.python }}" "${CHANNELS[@]}" | |
| # Test installed packages | |
| conda list -n "${{ env.TEST_ENV_NAME }}" | |
| - name: Run tests | |
| shell: bash -el {0} | |
| run: | | |
| conda activate ${{ env.TEST_ENV_NAME }} | |
| pytest -vv --pyargs ${{ env.MODULE_NAME }} |