From c81128304e46b0777606932d067bcf28f199ce8e Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Tue, 20 Oct 2026 17:26:35 +0200 Subject: [PATCH 1/2] ci: align conda-forge workflow with the feedstock build Make conda-package-cf.yml build and test the recipe the way conda-forge/mkl_fft-feedstock does, so issues show up here before a feedstock PR: - Pin numpy to '2' in conda_build_config.yaml, like conda-forge pinning, so each Python builds against the newest NumPy 2.x instead of hard-coded 2.2/2.3/2.5 rows. The --numpy CLI flag is dropped because conda-build turns "2" into an invalid "2." spec. - Rely on numpy run_exports instead of a bare numpy run requirement, as the feedstock recipe does since 2.4.0. - Stop passing --no-test, so the recipe test section (pip check, imports, pytest) runs as in the feedstock. - Use gcc 15 and sysroot 2.17 on Linux, as conda-forge pinning does, and drop the unused cxx_compiler entries. - Build on windows-2022 to get Visual Studio 2022, as the feedstock does, instead of windows-latest which now ships Visual Studio 2026. - Drop Python 3.10, which conda-forge no longer builds. - Point the Windows cache steps at ~/conda_pkgs_dir, the package directory setup-miniconda configures; /home/runner/conda_pkgs_dir does not exist on Windows, so nothing was cached. --- .github/workflows/conda-package-cf.yml | 32 ++++++------------------- conda-recipe-cf/conda_build_config.yaml | 12 ++++------ conda-recipe-cf/meta.yaml | 2 -- 3 files changed, 12 insertions(+), 34 deletions(-) diff --git a/.github/workflows/conda-package-cf.yml b/.github/workflows/conda-package-cf.yml index cfc9582c..5d436a78 100644 --- a/.github/workflows/conda-package-cf.yml +++ b/.github/workflows/conda-package-cf.yml @@ -22,24 +22,16 @@ jobs: strategy: matrix: include: - - python: "3.10" - numpy: "2.2" - python: "3.11" - numpy: "2.3" - python: "3.12" - numpy: "2.3" - python: "3.13" - numpy: "2.3" - python: "3.14" - numpy: "2.3" python_spec: "3.14.* *_cp314" python_tag: "3.14" - python: "3.14" - numpy: "2.3" python_spec: "3.14.* *_cp314t" python_tag: "3.14t" - python: "3.15" - numpy: "2.5" python_spec: "3.15.* *_cp315" python_tag: "3.15" @@ -79,11 +71,9 @@ jobs: - name: Build conda package with NumPy 2.x run: | CHANNELS=(-c conda-forge --override-channels) - VERSIONS=(--python "${{ matrix.python_spec || matrix.python }}" --numpy "${{ matrix.numpy }}") - TEST=(--no-test) + VERSIONS=(--python "${{ matrix.python_spec || matrix.python }}") conda build \ - "${TEST[@]}" \ "${VERSIONS[@]}" \ "${CHANNELS[@]}" \ conda-recipe-cf @@ -100,7 +90,7 @@ jobs: strategy: matrix: - python: ["3.10", "3.11", "3.12", "3.13"] + python: ["3.11", "3.12", "3.13"] numpy: ['numpy">=2"'] experimental: [false] runner: [ubuntu-latest] @@ -185,31 +175,23 @@ jobs: pytest -v --pyargs "$MODULE_NAME" build_windows: - runs-on: windows-latest + runs-on: windows-2022 defaults: run: shell: cmd /C CALL {0} strategy: matrix: include: - - python: "3.10" - numpy: "2.2" - python: "3.11" - numpy: "2.3" - python: "3.12" - numpy: "2.3" - python: "3.13" - numpy: "2.3" - python: "3.14" - numpy: "2.3" python_spec: "3.14.* *_cp314" python_tag: "3.14" - python: "3.14" - numpy: "2.3" python_spec: "3.14.* *_cp314t" python_tag: "3.14t" - python: "3.15" - numpy: "2.5" python_spec: "3.15.* *_cp315" python_tag: "3.15" @@ -241,7 +223,7 @@ jobs: env: CACHE_NUMBER: 3 # Increase to reset cache with: - path: /home/runner/conda_pkgs_dir + path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('**/meta.yaml') }} restore-keys: | @@ -250,7 +232,7 @@ jobs: - name: Build conda package with NumPy 2.x run: | - conda build --no-test --python "${{ matrix.python_spec || matrix.python }}" --numpy ${{ matrix.numpy }} -c conda-forge --override-channels conda-recipe-cf + conda build --python "${{ matrix.python_spec || matrix.python }}" -c conda-forge --override-channels conda-recipe-cf - name: Store conda paths as envs shell: bash -l {0} @@ -272,7 +254,7 @@ jobs: strategy: matrix: - python: ["3.10", "3.11", "3.12", "3.13"] + python: ["3.11", "3.12", "3.13"] numpy: ['numpy">=2"'] experimental: [false] runner: [windows-latest] @@ -361,7 +343,7 @@ jobs: env: CACHE_NUMBER: 0 # Increase to reset cache with: - path: /home/runner/conda_pkgs_dir + path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('lockfile') }} restore-keys: | diff --git a/conda-recipe-cf/conda_build_config.yaml b/conda-recipe-cf/conda_build_config.yaml index 822fd77b..abc329d9 100644 --- a/conda-recipe-cf/conda_build_config.yaml +++ b/conda-recipe-cf/conda_build_config.yaml @@ -1,16 +1,14 @@ c_compiler: # [linux] - gcc # [linux] -cxx_compiler: # [linux] - - gxx # [linux] -cxx_compiler_version: # [linux] - - '14' # [linux] +c_compiler_version: # [linux] + - '15' # [linux] c_stdlib: # [linux] - sysroot # [linux] c_stdlib_version: # [linux] - - '2.28' # [linux] + - '2.17' # [linux] c_stdlib: # [win] - vs # [win] -cxx_compiler: # [win] - - vs2022 # [win] c_compiler: # [win] - vs2022 # [win] +numpy: + - '2' diff --git a/conda-recipe-cf/meta.yaml b/conda-recipe-cf/meta.yaml index 47382240..956a0946 100644 --- a/conda-recipe-cf/meta.yaml +++ b/conda-recipe-cf/meta.yaml @@ -9,7 +9,6 @@ build: number: {{ GIT_DESCRIBE_NUMBER }} ignore_run_exports: - blas - - numpy requirements: build: @@ -28,7 +27,6 @@ requirements: run: - python - {{ pin_compatible('mkl') }} - - numpy test: commands: From 3238855ad0da90145ed4fc0cf0be98b8fb455674 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Tue, 20 Oct 2026 17:26:55 +0200 Subject: [PATCH 2/2] ci: fix Windows conda cache path and separate cf cache keys - Point the Windows cache steps in conda-package.yml at ~/conda_pkgs_dir, the package directory setup-miniconda configures. /home/runner/conda_pkgs_dir does not exist on Windows, so the build and test caches were never saved or restored. - Add a "cf" segment to the cache keys and restore-keys in conda-package-cf.yml. Both workflows used the same "-conda--python--" keys with the same path, so their build jobs hit each other's caches by exact key and neither saved its own packages, and restore-keys prefixes matched across workflows too. The fixed Windows paths would have collided the same way. --- .github/workflows/conda-package-cf.yml | 24 ++++++++++++------------ .github/workflows/conda-package.yml | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/conda-package-cf.yml b/.github/workflows/conda-package-cf.yml index 5d436a78..db704d26 100644 --- a/.github/workflows/conda-package-cf.yml +++ b/.github/workflows/conda-package-cf.yml @@ -57,10 +57,10 @@ jobs: with: path: ~/.conda/pkgs key: - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('**/meta.yaml') }} + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('**/meta.yaml') }} restore-keys: | - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}- - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}- - name: Add conda to system path run: echo "$CONDA"/bin >> "$GITHUB_PATH" @@ -156,10 +156,10 @@ jobs: with: path: ~/.conda/pkgs key: - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('lockfile') }} + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('lockfile') }} restore-keys: | - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}- - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}- - name: Install mkl_fft run: | @@ -225,10 +225,10 @@ jobs: with: path: ~/conda_pkgs_dir key: - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('**/meta.yaml') }} + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('**/meta.yaml') }} restore-keys: | - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}- - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}- - name: Build conda package with NumPy 2.x run: | @@ -345,10 +345,10 @@ jobs: with: path: ~/conda_pkgs_dir key: - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('lockfile') }} + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('lockfile') }} restore-keys: | - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}- - ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}- + ${{ runner.os }}-conda-cf-${{ env.CACHE_NUMBER }}- - name: Install mkl_fft shell: cmd /C CALL {0} diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index d6e129ea..e13a4898 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -281,7 +281,7 @@ jobs: env: CACHE_NUMBER: 3 # Increase to reset cache with: - path: /home/runner/conda_pkgs_dir + path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('**/meta.yaml') }} restore-keys: | @@ -425,7 +425,7 @@ jobs: env: CACHE_NUMBER: 0 # Increase to reset cache with: - path: /home/runner/conda_pkgs_dir + path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python_tag || matrix.python }}-${{hashFiles('lockfile') }} restore-keys: |