You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.9 KiB

  1. language: rust
  2. sudo: false
  3. cache: cargo
  4. matrix:
  5. include:
  6. # Builds with wasm-pack.
  7. - rust: beta
  8. env: RUST_BACKTRACE=1
  9. addons:
  10. firefox: latest
  11. chrome: stable
  12. before_script:
  13. - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
  14. - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
  15. - cargo install-update -a
  16. - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
  17. script:
  18. - cargo generate --git . --name testing
  19. # Having a broken Cargo.toml (in that it has curlies in fields) anywhere
  20. # in any of our parent dirs is problematic.
  21. - mv Cargo.toml Cargo.toml.tmpl
  22. - cd testing
  23. - wasm-pack build
  24. - wasm-pack test --chrome --firefox --headless
  25. # Builds on nightly.
  26. - rust: nightly
  27. env: RUST_BACKTRACE=1
  28. before_script:
  29. - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
  30. - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
  31. - cargo install-update -a
  32. - rustup target add wasm32-unknown-unknown
  33. script:
  34. - cargo generate --git . --name testing
  35. - mv Cargo.toml Cargo.toml.tmpl
  36. - cd testing
  37. - cargo check
  38. - cargo check --target wasm32-unknown-unknown
  39. - cargo check --no-default-features
  40. - cargo check --target wasm32-unknown-unknown --no-default-features
  41. - cargo check --no-default-features --features console_error_panic_hook
  42. - cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
  43. - cargo check --no-default-features --features "console_error_panic_hook wee_alloc"
  44. - cargo check --target wasm32-unknown-unknown --no-default-features --features "console_error_panic_hook wee_alloc"
  45. # Builds on beta.
  46. - rust: beta
  47. env: RUST_BACKTRACE=1
  48. before_script:
  49. - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
  50. - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
  51. - cargo install-update -a
  52. - rustup target add wasm32-unknown-unknown
  53. script:
  54. - cargo generate --git . --name testing
  55. - mv Cargo.toml Cargo.toml.tmpl
  56. - cd testing
  57. - cargo check
  58. - cargo check --target wasm32-unknown-unknown
  59. - cargo check --no-default-features
  60. - cargo check --target wasm32-unknown-unknown --no-default-features
  61. - cargo check --no-default-features --features console_error_panic_hook
  62. - cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
  63. # Note: no enabling the `wee_alloc` feature here because it requires
  64. # nightly for now.