Skip to content

Commit

Permalink
Fix llvm-build for almalinux (triton-lang#5111)
Browse files Browse the repository at this point in the history
If a directory with LLVM exists in the runner (for example, a leftover
from a previous run for the same LLVM commit id), then the new LLVM
build will be copied to `install` subdirectory. To avoid this case we
should remove the existing LLVM installation directory.

Fixes triton-lang#5096.
  • Loading branch information
pbchekin authored and Luosuu committed Nov 13, 2024
1 parent 4990da0 commit bdf1a19
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/llvm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,14 @@ jobs:
# Create temporary container to copy cache and installed artifacts.
CONTAINER_ID=$(docker create llvm-build)
# We remove the existing directories, otherwise docker cp will
# create a subdirectory inside the existing directory.
rm -rf "${{ env.SCCACHE_DIR }}" "${{ env.llvm_install_dir }}"
docker cp "${CONTAINER_ID}:/install" "${{ env.llvm_install_dir }}"
tar czf "${{ env.llvm_install_dir }}.tar.gz" "${{ env.llvm_install_dir }}"
# We remove the existing directory, otherwise docker will
# create a subdirectory inside the existing directory.
rm -rf "${{ env.SCCACHE_DIR }}"
docker cp "${CONTAINER_ID}:/sccache" "${{ env.SCCACHE_DIR }}"
sudo chown -R "$(id -u -n):$(id -g -n)" "${{ env.SCCACHE_DIR }}"
Expand Down

0 comments on commit bdf1a19

Please sign in to comment.