Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin the versions of CI actions to commit sha's #865

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions .github/workflows/ci-build-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
# https://github.com/tensorflow/quantum/actions/workflows/ci-build-checks.yaml
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

name: CI build checks

Check warning on line 10 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

10:1 [document-start] missing document start "---"
run-name: Continuous integration build & test

on:

Check warning on line 13 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

13:1 [truthy] truthy value should be one of [false, true]
pull_request:
types: [opened, synchronize]
branches:
Expand Down Expand Up @@ -178,12 +178,12 @@
debug: ${{steps.parameters.outputs.debug}}
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

Check warning on line 181 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

181:73 [comments] too few spaces before comment

# Note: setup-python has a cache facility, but we don't use it here
# because we want to cache more Python things than setup-python does.
- name: Set up Python ${{inputs.python_ver || env.python_ver}}
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5

Check warning on line 186 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

186:77 [comments] too few spaces before comment
with:
python-version: ${{inputs.python_ver || env.python_ver}}

Expand Down Expand Up @@ -218,7 +218,7 @@
fi

- name: Test if the cache already exists
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4

Check warning on line 221 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

221:70 [comments] too few spaces before comment
id: check_cache
with:
lookup-only: true
Expand All @@ -241,7 +241,7 @@
steps.check_cache.outputs.cache-hit != 'true' ||
inputs.remake_python_cache == 'true'
name: Set up the Python cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4

Check warning on line 244 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

244:70 [comments] too few spaces before comment
id: restore_cache
with:
key: ${{steps.parameters.outputs.python_cache_key}}
Expand Down Expand Up @@ -269,22 +269,22 @@
runs-on: ubuntu-20.04
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

Check warning on line 272 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

272:73 [comments] too few spaces before comment

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5

Check warning on line 275 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

275:77 [comments] too few spaces before comment
with:
python-version: ${{inputs.python_ver || env.python_ver}}

- name: Restore our Python cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4

Check warning on line 280 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

280:70 [comments] too few spaces before comment
with:
key: ${{needs.Setup.outputs.python_cache_key}}
path: ${{needs.Setup.outputs.python_cache_paths}}
fail-on-cache-miss: true

- name: Set up Bazel
uses: bazel-contrib/[email protected]
uses: bazel-contrib/setup-bazel@c50333a3696ad2e6df1e7a2f9b417c5336db774f # 0.12.0

Check warning on line 287 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

287:82 [comments] too few spaces before comment

Check failure on line 287 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

