Skip to content

Commit 0d2cc00

Browse files
authored
Use specific versions of GitHub runners (#960)
Google security best practices mandate the use of specific runner versions instead of "-latest".
1 parent 43b09dc commit 0d2cc00

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
if: needs.changes.outputs.python == 'true'
132132
name: (Set up Python)
133133
needs: changes
134-
runs-on: ubuntu-latest
134+
runs-on: ubuntu-24.04
135135
timeout-minutes: 10
136136
steps:
137137
- name: Check out a copy of the git repository
@@ -160,7 +160,7 @@ jobs:
160160
if: needs.changes.outputs.python == 'true'
161161
name: Python format checks
162162
needs: [changes, setup]
163-
runs-on: ubuntu-latest
163+
runs-on: ubuntu-24.04
164164
timeout-minutes: 10
165165
steps:
166166
- name: Check out a copy of the git repository
@@ -186,7 +186,7 @@ jobs:
186186
if: needs.changes.outputs.python == 'true'
187187
name: Python type checks
188188
needs: [changes, setup]
189-
runs-on: ubuntu-latest
189+
runs-on: ubuntu-24.04
190190
timeout-minutes: 10
191191
steps:
192192
- name: Check out a copy of the git repository
@@ -210,7 +210,7 @@ jobs:
210210
if: needs.changes.outputs.python == 'true'
211211
name: Python lint checks
212212
needs: [changes, setup]
213-
runs-on: ubuntu-latest
213+
runs-on: ubuntu-24.04
214214
timeout-minutes: 10
215215
steps:
216216
- name: Check out a copy of the git repository
@@ -249,7 +249,7 @@ jobs:
249249
timeout-minutes: 15
250250
strategy:
251251
matrix:
252-
os: [ ubuntu-latest, macos-latest, windows-latest ]
252+
os: [ ubuntu-24.04, macos-14, windows-2022 ]
253253
cirq-version: [ 1.4.1 ]
254254
fail-fast: false
255255
steps:
@@ -275,7 +275,7 @@ jobs:
275275
if: needs.changes.outputs.python == 'true' && (success() || failure())
276276
name: Python pytest checks
277277
needs: [changes, pytest-matrix]
278-
runs-on: ubuntu-latest
278+
runs-on: ubuntu-24.04
279279
steps:
280280
- run: |
281281
result="${{needs.pytest-matrix.result}}"
@@ -293,7 +293,7 @@ jobs:
293293
timeout-minutes: 15
294294
strategy:
295295
matrix:
296-
os: [ubuntu-latest, macos-latest]
296+
os: [ubuntu-24.04, macos-14]
297297
cirq-version: [ 1.4.1 ]
298298
fail-fast: false
299299
steps:
@@ -319,7 +319,7 @@ jobs:
319319
if: needs.changes.outputs.python == 'true' && (success() || failure())
320320
name: Python extra pytest checks
321321
needs: [changes, pytest-extra-matrix]
322-
runs-on: ubuntu-latest
322+
runs-on: ubuntu-24.04
323323
steps:
324324
- run: |
325325
result="${{needs.pytest-extra-matrix.result}}"
@@ -357,7 +357,7 @@ jobs:
357357
if: needs.changes.outputs.python == 'true'
358358
name: Python code coverage checks
359359
needs: [changes, setup]
360-
runs-on: ubuntu-latest
360+
runs-on: ubuntu-24.04
361361
timeout-minutes: 15
362362
steps:
363363
- name: Check out a copy of the git repository

.github/workflows/nightly-pytest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
# making all necessary Python dependencies available on those combos.
2727
# TODO: add "3.13.1" once Cirq 1.5 is released.
2828
python-version: ["3.10.11", "3.11.9", "3.12.7", "3.13.1"]
29-
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-14, windows-latest]
29+
os: [ubuntu-22.04, ubuntu-22.04-arm, macos-14, windows-2022]
3030
arch: [x64, arm64]
3131
exclude:
3232
# MacOS 14 is only available for arm64.
3333
- os: macos-14
3434
arch: x64
3535

3636
# Windows is only available for x64.
37-
- os: windows-latest
37+
- os: windows-2022
3838
arch: arm64
3939

4040
# GitHub provides separate Ubuntu runners for ARM and x64.

0 commit comments

Comments
 (0)