.travis.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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-07-12 --force
  24. - rustup install nightly-2020-05-23 --force
  25. - rustup target add wasm32-unknown-unknown --toolchain nightly-2020-05-23
  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 --toolchain nightly-2020-07-12
  29. before_script:
  30. - cargo fmt --all -- --check
  31. script:
  32. - export WASM_BUILD_TOOLCHAIN=nightly-2020-05-23
  33. - BUILD_DUMMY_WASM_BINARY=1 cargo +nightly-2020-07-12 clippy --release --all -- -D warnings
  34. - travis_wait 75 cargo +nightly-2020-07-12 test --release --verbose --all -- --ignored
  35. - cargo +nightly-2020-07-12 build --release
  36. - ls -l ./target/release/wbuild/joystream-node-runtime/
  37. - ./target/release/joystream-node --version
  38. - ./target/release/chain-spec-builder --version