Skip to content
New issue

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

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

Already on GitHub? # 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
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
@@ -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

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

GitHub Actions / YAML lint

13:1 [truthy] truthy value should be one of [false, true]
pull_request:
types: [opened, synchronize]
branches:
@@ -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

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

GitHub Actions / YAML lint

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

@@ -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

GitHub Actions / YAML lint

221:70 [comments] too few spaces before comment
id: check_cache
with:
lookup-only: true
@@ -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

GitHub Actions / YAML lint

244:70 [comments] too few spaces before comment
id: restore_cache
with:
key: ${{steps.parameters.outputs.python_cache_key}}
@@ -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

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

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

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/setup-bazel@0.12.0
uses: bazel-contrib/setup-bazel@c50333a3696ad2e6df1e7a2f9b417c5336db774f # 0.12.0

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

GitHub Actions / YAML lint

287:82 [comments] too few spaces before comment

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

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:
@@ -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

GitHub Actions / YAML lint

310:81 [line-length] line too long (83 > 80 characters)
with:
name: wheel-${{github.run_id}}
path: ./wheel
@@ -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

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
@@ -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

GitHub Actions / YAML lint

356:81 [line-length] line too long (85 > 80 characters)
with:
name: wheel-${{github.run_id}}
path: ./wheel
@@ -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/setup-bazel@0.12.0
uses: bazel-contrib/setup-bazel@c50333a3696ad2e6df1e7a2f9b417c5336db774f # 0.12.0

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

GitHub Actions / YAML lint

392:81 [line-length] line too long (89 > 80 characters)
with:
bazelrc: ${{env.bazelrc_additions}}
bazelisk-cache: true
@@ -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

GitHub Actions / YAML lint

410:81 [line-length] line too long (83 > 80 characters)
with:
name: bazel-tests-${{github.run_id}}
retention-days: 7
@@ -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

GitHub Actions / YAML lint

446:81 [line-length] line too long (85 > 80 characters)
with:
name: wheel-${{github.run_id}}
path: ./wheel
@@ -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/setup-bazel@0.12.0
uses: bazel-contrib/setup-bazel@c50333a3696ad2e6df1e7a2f9b417c5336db774f # 0.12.0

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

GitHub Actions / YAML lint

491:81 [line-length] line too long (89 > 80 characters)
with:
bazelrc: ${{env.bazelrc_additions}}
bazelisk-cache: true
26 changes: 13 additions & 13 deletions .github/workflows/ci-file-checks.yaml
Original file line number Diff line number Diff line change
@@ -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}}
@@ -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}}

@@ -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
@@ -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}}
@@ -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'
@@ -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}}
@@ -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}}
10 changes: 5 additions & 5 deletions .github/workflows/ci-nightly-build-test.yaml
Original file line number Diff line number Diff line change
@@ -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: .

@@ -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/setup-bazel@0.9.1
uses: bazel-contrib/setup-bazel@f3f50ea6791b9b0f4c4eeabba4507422426462f5 # 0.9.1

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

GitHub Actions / YAML lint

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

@@ -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

GitHub Actions / YAML lint

126:81 [line-length] line too long (83 > 80 characters)
with:
name: test-artifacts
retention-days: 7
10 changes: 5 additions & 5 deletions .github/workflows/ci-nightly-cirq-test.yaml
Original file line number Diff line number Diff line change
@@ -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}}
@@ -113,7 +113,7 @@ jobs:

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

- name: Set up Bazel without caching
if: env.use_bazel_disk_cache == 'false'
uses: bazel-contrib/setup-bazel@0.12.1
uses: bazel-contrib/setup-bazel@529dbc2648ea79358c64f2bfa5f3ec98f07859e4 # 0.12.1
env:
USE_BAZEL_VERSION: ${{inputs.bazel_version || env.bazel_version}}
with:
@@ -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
Loading