Skip to content

Commit b620c1e

Browse files
committed
Install clang manually
1 parent 0c2565e commit b620c1e

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/analysis.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,23 @@ jobs:
1111
runs-on: ubuntu-24.04
1212

1313
steps:
14+
# Set up Clang and LLVM
15+
- name: Install LLVM and Clang
16+
run: |
17+
wget https://apt.llvm.org/llvm.sh
18+
chmod +x llvm.sh
19+
sudo ./llvm.sh 20
20+
sudo apt-get install -y clang-tools-20
21+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-20 200
22+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-20 200
23+
sudo update-alternatives --install /usr/bin/clang-scan-deps clang-scan-deps /usr/bin/clang-scan-deps-20 200
24+
sudo update-alternatives --set clang /usr/bin/clang-20
25+
sudo update-alternatives --set clang++ /usr/bin/clang++-20
26+
sudo update-alternatives --set clang-scan-deps /usr/bin/clang-scan-deps-20
27+
1428
- name: Checkout repository
1529
uses: actions/checkout@v4
1630

17-
# Set up Clang and LLVM
18-
- name: Set up Clang
19-
uses: llvm/actions/setup-clang@v2
20-
with:
21-
clang-version: 20
22-
2331
# Set conda environment using setup-micromamba
2432
- name: Set conda environment
2533
uses: mamba-org/setup-micromamba@main
@@ -32,12 +40,13 @@ jobs:
3240
# Run CMake configuration
3341
- name: Configure using CMake
3442
run: |
43+
export CC=clang; export CXX=clang++
3544
cmake -G Ninja \
3645
-Bbuild \
3746
-DCMAKE_BUILD_TYPE=Release \
3847
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
3948
-DBUILD_TESTS=ON \
40-
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
49+
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
4150
#-DFETCH_DEPENDENCIES_WITH_CMAKE=MISSING
4251
4352
# Run Clang-Tidy and Clang-Format Analysis

0 commit comments

Comments
 (0)