Update CI.

This commit is contained in:
Stephen Chung 2021-10-23 18:16:51 +08:00
parent 4e965c3f3f
commit dac99a9907
2 changed files with 17 additions and 15 deletions

View File

@ -4,7 +4,7 @@ on:
push: push:
branches: branches:
- master - master
- bug-fixes - v1.1-fixes
pull_request: {} pull_request: {}
jobs: jobs:
@ -19,22 +19,22 @@ jobs:
flags: flags:
- "" - ""
- "--features metadata,serde,internals" - "--features metadata,serde,internals"
- "--features unchecked" - "--features unchecked,serde,metadata,internals"
- "--features sync" - "--features sync,serde,metadata,internals"
- "--features no_position" - "--features no_position,serde,metadata,internals"
- "--features no_optimize" - "--features no_optimize,serde,metadata,internals"
- "--features no_float" - "--features no_float,serde,metadata,internals"
- "--features f32_float,serde,metadata,internals" - "--features f32_float,serde,metadata,internals"
- "--features decimal" - "--features decimal,serde,metadata,internals"
- "--features no_float,decimal" - "--features no_float,decimal"
- "--tests --features only_i32,serde,metadata,internals" - "--tests --features only_i32,serde,metadata,internals"
- "--features only_i64" - "--features only_i64,serde,metadata,internals"
- "--features no_index" - "--features no_index,serde,metadata,internals"
- "--features no_object" - "--features no_object,serde,metadata,internals"
- "--features no_function" - "--features no_function,serde,metadata,internals"
- "--features no_module" - "--features no_module,serde,metadata,internals"
- "--features no_closure" - "--features no_closure,serde,metadata,internals"
- "--features unicode-xid-ident" - "--features unicode-xid-ident,serde,metadata,internals"
- "--features sync,no_function,no_float,no_position,no_optimize,no_module,no_closure,metadata,serde,unchecked" - "--features sync,no_function,no_float,no_position,no_optimize,no_module,no_closure,metadata,serde,unchecked"
- "--features no_function,no_float,no_position,no_index,no_object,no_optimize,no_module,no_closure,unchecked" - "--features no_function,no_float,no_position,no_index,no_object,no_optimize,no_module,no_closure,unchecked"
toolchain: [stable] toolchain: [stable]

View File

@ -1,10 +1,11 @@
#[cfg(not(feature = "serde"))] #[cfg(any(not(feature = "serde"), feature = "no_object"))]
fn main() { fn main() {
println!("This example requires the 'serde' feature to run."); println!("This example requires the 'serde' feature to run.");
println!("Try: cargo run --features serde --example serde"); println!("Try: cargo run --features serde --example serde");
} }
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
#[cfg(not(feature = "no_object"))]
fn main() { fn main() {
example::ser(); example::ser();
println!(); println!();
@ -12,6 +13,7 @@ fn main() {
} }
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
#[cfg(not(feature = "no_object"))]
mod example { mod example {
use rhai::serde::{from_dynamic, to_dynamic}; use rhai::serde::{from_dynamic, to_dynamic};
use rhai::{Dynamic, Engine, Map}; use rhai::{Dynamic, Engine, Map};