From ad9ccdbdfbbd287a3a4b7d504ab5aa15e7fdd095 Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Fri, 11 Oct 2019 14:51:00 -0400 Subject: [PATCH 1/9] Add web targets to travis --- .travis.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index aaa56d9ea2..c5f976182b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,14 @@ matrix: os: osx rust: stable + # wasm stdweb + - env: TARGET=wasm32-unknown-unknown WEB=web FEATURES=stdweb + os: linux + rust: stable + - env: TARGET=wasm32-unknown-unknown FEATURES=web-sys + os: linux + rust: stable + install: - rustup self update - rustup target add $TARGET; true @@ -66,11 +74,14 @@ install: script: - cargo +stable fmt --all -- --check - - cargo build --target $TARGET --verbose - - cargo build --target $TARGET --features serde --verbose + # Install cargo-web to build stdweb + - if [[ $WEB = "web" ]] cargo install -f cargo-web + - cargo $WEB build --target $TARGET --features $FEATURES --verbose fi + - cargo $WEB build --target $TARGET --features serde,$FEATURES --verbose fi # Running iOS apps on macOS requires the Simulator so we skip that for now - - if [[ $TARGET != *-apple-ios ]]; then cargo test --target $TARGET --verbose; fi - - if [[ $TARGET != *-apple-ios ]]; then cargo test --target $TARGET --features serde --verbose; fi + # The web targets also don't support running tests + - if [[ $TARGET != *-apple-ios && $TARGET != wasm32-* ]]; then cargo test --target $TARGET --verbose; fi + - if [[ $TARGET != *-apple-ios && $TARGET != wasm32-* ]]; then cargo test --target $TARGET --features serde --verbose; fi after_success: - | From cfc56f9576463c50fe83bd96a642f9da1ee43dff Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Fri, 11 Oct 2019 15:20:07 -0400 Subject: [PATCH 2/9] Fix some bash syntax --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c5f976182b..ca02445f52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,9 +75,9 @@ install: script: - cargo +stable fmt --all -- --check # Install cargo-web to build stdweb - - if [[ $WEB = "web" ]] cargo install -f cargo-web - - cargo $WEB build --target $TARGET --features $FEATURES --verbose fi - - cargo $WEB build --target $TARGET --features serde,$FEATURES --verbose fi + - if [[ $WEB = "web" ]]; then cargo install -f cargo-web fi + - cargo $WEB build --target $TARGET --features $FEATURES --verbose + - cargo $WEB build --target $TARGET --features serde,$FEATURES --verbose # Running iOS apps on macOS requires the Simulator so we skip that for now # The web targets also don't support running tests - if [[ $TARGET != *-apple-ios && $TARGET != wasm32-* ]]; then cargo test --target $TARGET --verbose; fi From 47b14a22eb71f7e48159ccd159d8a0cd08ebd732 Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Fri, 11 Oct 2019 16:06:53 -0400 Subject: [PATCH 3/9] Avoid crash on providing no features --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ca02445f52..df4355a317 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,7 +76,11 @@ script: - cargo +stable fmt --all -- --check # Install cargo-web to build stdweb - if [[ $WEB = "web" ]]; then cargo install -f cargo-web fi - - cargo $WEB build --target $TARGET --features $FEATURES --verbose + - if [[ -e $FEATURES ]]; then + cargo $WEB build --target $TARGET --verbose + else + cargo $WEB build --target $TARGET --features $FEATURES --verbose + fi - cargo $WEB build --target $TARGET --features serde,$FEATURES --verbose # Running iOS apps on macOS requires the Simulator so we skip that for now # The web targets also don't support running tests From b76f790559e5f0290e5a64dde7f673e74e261f43 Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Fri, 11 Oct 2019 17:01:45 -0400 Subject: [PATCH 4/9] Fix syntax error --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index df4355a317..2fb1d1e4cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -75,7 +75,7 @@ install: script: - cargo +stable fmt --all -- --check # Install cargo-web to build stdweb - - if [[ $WEB = "web" ]]; then cargo install -f cargo-web fi + - if [[ $WEB = "web" ]]; then cargo install -f cargo-web; fi - if [[ -e $FEATURES ]]; then cargo $WEB build --target $TARGET --verbose else From f28a25354b223ff235493f3968715f0599183c26 Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Fri, 11 Oct 2019 18:16:51 -0400 Subject: [PATCH 5/9] Syntax? --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2fb1d1e4cb..9ef28dd51c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -77,9 +77,9 @@ script: # Install cargo-web to build stdweb - if [[ $WEB = "web" ]]; then cargo install -f cargo-web; fi - if [[ -e $FEATURES ]]; then - cargo $WEB build --target $TARGET --verbose + cargo $WEB build --target $TARGET --verbose; else - cargo $WEB build --target $TARGET --features $FEATURES --verbose + cargo $WEB build --target $TARGET --features $FEATURES --verbose; fi - cargo $WEB build --target $TARGET --features serde,$FEATURES --verbose # Running iOS apps on macOS requires the Simulator so we skip that for now From 2a600d53e406a707d958ceee6773d89952695a88 Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Sat, 12 Oct 2019 10:02:17 -0400 Subject: [PATCH 6/9] Fix pleas --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9ef28dd51c..a95c0bbd71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -77,9 +77,9 @@ script: # Install cargo-web to build stdweb - if [[ $WEB = "web" ]]; then cargo install -f cargo-web; fi - if [[ -e $FEATURES ]]; then - cargo $WEB build --target $TARGET --verbose; - else cargo $WEB build --target $TARGET --features $FEATURES --verbose; + else + cargo $WEB build --target $TARGET --verbose; fi - cargo $WEB build --target $TARGET --features serde,$FEATURES --verbose # Running iOS apps on macOS requires the Simulator so we skip that for now From 2efba1257d003c504f52fa2687e67876b1f5f081 Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Sat, 12 Oct 2019 10:17:33 -0400 Subject: [PATCH 7/9] Fix features check --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a95c0bbd71..6bc318a69c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,10 +76,10 @@ script: - cargo +stable fmt --all -- --check # Install cargo-web to build stdweb - if [[ $WEB = "web" ]]; then cargo install -f cargo-web; fi - - if [[ -e $FEATURES ]]; then - cargo $WEB build --target $TARGET --features $FEATURES --verbose; - else + - if [[ -z "$FEATURES" ]]; then cargo $WEB build --target $TARGET --verbose; + else + cargo $WEB build --target $TARGET --features $FEATURES --verbose; fi - cargo $WEB build --target $TARGET --features serde,$FEATURES --verbose # Running iOS apps on macOS requires the Simulator so we skip that for now From c85951646eba2424d2a6abc860244b2182ab0013 Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Sat, 12 Oct 2019 12:19:25 -0400 Subject: [PATCH 8/9] Add a comment --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6bc318a69c..55c56d1c50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,6 +76,7 @@ script: - cargo +stable fmt --all -- --check # Install cargo-web to build stdweb - if [[ $WEB = "web" ]]; then cargo install -f cargo-web; fi + # Build without serde then with serde - if [[ -z "$FEATURES" ]]; then cargo $WEB build --target $TARGET --verbose; else From 6bfac82a2063631de17ff70a7f3136ae136dfd5c Mon Sep 17 00:00:00 2001 From: Ryan Goldstein Date: Sat, 12 Oct 2019 12:56:15 -0400 Subject: [PATCH 9/9] Add nightly builds --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 55c56d1c50..7a73219ba8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,9 +62,16 @@ matrix: - env: TARGET=wasm32-unknown-unknown WEB=web FEATURES=stdweb os: linux rust: stable + - env: TARGET=wasm32-unknown-unknown WEB=web FEATURES=stdweb + os: linux + rust: nightly + # wasm web-sys - env: TARGET=wasm32-unknown-unknown FEATURES=web-sys os: linux rust: stable + - env: TARGET=wasm32-unknown-unknown FEATURES=web-sys + os: linux + rust: nightly install: - rustup self update