File tree 17 files changed +710
-421
lines changed
17 files changed +710
-421
lines changed Original file line number Diff line number Diff line change 1
- freebsd_instance :
2
- image : freebsd-11-1-release-amd64
3
-
4
1
task :
5
- # This name gets reported as a build status in GitHub
6
- name : stable x86_64-unknown-freebsd
2
+ name : stable x86_64-unknown-freebsd-11
3
+ freebsd_instance :
4
+ image : freebsd-11-2-release-amd64
7
5
setup_script :
8
6
- pkg install -y curl
9
7
- curl https://sh.rustup.rs -sSf --output rustup.sh
10
8
- sh rustup.sh -y
9
+ - . $HOME/.cargo/env
10
+ - rustup default stable
11
+ test_script :
12
+ - . $HOME/.cargo/env
13
+ - sh ci/run.sh x86_64-unknown-freebsd
14
+
15
+ task :
16
+ name : nightly x86_64-unknown-freebsd-12
17
+ freebsd_instance :
18
+ image : freebsd-12-0-release-amd64
19
+ setup_script :
20
+ - pkg install -y curl
21
+ - curl https://sh.rustup.rs -sSf --output rustup.sh
22
+ - sh rustup.sh --default-toolchain nightly -y
23
+ - . $HOME/.cargo/env
24
+ - rustup default nightly
11
25
test_script :
12
26
- . $HOME/.cargo/env
13
- - cd libc-test
14
- - cargo test
27
+ - sh ci/run.sh x86_64-unknown-freebsd
Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ fn main() {
16
16
) ;
17
17
}
18
18
19
+ if std:: env:: var ( "LIBC_CI" ) . is_ok ( ) {
20
+ if let Some ( 12 ) = which_freebsd ( ) {
21
+ println ! ( "cargo:rustc-cfg=freebsd12" ) ;
22
+ }
23
+ }
24
+
19
25
// Rust >= 1.15 supports private module use:
20
26
if rustc_minor_ver >= 15 || rustc_dep_of_std {
21
27
println ! ( "cargo:rustc-cfg=libc_priv_mod_use" ) ;
@@ -70,3 +76,26 @@ fn rustc_minor_version() -> Option<u32> {
70
76
71
77
otry ! ( pieces. next( ) ) . parse ( ) . ok ( )
72
78
}
79
+
80
+ fn which_freebsd ( ) -> Option < i32 > {
81
+ let output = std:: process:: Command :: new ( "freebsd-version" ) . output ( ) . ok ( ) ;
82
+ if output. is_none ( ) {
83
+ return None ;
84
+ }
85
+ let output = output. unwrap ( ) ;
86
+ if !output. status . success ( ) {
87
+ return None ;
88
+ }
89
+
90
+ let stdout = String :: from_utf8 ( output. stdout ) . ok ( ) ;
91
+ if stdout. is_none ( ) {
92
+ return None ;
93
+ }
94
+ let stdout = stdout. unwrap ( ) ;
95
+
96
+ match & stdout {
97
+ s if s. starts_with ( "11" ) => Some ( 11 ) ,
98
+ s if s. starts_with ( "12" ) => Some ( 12 ) ,
99
+ _ => None ,
100
+ }
101
+ }
Original file line number Diff line number Diff line change @@ -87,10 +87,12 @@ if [ "$TARGET" = "x86_64-unknown-linux-gnux32" ]; then
87
87
opt=" --release"
88
88
fi
89
89
90
- cargo test $opt --no-default-features --manifest-path libc-test/Cargo.toml \
90
+ export LIBC_CI=1
91
+
92
+ cargo test -vv $opt --no-default-features --manifest-path libc-test/Cargo.toml \
91
93
--target " ${TARGET} "
92
94
93
- cargo test $opt --manifest-path libc-test/Cargo.toml --target " ${TARGET} "
95
+ cargo test -vv $opt --manifest-path libc-test/Cargo.toml --target " ${TARGET} "
94
96
95
- cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml \
97
+ cargo test -vv $opt --features extra_traits --manifest-path libc-test/Cargo.toml \
96
98
--target " ${TARGET} "
You can’t perform that action at this time.
0 commit comments