Skip to content

Commit 247e024

Browse files
committed
Refactor workflow file to add test job
1 parent 2325634 commit 247e024

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"if_ether.h": "c"
55
},
66
"github-actions.workflows.pinned.workflows": [
7-
".github/workflows/auto.yml"
7+
".github/workflows/auto.yml",
8+
".github/workflows/test.yml"
89
]
910
}

socket_filter/build.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ fn main() {
2222
}
2323
}
2424
}
25-
if cfg!(not(feature = "static")) {
26-
println!("cargo:rustc-link-lib=bpf");
27-
} else {
28-
println!("cargo:rustc-link-lib=static=bpf");
29-
}
25+
println!(
26+
"cargo:rustc-link-lib={}bpf",
27+
if cfg!(feature = "static") {
28+
"static="
29+
} else {
30+
""
31+
}
32+
);
3033
} else {
3134
// 使用当前文件夹的vmlinux.h
3235
builder.clang_args(["-I."]);

0 commit comments

Comments
 (0)