Skip to content

Commit

Permalink
Check if the desired LLVM version is already installed for github wor…
Browse files Browse the repository at this point in the history
…kflows
  • Loading branch information
lzydmxy committed Sep 24, 2024
1 parent bbfe5ed commit f06a7d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/prepare-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ llvm_priority=300
sudo apt install -y ninja-build ccache

# install llvm
#wget https://apt.llvm.org/llvm.sh
#chmod 755 llvm.sh && sudo ./llvm.sh ${llvm_version} all
wget https://apt.llvm.org/llvm.sh

# Check if the desired LLVM version is already installed
if ! llvm-config-${llvm_version} --version &>/dev/null; then
sudo ./llvm.sh ${llvm_version} all
else
echo "LLVM ${llvm_version} is already installed."
fi

# make clang as default compiler
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${llvm_version} ${llvm_priority}
Expand Down

0 comments on commit f06a7d0

Please sign in to comment.