Skip to content

Commit cd4ddc7

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 70d3682 commit cd4ddc7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/rust.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
sudo apt-get install -y libssl-dev
8181
sudo apt-get install -y libcurl4-openssl-dev
8282
83-
- name: Install LLVM 7
83+
- name: Install LLVM 7 (for NVVM backend)
8484
if: contains(matrix.os, 'ubuntu')
8585
run: |
8686
mkdir -p ~/llvm7 && cd ~/llvm7
@@ -92,6 +92,18 @@ jobs:
9292
sudo apt-get install -y ./*.deb
9393
sudo ln -s /usr/bin/llvm-config-7 /usr/local/bin/llvm-config
9494
95+
- name: Install LLVM 18 (for bindgen)
96+
if: contains(matrix.os, 'ubuntu')
97+
run: |
98+
mkdir -p ~/llvm18 && cd ~/llvm18
99+
wget https://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-18/libclang-18-dev_18.1.8-17_amd64.deb
100+
wget https://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-18/libclang1-18_18.1.8-17_amd64.deb
101+
wget https://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-18/libclang-common-18-dev_18.1.8-17_amd64.deb
102+
wget https://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-18/clang-18_18.1.8-17_amd64.deb
103+
sudo apt-get update
104+
sudo apt-get install -y ./*.deb
105+
export LIBCLANG_PATH=/usr/lib/llvm-18/lib
106+
95107
- name: Load Rust Cache
96108
uses: Swatinem/[email protected]
97109
with:

0 commit comments

Comments
 (0)