File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 8
8
9
9
jobs :
10
10
build :
11
+ name : Test [${{ matrix.rust }}, ${{ matrix.profile }}]
11
12
runs-on : ubuntu-latest
12
13
strategy :
13
14
fail-fast : false
14
15
matrix :
15
16
rust : [stable, nightly]
17
+ profile : [dev]
18
+ include :
19
+ - rust : stable
20
+ profile : release
16
21
steps :
17
22
- name : " Set environmental variables"
18
23
shell : bash
@@ -50,12 +55,12 @@ jobs:
50
55
sudo rm -f /bin/clang && sudo ln -s /usr/bin/clang-14 /bin/clang
51
56
-
uses :
Swatinem/[email protected]
52
57
- name : Build
53
- run : cargo build --locked --verbose --workspace --exclude runqslower
58
+ run : cargo build --profile=${{ matrix.profile }} -- locked --verbose --workspace --exclude runqslower
54
59
- name : Run tests
55
60
# Skip BTF & map tests which require sudo
56
- run : cargo test --locked --verbose --workspace --exclude runqslower -- --skip test_object --skip test_tc --skip test_map_info --include-ignored
61
+ run : cargo test --profile=${{ matrix.profile }} -- locked --verbose --workspace --exclude runqslower -- --skip test_object --skip test_tc --skip test_map_info --include-ignored
57
62
- name : Run BTF tests
58
- run : cd libbpf-rs && cargo test --locked --verbose -- test_object test_tc
63
+ run : cd libbpf-rs && cargo test --profile=${{ matrix.profile }} -- locked --verbose -- test_object test_tc
59
64
60
65
build-minimum :
61
66
name : Build using minimum versions of dependencies
Original file line number Diff line number Diff line change 1
1
use std:: collections:: HashSet ;
2
2
use std:: ffi:: c_void;
3
3
use std:: fs;
4
+ use std:: hint;
4
5
use std:: io:: Read ;
5
6
use std:: path:: Path ;
6
7
use std:: path:: PathBuf ;
@@ -1102,7 +1103,8 @@ fn test_object_tracepoint_with_opts() {
1102
1103
#[ inline( never) ]
1103
1104
#[ no_mangle]
1104
1105
extern "C" fn uprobe_target ( ) -> usize {
1105
- 42
1106
+ // Use `black_box` here as an additional barrier to inlining.
1107
+ hint:: black_box ( 42 )
1106
1108
}
1107
1109
1108
1110
/// Check that we can attach a BPF program to a uprobe.
You can’t perform that action at this time.
0 commit comments