Skip to content

Commit 3b73676

Browse files
committed
chore(ci): add installation step for LLVM 18
bindgen requires Clang 9 and above. Add the libclang-dev and clang packages from LLVM 18 toolchain and its dependencies.
1 parent e082e29 commit 3b73676

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/rust.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
paths-ignore:
66
- "**.md"
77
push:
8+
branches:
9+
- main
810
paths-ignore:
911
- "**.md"
1012

@@ -80,7 +82,7 @@ jobs:
8082
sudo apt-get install -y libssl-dev
8183
sudo apt-get install -y libcurl4-openssl-dev
8284
83-
- name: Install LLVM 7
85+
- name: Install LLVM 7 (for NVVM backend)
8486
if: contains(matrix.os, 'ubuntu')
8587
run: |
8688
mkdir -p ~/llvm7 && cd ~/llvm7
@@ -92,6 +94,17 @@ jobs:
9294
sudo apt-get install -y ./*.deb
9395
sudo ln -s /usr/bin/llvm-config-7 /usr/local/bin/llvm-config
9496
97+
- name: Install LLVM 18 (for bindgen)
98+
if: matrix.os == 'ubuntu-24.04'
99+
run: |
100+
sudo apt-get update
101+
sudo apt-get install -y gnupg
102+
sudo apt-get install -y build-essential
103+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | tee /usr/share/keyrings/llvm-archive-keyring.gpg > /dev/null
104+
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list
105+
sudo apt-get update && sudo apt-get install -y libclang-18-dev clang-18
106+
export LIBCLANG_PATH=/usr/lib/llvm-18/lib
107+
95108
- name: Load Rust Cache
96109
uses: Swatinem/[email protected]
97110
with:

0 commit comments

Comments
 (0)