Skip to content

Commit d7ec4a2

Browse files
Merge branch 'main' into group_ps
2 parents aa82aa2 + de37106 commit d7ec4a2

File tree

397 files changed

+5332
-5431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

397 files changed

+5332
-5431
lines changed

.github/workflows/ci-daily.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ jobs:
3535
sudo apt-get install libffi7
3636
- name: Install requirements
3737
run: |
38-
pip install cirq~=1.0.dev &&
39-
pip install \
40-
-r dev_tools/requirements/deps/format.txt \
41-
-r dev_tools/requirements/deps/pylint.txt \
42-
-r dev_tools/requirements/deps/pytest.txt \
43-
-r dev_tools/requirements/deps/notebook.txt
38+
pip install --upgrade cirq~=1.0.dev &&
39+
version=$(pip show cirq | sed -n "s/^Version: //p" | grep .) &&
40+
pip install "cirq-rigetti==${version}" &&
41+
pip install \
42+
-r dev_tools/requirements/deps/format.txt \
43+
-r dev_tools/requirements/deps/pylint.txt \
44+
-r dev_tools/requirements/deps/pytest.txt \
45+
-r dev_tools/requirements/deps/notebook.txt
4446
- name: Run Quil dependencies
4547
run: docker compose -f cirq-rigetti/docker-compose.test.yaml up -d
4648
- name: Pytest check
@@ -65,7 +67,8 @@ jobs:
6567
key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }}
6668
- name: Install requirements
6769
run: |
68-
pip install cirq~=1.0.dev &&
70+
pip install --upgrade cirq~=1.0.dev &&
71+
pip install --upgrade cirq-rigetti~=1.0.dev &&
6972
pip install -r dev_tools/requirements/deps/format.txt &&
7073
pip install -r dev_tools/requirements/deps/pylint.txt &&
7174
pip install -r dev_tools/requirements/deps/pytest.txt &&
@@ -91,11 +94,13 @@ jobs:
9194
key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }}
9295
- name: Install requirements
9396
run: |
94-
pip install cirq~=1.0.dev &&
95-
pip install \
96-
-r dev_tools/requirements/deps/format.txt \
97-
-r dev_tools/requirements/deps/pylint.txt \
98-
-r dev_tools/requirements/deps/pytest.txt \
99-
-r dev_tools/requirements/deps/notebook.txt
97+
pip install --upgrade cirq~=1.0.dev &&
98+
version=$(pip show cirq | sed -n "s/^Version: //p" | grep .) &&
99+
pip install "cirq-rigetti==${version}" &&
100+
pip install \
101+
-r dev_tools/requirements/deps/format.txt \
102+
-r dev_tools/requirements/deps/pylint.txt \
103+
-r dev_tools/requirements/deps/pytest.txt \
104+
-r dev_tools/requirements/deps/notebook.txt
100105
- name: Pytest check
101106
run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --enable-slow-tests

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ jobs:
193193
sudo apt-get install libffi7
194194
- name: Install requirements
195195
run: |
196-
pip install wheel
196+
pip install --upgrade setuptools wheel
197197
pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt
198198
- name: Run Quil dependencies
199199
run: docker compose -f cirq-rigetti/docker-compose.test.yaml up -d
@@ -230,7 +230,7 @@ jobs:
230230
pip install wheel
231231
pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev-np2.env.txt
232232
- name: Pytest check
233-
run: check/pytest -n auto --warn-numpy-data-promotion --durations=20 --ignore=cirq-rigetti
233+
run: check/pytest -n auto --durations=20 --ignore=cirq-rigetti
234234
pip-compile:
235235
name: Check consistency of requirements
236236
runs-on: ubuntu-22.04
@@ -289,7 +289,7 @@ jobs:
289289
sudo apt-get install libffi7
290290
- name: Install requirements
291291
run: |
292-
pip install wheel
292+
pip install --upgrade setuptools wheel
293293
pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt
294294
- name: Run Quil dependencies
295295
run: docker compose -f cirq-rigetti/docker-compose.test.yaml up -d
@@ -322,7 +322,7 @@ jobs:
322322
key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }}
323323
- name: Install requirements
324324
run: |
325-
pip install wheel
325+
pip install --upgrade setuptools wheel
326326
pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt
327327
- name: Pytest Windows
328328
run: |
@@ -350,7 +350,7 @@ jobs:
350350
key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }}
351351
- name: Install requirements
352352
run: |
353-
pip install wheel
353+
pip install --upgrade setuptools wheel
354354
pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt
355355
- name: Pytest check
356356
run: check/pytest -n auto --durations=20 --ignore=cirq-core/cirq/contrib

.github/workflows/first-interaction.yaml

Lines changed: 0 additions & 92 deletions
This file was deleted.

.github/workflows/pr-labeler.yaml

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,63 @@
1414

1515
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1616
# Label PRs with labels such as size.
17+
#
18+
# This workflow is designed not to fail if labeling actions encounter errors;
19+
# instead, it writes error messages as annotations on the workflow's run summary
20+
# page. If labels don't seem to be getting applied, check there for errors.
1721
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1822

1923
name: Pull request labeler
2024
run-name: >-
2125
Label pull request ${{github.event.pull_request.number}} by ${{github.actor}}
2226
2327
on:
24-
pull_request:
25-
types: [opened]
28+
# Note: do not copy-paste this workflow with `pull_request_target` left as-is.
29+
# Its use here is a special case where security implications are understood.
30+
# Workflows should normally use `pull_request` instead.
31+
pull_request_target:
32+
types:
33+
- opened
34+
- synchronize
2635

2736
# Allow manual invocation.
2837
workflow_dispatch:
38+
inputs:
39+
pr-number:
40+
description: 'The PR number of the PR to label:'
41+
type: string
42+
required: true
43+
trace:
44+
description: 'Turn on shell script debugging'
45+
type: boolean
2946

3047
# Declare default permissions as read only.
3148
permissions: read-all
3249

3350
jobs:
3451
label-pr-size:
35-
name: Add size label to new pull request
52+
name: Update PR size labels
3653
runs-on: ubuntu-24.04
54+
timeout-minutes: 5
3755
permissions:
3856
contents: read
39-
pull-requests: write
4057
issues: write
58+
pull-requests: write
59+
env:
60+
PR_NUMBER: ${{inputs.pr-number || github.event.pull_request.number}}
61+
# The next var is used by Bash. We add 'xtrace' to the options if this run
62+
# is a workflow_dispatch invocation and the user set the 'trace' option.
63+
SHELLOPTS: ${{inputs.trace && 'xtrace' || '' }}
4164
steps:
42-
- name: Label the PR with a size label
43-
uses: codelytv/pr-size-labeler@c7a55a022747628b50f3eb5bf863b9e796b8f274 # v1
65+
- name: Check out a copy of the git repository
66+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4467
with:
45-
# Don't count file deletions, per suggestion in Small CLs.
46-
ignore_file_deletions: 'true'
47-
48-
xs_label: 'Size: XS'
49-
xs_max_size: '10'
68+
sparse-checkout: |
69+
./dev_tools/ci/size-labeler.sh
5070
51-
s_label: 'size: S'
52-
s_max_size: '50'
53-
54-
m_label: 'size: M'
55-
m_max_size: '250'
56-
57-
l_label: 'size: L'
58-
l_max_size: '1000'
59-
60-
xl_label: 'size: XL'
61-
fail_if_xl: 'false'
71+
- name: Label the PR with a size label
72+
id: label
73+
continue-on-error: true
74+
env:
75+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
76+
run: ./dev_tools/ci/size-labeler.sh

0 commit comments

Comments
 (0)