.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:
  11. - stable
  12. # Skip Rust build in a pull request if no rust project files were modified
  13. before_install:
  14. - |
  15. if [ "$TRAVIS_PULL_REQUEST" != "false" ]
  16. then
  17. if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE "(.rs|Cargo.(lock|toml))$"
  18. then
  19. echo "No changes to Rust or Cargo Files, CI not running."
  20. travis_terminate 0
  21. fi
  22. fi
  23. install:
  24. - rustup install nightly
  25. - rustup target add wasm32-unknown-unknown --toolchain nightly
  26. # travis installs rust using rustup with the "minimal" profile so these tools are not installed by default
  27. - rustup component add rustfmt
  28. - rustup component add clippy
  29. before_script:
  30. - cargo fmt --all -- --check
  31. script:
  32. # we set release as build type for all steps to benefit from already compiled packages in prior steps
  33. - BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release -- -D warnings
  34. - BUILD_DUMMY_WASM_BINARY=1 cargo test --release
  35. - TRIGGER_WASM_BUILD=1 cargo build --release
  36. - ls -l ./target/release/wbuild/joystream-node-runtime/
  37. - ./target/release/joystream-node --version