|
52 | 52 | with: |
53 | 53 | files: | |
54 | 54 | cmake/*.txt |
| 55 | + cmake/*.json |
55 | 56 | - name: Detect if enough time has passed since last post-submit run |
56 | 57 | id: detect-time |
57 | 58 | if: github.event_name == 'push' |
@@ -127,7 +128,7 @@ jobs: |
127 | 128 | - name: Compute hash of pre-commit config |
128 | 129 | id: cache-key |
129 | 130 | run: | |
130 | | - echo "pre_commit_hash=$(sha256sum .pre-commit-config.yaml)" >> $GITHUB_OUTPUT |
| 131 | + echo "pre_commit_hash=$(sha256sum .pre-commit-config.yaml | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT |
131 | 132 | shell: bash |
132 | 133 | - name: Cache pre-commit's cache dir |
133 | 134 | uses: actions/cache@v4 |
@@ -165,9 +166,20 @@ jobs: |
165 | 166 | - name: Compute cache keys |
166 | 167 | id: cache-key |
167 | 168 | run: | |
168 | | - echo "llvm=$(cat cmake/llvm-hash.txt | cut -c 1-8)" >> $GITHUB_OUTPUT |
169 | | - echo "nvidia=$(cat cmake/nvidia-toolchain-version.txt)" >> $GITHUB_OUTPUT |
170 | | - echo "json=$(cat cmake/json-version.txt)" >> $GITHUB_OUTPUT |
| 169 | + llvm_file="cmake/llvm-hash.txt" |
| 170 | + nvidia_file="cmake/nvidia-toolchain-version.json" |
| 171 | + json_file="cmake/json-version.txt" |
| 172 | +
|
| 173 | + # Check if files exist before proceeding |
| 174 | + if [[ ! -f "$llvm_file" || ! -f "$nvidia_file" || ! -f "$json_file" ]]; then |
| 175 | + echo "Error: Required dependency files are missing." |
| 176 | + exit 1 |
| 177 | + fi |
| 178 | +
|
| 179 | + # Process the files if they exist |
| 180 | + echo "llvm=$(cat $llvm_file | cut -c 1-8)" >> $GITHUB_OUTPUT |
| 181 | + echo "nvidia=$(sha256sum $nvidia_file | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT |
| 182 | + echo "json=$(cat $json_file)" >> $GITHUB_OUTPUT |
171 | 183 | echo "datetime=$(date -u -Iseconds)" >> $GITHUB_OUTPUT |
172 | 184 | shell: bash |
173 | 185 | - name: Cache build dependencies |
@@ -306,9 +318,20 @@ jobs: |
306 | 318 | - name: Compute cache keys |
307 | 319 | id: cache-key |
308 | 320 | run: | |
309 | | - echo "llvm=$(cat cmake/llvm-hash.txt | cut -c 1-8)" >> $GITHUB_OUTPUT |
310 | | - echo "nvidia=$(cat cmake/nvidia-toolchain-version.txt)" >> $GITHUB_OUTPUT |
311 | | - echo "json=$(cat cmake/json-version.txt)" >> $GITHUB_OUTPUT |
| 321 | + llvm_file="cmake/llvm-hash.txt" |
| 322 | + nvidia_file="cmake/nvidia-toolchain-version.json" |
| 323 | + json_file="cmake/json-version.txt" |
| 324 | +
|
| 325 | + # Check if files exist before proceeding |
| 326 | + if [[ ! -f "$llvm_file" || ! -f "$nvidia_file" || ! -f "$json_file" ]]; then |
| 327 | + echo "Error: Required dependency files are missing." |
| 328 | + exit 1 |
| 329 | + fi |
| 330 | +
|
| 331 | + # Process the files if they exist |
| 332 | + echo "llvm=$(cat $llvm_file | cut -c 1-8)" >> $GITHUB_OUTPUT |
| 333 | + echo "nvidia=$(sha256sum $nvidia_file | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT |
| 334 | + echo "json=$(cat $json_file)" >> $GITHUB_OUTPUT |
312 | 335 | echo "datetime=$(date -u -Iseconds)" >> $GITHUB_OUTPUT |
313 | 336 | shell: bash |
314 | 337 | - name: Cache build dependencies |
@@ -441,9 +464,20 @@ jobs: |
441 | 464 | - name: Compute cache keys |
442 | 465 | id: cache-key |
443 | 466 | run: | |
444 | | - echo "llvm=$(cat cmake/llvm-hash.txt | cut -c 1-8)" >> $GITHUB_OUTPUT |
445 | | - echo "nvidia=$(cat cmake/nvidia-toolchain-version.txt)" >> $GITHUB_OUTPUT |
446 | | - echo "json=$(cat cmake/json-version.txt)" >> $GITHUB_OUTPUT |
| 467 | + llvm_file="cmake/llvm-hash.txt" |
| 468 | + nvidia_file="cmake/nvidia-toolchain-version.json" |
| 469 | + json_file="cmake/json-version.txt" |
| 470 | +
|
| 471 | + # Check if files exist before proceeding |
| 472 | + if [[ ! -f "$llvm_file" || ! -f "$nvidia_file" || ! -f "$json_file" ]]; then |
| 473 | + echo "Error: Required dependency files are missing." |
| 474 | + exit 1 |
| 475 | + fi |
| 476 | +
|
| 477 | + # Process the files if they exist |
| 478 | + echo "llvm=$(cat $llvm_file | cut -c 1-8)" >> $GITHUB_OUTPUT |
| 479 | + echo "nvidia=$(sha256sum $nvidia_file | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT |
| 480 | + echo "json=$(cat $json_file)" >> $GITHUB_OUTPUT |
447 | 481 | echo "datetime=$(date -u -Iseconds)" >> $GITHUB_OUTPUT |
448 | 482 | shell: bash |
449 | 483 | - name: Cache build dependencies |
|
0 commit comments