.travis.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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
  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. # we set release as build type for all steps to benefit from already compiled packages in prior steps
  32. - BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release -- -D warnings
  33. - BUILD_DUMMY_WASM_BINARY=1 cargo test --release --verbose --all
  34. - TRIGGER_WASM_BUILD=1 WASM_BUILD_TOOLCHAIN=nightly-2020-05-23 cargo build --release -p joystream-node
  35. - ls -l ./target/release/wbuild/joystream-node-runtime/
  36. - ./target/release/joystream-node --version