Skip to content

Commit de3d4b5

Browse files
committed
pick numpy versions for testing in conda-package
1 parent 48b0d13 commit de3d4b5

1 file changed

Lines changed: 30 additions & 8 deletions

File tree

.github/workflows/conda-package.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,17 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
25+
include:
26+
- python: "3.10"
27+
numpy: "2.2"
28+
- python: "3.11"
29+
numpy: "2.3"
30+
- python: "3.12"
31+
numpy: "2.3"
32+
- python: "3.13"
33+
numpy: "2.3"
34+
- python: "3.14"
35+
numpy: "2.3"
2636
steps:
2737
- name: Cancel Previous Runs
2838
uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
@@ -70,7 +80,7 @@ jobs:
7080
- name: Build conda package
7181
run: |
7282
CHANNELS=(-c https://software.repos.intel.com/python/conda -c conda-forge --override-channels)
73-
VERSIONS=(--python "${{ matrix.python }}")
83+
VERSIONS=(--python "${{ matrix.python }}" --numpy "${{ matrix.numpy }}")
7484
TEST=(--no-test)
7585
7686
conda build \
@@ -92,6 +102,7 @@ jobs:
92102
strategy:
93103
matrix:
94104
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
105+
numpy: ['numpy">=2"']
95106
experimental: [false]
96107
runner: [ubuntu-latest]
97108
continue-on-error: ${{ matrix.experimental }}
@@ -139,7 +150,7 @@ jobs:
139150
PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")"
140151
export PACKAGE_VERSION
141152
CHANNELS=(-c "$GITHUB_WORKSPACE"/channel ${{ env.CHANNELS }})
142-
conda create -n ${{ env.TEST_ENV_NAME }} "${PACKAGE_NAME}=${PACKAGE_VERSION}" python=${{ matrix.python }} "${CHANNELS[@]}" --only-deps --dry-run > lockfile
153+
conda create -n ${{ env.TEST_ENV_NAME }} "${PACKAGE_NAME}=${PACKAGE_VERSION}" python=${{ matrix.python }} ${{ matrix.numpy }} "${CHANNELS[@]}" --only-deps --dry-run > lockfile
143154
144155
- name: Display lockfile
145156
run: cat lockfile
@@ -165,7 +176,7 @@ jobs:
165176
CHANNELS=(-c "$GITHUB_WORKSPACE"/channel ${{ env.CHANNELS }})
166177
PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")"
167178
export PACKAGE_VERSION
168-
conda create -n ${{ env.TEST_ENV_NAME }} "${PACKAGE_NAME}=${PACKAGE_VERSION}" python=${{ matrix.python }} pytest "${CHANNELS[@]}"
179+
conda create -n ${{ env.TEST_ENV_NAME }} "${PACKAGE_NAME}=${PACKAGE_VERSION}" python=${{ matrix.python }} ${{ matrix.numpy }} pytest "${CHANNELS[@]}"
169180
conda install -n ${{ env.TEST_ENV_NAME }} "scipy>=1.10" "mkl-service" "${CHANNELS[@]}"
170181
# Test installed packages
171182
conda list -n ${{ env.TEST_ENV_NAME }}
@@ -183,7 +194,17 @@ jobs:
183194
shell: cmd /C CALL {0}
184195
strategy:
185196
matrix:
186-
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
197+
include:
198+
- python: "3.10"
199+
numpy: "2.2"
200+
- python: "3.11"
201+
numpy: "2.3"
202+
- python: "3.12"
203+
numpy: "2.3"
204+
- python: "3.13"
205+
numpy: "2.3"
206+
- python: "3.14"
207+
numpy: "2.3"
187208
steps:
188209
- name: Cancel Previous Runs
189210
uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
@@ -230,7 +251,7 @@ jobs:
230251
231252
- name: Build conda package
232253
run: |
233-
conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe
254+
conda build --no-test --python ${{ matrix.python }} --numpy ${{ matrix.numpy }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe
234255
235256
- name: Upload artifact
236257
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -248,6 +269,7 @@ jobs:
248269
strategy:
249270
matrix:
250271
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
272+
numpy: ['numpy">=2"']
251273
experimental: [false]
252274
runner: [windows-latest]
253275
continue-on-error: ${{ matrix.experimental }}
@@ -314,7 +336,7 @@ jobs:
314336
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
315337
SET PACKAGE_VERSION=%%F
316338
)
317-
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
339+
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
318340
319341
- name: Display lockfile content
320342
shell: pwsh
@@ -344,7 +366,7 @@ jobs:
344366
SET PACKAGE_VERSION=%%F
345367
)
346368
SET "TEST_DEPENDENCIES=pytest"
347-
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
369+
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
348370
conda install -n ${{ env.TEST_ENV_NAME }} scipy mkl-service -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
349371
}
350372
- name: Report content of test environment

0 commit comments

Comments
 (0)