99 pull_request :
1010 paths :
1111 - .github/workflows/llvm-build.yml
12+ - .github/workflows/llvm-build/almalinux.Dockerfile
13+ - .github/workflows/llvm-build/centos.Dockerfile
1214 workflow_dispatch :
1315
1416env :
@@ -135,6 +137,7 @@ jobs:
135137 -DLLVM_INSTALL_UTILS=ON
136138 -DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU"
137139 -DLLVM_ENABLE_TERMINFO=OFF
140+ -DLLVM_ENABLE_ZSTD=OFF
138141 llvm-project/llvm
139142
140143 ninja -C llvm-project/build check-mlir install
@@ -237,7 +240,11 @@ jobs:
237240 run : |
238241 # if this step crashes, it can leave behind a stale docker container
239242 docker container prune -f
240- docker rmi -f $(docker images -q)
243+
244+ images=$(docker images -q)
245+ if [ -n "$images" ]; then
246+ docker rmi -f $images
247+ fi
241248
242249 docker build --tag llvm-build --build-arg llvm_dir=llvm-project \
243250 -f llvm-build/.github/workflows/llvm-build/almalinux.Dockerfile .
@@ -264,16 +271,16 @@ jobs:
264271 path : |
265272 ${{ github.workspace }}/llvm-*-${{ matrix.config.target-os }}-${{ matrix.config.arch }}.tar.gz
266273
267- - name : Azure Login
268- if : ${{ (github.repository == 'triton-lang/triton') }}
274+ - name : Azure login
275+ if : ${{ (github.repository == 'triton-lang/triton') && github.ref_name == 'llvm-head' }}
269276 uses : azure/login@v2
270277 with :
271- client-id : ${{ secrets.AZURE_CLIENT_ID }}
272- tenant-id : ${{ secrets.AZURE_TENANT_ID }}
273- subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
278+ client-id : ${{ secrets.AZURE_CLIENT_ID_LLVM }}
279+ tenant-id : ${{ secrets.AZURE_TENANT_ID_LLVM }}
280+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID_LLVM }}
274281
275282 - name : Upload LLVM Artifacts to Azure
276- if : ${{ (github.repository == 'triton-lang/triton') }}
283+ if : ${{ (github.repository == 'triton-lang/triton') && github.ref_name == 'llvm-head' }}
277284 shell : bash -el {0}
278285 run : |
279286 az storage blob upload --account-name oaitriton --auth-mode login --container-name public --file "${{ env.llvm_install_dir }}.tar.gz" --name "llvm-builds/${{ env.llvm_install_dir }}.tar.gz" --overwrite
@@ -282,7 +289,7 @@ jobs:
282289 echo "Blob URL: ${URL}"
283290
284291 - name : Azure Logout
285- if : ${{ (github.repository == 'triton-lang/triton') }}
292+ if : ${{ (github.repository == 'triton-lang/triton') && github.ref_name == 'llvm-head' }}
286293 run : |
287294 az logout
288295 az cache purge
0 commit comments