File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,8 @@ name: Unit tests Zig
2
2
3
3
on :
4
4
push :
5
- branches : [ main ]
5
+ # branches: [ main ]
6
6
pull_request :
7
- branches : [ '*' ]
8
7
9
8
jobs :
10
9
build :
@@ -24,11 +23,13 @@ jobs:
24
23
if : startsWith(matrix.runs-on, 'ubuntu')
25
24
run : |
26
25
sudo apt update
27
- sudo apt install -y wget
28
- sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main"
29
- wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
30
- sudo apt update
31
- sudo apt install -y llvm-19
26
+ wget https://apt.llvm.org/llvm.sh
27
+ chmod +x llvm.sh
28
+ sudo ./llvm.sh 19
29
+ rm llvm.sh
30
+
31
+ # Install necessary LLVM 19 development packages
32
+ sudo apt-get install -y libllvm19 llvm-19-dev libclang-19-dev clang-19
32
33
33
34
- name : Install LLVM (MacOS)
34
35
if : startsWith(matrix.runs-on, 'macos')
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ in `build.zig`:
32
32
const clang_mod = llvm_dep.module("clang"); // <== get clang bindings module
33
33
/// your executable config
34
34
exe.root_module.addImport("llvm", llvm_mod); // <== add llvm module
35
- exe.root_module.addImport("clang", clang_mod); // <== add llvm module
35
+ exe.root_module.addImport("clang", clang_mod); // <== add clang module
36
36
// [...]
37
37
```
38
38
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ pub fn build(b: *std.Build) !void {
44
44
.optimize = optimize ,
45
45
});
46
46
switch (target .result .os .tag ) {
47
- .linux = > clang_module .linkSystemLibrary ("clang" , .{}), // Ubuntu
47
+ .linux = > clang_module .linkSystemLibrary ("clang-19 " , .{}), // Ubuntu
48
48
.macos = > {
49
49
clang_module .addLibraryPath (.{
50
50
.cwd_relative = "/opt/homebrew/opt/llvm/lib" ,
You can’t perform that action at this time.
0 commit comments