@@ -51,6 +51,38 @@ permissions:
5151 contents : read
5252
5353jobs :
54+ # TEMPORARY: Migrate existing toolchain cache to LLVM-only format
55+ # Set if: true to run once, then remove this entire job
56+ migrate-cache :
57+ name : Migrate toolchain cache to LLVM-only
58+ runs-on : ubuntu-latest
59+ if : true # TODO: Set to false or remove after running once
60+ steps :
61+ - name : Checkout
62+ uses : actions/checkout@v4
63+
64+ - name : Determine tt-mlir commit
65+ id : commit
66+ run : |
67+ COMMIT=$(cat third-party/tt-mlir.commit | tr -d '[:space:]')
68+ echo "commit=$COMMIT" >> $GITHUB_OUTPUT
69+
70+ - name : Restore full toolchain cache
71+ uses : actions/cache/restore@v4
72+ with :
73+ path : ttmlir-toolchain
74+ key : Linux-ttlang-toolchain-v1-${{ steps.commit.outputs.commit }}
75+ fail-on-cache-miss : true
76+
77+ - name : Cleanup toolchain (create stubs)
78+ run : .github/containers/cleanup-toolchain.sh ttmlir-toolchain
79+
80+ - name : Save as LLVM-only cache
81+ uses : actions/cache/save@v4
82+ with :
83+ path : ttmlir-toolchain
84+ key : Linux-ttlang-llvm-only-v1-${{ steps.commit.outputs.commit }}
85+
5486 # First job: Check if caches exist (runs on standard runner)
5587 check-cache :
5688 name : Check toolchain cache
@@ -179,11 +211,6 @@ jobs:
179211 echo "=== LLVM toolchain complete ==="
180212 df -h
181213
182- - name : Cleanup LLVM toolchain
183- run : |
184- .github/containers/cleanup-toolchain.sh $TTMLIR_TOOLCHAIN_DIR
185- df -h
186-
187214 - name : Save LLVM-only cache
188215 uses : actions/cache/save@v4
189216 with :
@@ -249,10 +276,6 @@ jobs:
249276 key : ${{ needs.check-cache.outputs.llvm-cache-key }}
250277 fail-on-cache-miss : true
251278
252- - name : Ensure LLVM stubs exist
253- run : |
254- .github/containers/cleanup-toolchain.sh $TTMLIR_TOOLCHAIN_DIR
255-
256279 - name : Build and install tt-lang (includes tt-mlir via FetchContent)
257280 run : |
258281 .github/containers/build-and-install.sh \
@@ -264,6 +287,11 @@ jobs:
264287 { echo "ERROR: TTMLIRConfig.cmake not found - tt-mlir install failed"; exit 1; }
265288 echo "tt-mlir installed successfully"
266289
290+ - name : Cleanup toolchain (create stubs for unused binaries)
291+ run : |
292+ .github/containers/cleanup-toolchain.sh $TTMLIR_TOOLCHAIN_DIR
293+ df -h
294+
267295 - name : Save toolchain to cache
268296 uses : actions/cache/save@v4
269297 with :
0 commit comments