.travis.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. language: rust
  2. # Caching of the runtime .wasm blob poses a problem.
  3. # See: https://github.com/Joystream/joystream/issues/466
  4. # Always starting with a clean slate is probably better, it allows us to ensure
  5. # the WASM runtime is always rebuilt. It also allows us to detect when certain upstream dependencies
  6. # sometimes break the build. When cache is enabled do not use the produced WASM build.
  7. # This also means the binary should not be used to produce the final chainspec file (because the same
  8. # one is embedded in the binary)
  9. # cache: cargo
  10. rust: stable
  11. # Skip Rust build in a pull request if no rust project files were modified
  12. before_install:
  13. - |
  14. if [ "$TRAVIS_PULL_REQUEST" != "false" ]
  15. then
  16. if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE "(.rs|Cargo.(lock|toml))$"
  17. then
  18. echo "No changes to Rust or Cargo Files, CI not running."
  19. travis_terminate 0
  20. fi
  21. fi
  22. install:
  23. - rustup install nightly-2020-05-23 --force
  24. - rustup target add wasm32-unknown-unknown --toolchain nightly-2020-05-23
  25. # travis installs rust using rustup with the "minimal" profile so these tools are not installed by default
  26. - rustup component add rustfmt
  27. - rustup component add clippy
  28. before_script:
  29. - cargo fmt --all -- --check
  30. script:
  31. - export WASM_BUILD_TOOLCHAIN=nightly-2020-05-23
  32. - BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --all -- -D warnings
  33. - travis_wait 75 cargo test --release --verbose --all -- --ignored
  34. - cargo build --release
  35. - ls -l ./target/release/wbuild/joystream-node-runtime/
  36. - ./target/release/joystream-node --version
  37. - ./target/release/chain-spec-builder --version