Skip to content

Commit 2bbc3c4

Browse files
authored
CI - add temporary job pytest-numpy-2 to test with NumPy-2 on Ubuntu (#6740)
Note cirq-rigetti is excluded, because it is not yet NumPy-2 compatible. The test is only run on Ubuntu for the sake of speed and simplicity. Related to #6706
1 parent 3fefe29 commit 2bbc3c4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,32 @@ jobs:
193193
run: check/pytest -n auto --durations=20 --ignore=cirq-core/cirq/contrib --rigetti-integration
194194
- name: Stop Quil dependencies
195195
run: docker compose -f cirq-rigetti/docker-compose.test.yaml down
196+
# TODO(#6706) remove after we start using NumPy 2.0 in regular pytest
197+
pytest-numpy-2:
198+
name: Pytest Ubuntu with NumPy-2
199+
strategy:
200+
matrix:
201+
python-version: ['3.10', '3.11', '3.12']
202+
runs-on: ubuntu-20.04
203+
steps:
204+
- name: Check out source repository
205+
uses: actions/checkout@v4
206+
- name: Set up Python environment
207+
uses: actions/setup-python@v5
208+
with:
209+
python-version: ${{ matrix.python-version }}
210+
architecture: 'x64'
211+
- name: Set up caching of dependencies
212+
uses: actions/cache@v4
213+
with:
214+
path: ${{ env.pythonLocation }}
215+
key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }}
216+
- name: Install requirements
217+
run: |
218+
pip install wheel
219+
pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev-np2.env.txt
220+
- name: Pytest check
221+
run: check/pytest -n auto --warn-numpy-data-promotion --durations=20 --ignore=cirq-rigetti
196222
pip-compile:
197223
name: Check consistency of requirements
198224
runs-on: ubuntu-20.04

0 commit comments

Comments
 (0)