File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 77# failures that might be missed when skipping the long-running tests or using
88# caching to speed up the CI runs.
99#
10+ # For efficiency, it checks if there have been any commits in the past 24 hrs
11+ # and does not proceed if there have been none.
12+ #
1013# This workflow also can be invoked manually via the "Run workflow" button at
1114# https://github.com/tensorflow/quantum/actions/workflows/ci-build-checks.yaml
1215# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -52,8 +55,27 @@ concurrency:
5255 group : ${{github.workflow}}-${{github.event.pull_request.number||github.ref}}
5356
5457jobs :
58+ Decision :
59+ runs-on : ubuntu-24.04
60+ outputs :
61+ run : ${{steps.commits.outputs.count > 0}}
62+ steps :
63+ - name : Check out a sparse copy of the git repo for TFQ
64+ uses : actions/checkout@v4
65+ with :
66+ sparse-checkout : .
67+
68+ - name : Get number of commits in the last 24 hrs
69+ id : commits
70+ run : |
71+ set -x
72+ count=$(git log --oneline --since '24 hours ago' | wc -l)
73+ echo "count=$count" >> "$GITHUB_OUTPUT"
74+
5575 Nightly :
76+ if : needs.Decision.outputs.run == 'true'
5677 name : Build and test
78+ needs : Decision
5779 runs-on : ubuntu-20.04
5880 steps :
5981 - name : Check out a copy of the TFQ git repository
You can’t perform that action at this time.
0 commit comments