287:81 [line-length] line too long (89 > 80 characters)
# Note that we don't need to set the Bazel version to use, because it
# knows to use what's in the .bazel-version file.
with:
Expand All @@ -307,7 +307,7 @@
pip install -U ./wheel/*.whl

- name: Save the wheel for the tutorial tests
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4

Check failure on line 310 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

310:81 [line-length] line too long (83 > 80 characters)
with:
name: wheel-${{github.run_id}}
path: ./wheel
Expand All @@ -316,7 +316,7 @@

- if: failure() || needs.Setup.outputs.debug == 'true'
name: Make Bazel artifacts downloadable for analysis
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4

Check failure on line 319 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

319:81 [line-length] line too long (83 > 80 characters)
with:
name: bazel-build-artifacts-${{github.run_id}}
retention-days: 14
Expand All @@ -338,22 +338,22 @@
runs-on: ubuntu-20.04
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{inputs.python_ver || env.python_ver}}

- name: Restore our Python cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
with:
key: ${{needs.Setup.outputs.python_cache_key}}
path: ${{needs.Setup.outputs.python_cache_paths}}
fail-on-cache-miss: true

- name: Get the Python wheel we built
uses: actions/download-artifact@v4
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4

Check failure on line 356 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

356:81 [line-length] line too long (85 > 80 characters)
with:
name: wheel-${{github.run_id}}
path: ./wheel
Expand All @@ -374,22 +374,22 @@
runs-on: ubuntu-20.04
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{inputs.python_ver || env.python_ver}}

- name: Restore our Python cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
with:
key: ${{needs.Setup.outputs.python_cache_key}}
path: ${{needs.Setup.outputs.python_cache_paths}}
fail-on-cache-miss: true

- name: Set up Bazel
uses: bazel-contrib/[email protected]
uses: bazel-contrib/setup-bazel@c50333a3696ad2e6df1e7a2f9b417c5336db774f # 0.12.0

Check failure on line 392 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

392:81 [line-length] line too long (89 > 80 characters)
with:
bazelrc: ${{env.bazelrc_additions}}
bazelisk-cache: true
Expand All @@ -407,7 +407,7 @@

- if: failure() || needs.Setup.outputs.debug == 'true'
name: Make Bazel artifacts downloadable for analysis
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4

Check failure on line 410 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

410:81 [line-length] line too long (83 > 80 characters)
with:
name: bazel-tests-${{github.run_id}}
retention-days: 7
Expand All @@ -428,22 +428,22 @@
needs: [Decision, Setup, Build_wheel]
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{inputs.python_ver || env.python_ver}}

- name: Restore our Python cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
with:
key: ${{needs.Setup.outputs.python_cache_key}}
path: ${{needs.Setup.outputs.python_cache_paths}}
fail-on-cache-miss: true

- name: Get the Python wheel we built
uses: actions/download-artifact@v4
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4

Check failure on line 446 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

446:81 [line-length] line too long (85 > 80 characters)
with:
name: wheel-${{github.run_id}}
path: ./wheel
Expand Down Expand Up @@ -473,22 +473,22 @@
runs-on: ubuntu-20.04
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{inputs.python_ver || env.python_ver}}

- name: Restore our Python cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
with:
key: ${{needs.Setup.outputs.python_cache_key}}
path: ${{needs.Setup.outputs.python_cache_paths}}
fail-on-cache-miss: true

- name: Set up Bazel
uses: bazel-contrib/[email protected]
uses: bazel-contrib/setup-bazel@c50333a3696ad2e6df1e7a2f9b417c5336db774f # 0.12.0

Check failure on line 491 in .github/workflows/ci-build-checks.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

491:81 [line-length] line too long (89 > 80 characters)
with:
bazelrc: ${{env.bazelrc_additions}}
bazelisk-cache: true
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/ci-file-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ jobs:
echo base=${{github.ref_name}} >> "$GITHUB_ENV"

- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Determine files changed by this ${{github.event_name}} event
uses: dorny/paths-filter@v3
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: filter
with:
base: ${{env.base}}
Expand Down Expand Up @@ -142,12 +142,12 @@ jobs:
cache_paths: ${{steps.parameters.outputs.cache_paths}}
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

# Note: setup-python has a cache facility, but we don't use it here
# because we want to cache more Python things than setup-python does.
- name: Set up Python ${{inputs.python_ver || env.python_ver}}
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{inputs.python_ver || env.python_ver}}

Expand All @@ -167,7 +167,7 @@ jobs:
} >> "$GITHUB_OUTPUT"

- name: Test if the cache already exists
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
id: check_cache
with:
lookup-only: true
Expand All @@ -190,7 +190,7 @@ jobs:
steps.check_cache.outputs.cache-hit != 'true' ||
inputs.remake_python_cache == 'true'
name: Set up the Python cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
id: restore_cache
with:
key: ${{steps.parameters.outputs.cache_key}}
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
changed_files: ${{needs.Changes.outputs.cc_files}}
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up clang-format output problem matcher
run: echo '::add-matcher::.github/problem-matchers/clang-format.json'
Expand Down Expand Up @@ -264,15 +264,15 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{inputs.python_ver || env.python_ver}}

- name: Restore the Python cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
with:
key: ${{needs.Setup.outputs.cache_key}}
path: ${{needs.Setup.outputs.cache_paths}}
Expand Down Expand Up @@ -304,15 +304,15 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{inputs.python_ver || env.python_ver}}

- name: Restore the Python cache
uses: actions/cache@v4
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
with:
key: ${{needs.Setup.outputs.cache_key}}
path: ${{needs.Setup.outputs.cache_paths}}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-nightly-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
run: ${{steps.commits.outputs.count > 0}}
steps:
- name: Check out a sparse copy of the git repo for TFQ
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
sparse-checkout: .

Expand All @@ -79,15 +79,15 @@
runs-on: ubuntu-20.04
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python ${{inputs.py_version || env.py_version}}
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{inputs.py_version || env.py_version}}

- name: Set up Bazel
uses: bazel-contrib/[email protected]
uses: bazel-contrib/setup-bazel@f3f50ea6791b9b0f4c4eeabba4507422426462f5 # 0.9.1

Check failure on line 90 in .github/workflows/ci-nightly-build-test.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

90:81 [line-length] line too long (88 > 80 characters)
with:
bazelrc: ${{env.bazelrc_additions}}

Expand Down Expand Up @@ -123,7 +123,7 @@

- if: failure() || inputs.save_artifacts == 'true'
name: Make artifacts downloadable
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4

Check failure on line 126 in .github/workflows/ci-nightly-build-test.yaml

View workflow job for this annotation

GitHub Actions / YAML lint

126:81 [line-length] line too long (83 > 80 characters)
with:
name: test-artifacts
retention-days: 7
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-nightly-cirq-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out a copy of the TFQ git repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up Python ${{inputs.py_version || env.py_version}}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{inputs.py_version || env.py_version}}
architecture: ${{inputs.arch || env.arch}}
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

- name: Set up Bazel with caching
if: env.use_bazel_disk_cache == 'true'
uses: bazel-contrib/[email protected]
uses: bazel-contrib/setup-bazel@529dbc2648ea79358c64f2bfa5f3ec98f07859e4 # 0.12.1
env:
USE_BAZEL_VERSION: ${{inputs.bazel_version || env.bazel_version}}
with:
Expand All @@ -127,7 +127,7 @@ jobs:

- name: Set up Bazel without caching
if: env.use_bazel_disk_cache == 'false'
uses: bazel-contrib/[email protected]
uses: bazel-contrib/setup-bazel@529dbc2648ea79358c64f2bfa5f3ec98f07859e4 # 0.12.1
env:
USE_BAZEL_VERSION: ${{inputs.bazel_version || env.bazel_version}}
with:
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
if: >-
github.event.inputs.save_artifacts == 'true'
&& (failure() || github.event_name == 'workflow_dispatch')
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
with:
name: bazel-out
retention-days: 7
Expand Down
Loading