File tree Expand file tree Collapse file tree 3 files changed +8
-29
lines changed Expand file tree Collapse file tree 3 files changed +8
-29
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use rustc_version::{version_meta, Channel};
2
2
3
3
fn main ( ) {
4
4
println ! ( "cargo::rustc-check-cfg=cfg(CHANNEL_NIGHTLY)" ) ;
5
+ println ! ( "cargo::rustc-check-cfg=cfg(NOT_CI)" ) ;
5
6
6
7
// Set cfg flags depending on release channel
7
8
let channel = match version_meta ( ) . unwrap ( ) . channel {
@@ -10,5 +11,10 @@ fn main() {
10
11
Channel :: Nightly => "CHANNEL_NIGHTLY" ,
11
12
Channel :: Dev => "CHANNEL_DEV" ,
12
13
} ;
13
- println ! ( "cargo:rustc-cfg={}" , channel)
14
+ println ! ( "cargo:rustc-cfg={}" , channel) ;
15
+ if option_env ! ( "CI" ) . is_some ( ) {
16
+ println ! ( "cargo:rustc-cfg={}" , "CI" )
17
+ } else {
18
+ println ! ( "cargo:rustc-cfg={}" , "NOT_CI" )
19
+ }
14
20
}
Original file line number Diff line number Diff line change 1
1
use anyhow:: Result ;
2
2
3
- #[ cfg( feature = "clipboard" ) ]
3
+ #[ cfg( all ( feature = "clipboard" , NOT_CI ) ) ]
4
4
#[ tokio:: test]
5
5
async fn clipboard ( ) -> Result < ( ) > {
6
6
// NOTE: we must run these tests in serial
You can’t perform that action at this time.
0 commit comments