.travis.yml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. matrix:
  13. include:
  14. - os: linux
  15. env: TARGET=x86_64-unknown-linux-gnu
  16. # Removed all other plaftorm builds sice the repo is growing in terms of activitly
  17. # and CI checks are taking long to start due to concurrent number of jobs
  18. # one job should be sufficient for doing all manners of checks and unit nets. Will defer
  19. # building all platform binanires and wasm blob to a different system.
  20. install:
  21. - rustup install nightly-2020-05-23
  22. - rustup target add wasm32-unknown-unknown --toolchain nightly-2020-05-23
  23. # travis installs rust using rustup with the "minimal" profile so these tools are not installed by default
  24. - rustup component add rustfmt
  25. # choosing to add clippy for the nightly toolchain only
  26. # becuase we want to run it with nighly to avoid having to set BUILD_DUMMY_WASM_BINARY=0
  27. # setting that variable requires changing it in a later run of cargo bulid to ensure runtime/build.rs
  28. # actually builds the runtime .. the behaviour is a bit odd so choosing to avoid messing with it.
  29. - rustup component add clippy
  30. before_script:
  31. - cargo fmt --all -- --check
  32. script:
  33. # we set release as build type for all steps to benefit from already compiled packages in prior steps
  34. # skipping clippy ...
  35. - BUILD_DUMMY_WASM_BINARY=1 cargo clippy --release --target=${TARGET} -- -D warnings
  36. - BUILD_DUMMY_WASM_BINARY=1 cargo test --release --verbose --all --target=${TARGET}
  37. - BUILD_DUMMY_WASM_BINARY=0 WASM_BUILD_TOOLCHAIN=nightly-2020-05-23 cargo build --release --target=${TARGET} -p joystream-node
  38. - ls -l ./target/${TARGET}/release/wbuild/joystream-node-runtime/
  39. before_deploy:
  40. - cp ./target/${TARGET}/release/joystream-node .
  41. - FILENAME=`./joystream-node --version | sed -e "s/ /-/g"`
  42. - tar -cf ${FILENAME}.tar ./joystream-node
  43. - gzip ${FILENAME}.tar
  44. - export ASSET=${FILENAME}.tar.gz
  45. deploy:
  46. - provider: releases
  47. api_key:
  48. secure: FfxZGQexxAGT0Skbctl1FuqmEvNHejPDPtNG8Du1ACSGjS7Y+M6o/aPqE6HL158AmddOgndsIPR+HM7VfMDAUMkLTbOhv3nMpDBZu1h25vwk+jHOM65tm5LWUu/ROWBpaAQiG7NKrvtfkNfbNBSETsEbWBt/DPrhlIfSbgsXBFDiid7uRrCiwvDUJ097/EUOJ9OVUrk+O4ebSzfIfKPGPtRU2rQQ0eNX7yX3TCm3jbQm/kplkQNRL9mnAJNxtKuvuko4LqZ6jN4XLoLTHUMjO7E0r6wXVB4GVjA4HA214eLlQD6BhgTbWMDxKgWyuKzPG+2GLKyluSSn0RurSl8tYryXKxKxuN3H1FX9r23a8AzGtpRACJtIePC2YmPuQRSnz2Bw8jlSP2WPLJtXGD036J/wVMj6W9TROm7IBigiC7QlqAqCYNByOnoKyhRCgYyAJZb0Jpa3qWaFhA6b6gCGhyH85QCcrc0q6JAB3oqH8Wfm/K2HVzBobmKaSFu5DpwInNnUXnLWGVzhSt3oCq6ld773izReGdLJtLC2vaJ9rZVaVw29s9M662EEuAGgaVLO/sinZJFeIIaCF4i4zUXwXSLIdfKXGOR0ZibkyT2FS6qPGvl/lLN5IREzD7v/rV8htGMLmw4jpPLNskvRjCHX42ewRRYdMvZzQQOAvSlWcsw=
  49. file: ${ASSET}
  50. on:
  51. tags: true
  52. repo: Joystream/joystream
  53. draft: true
  54. overwrite: true
  55. skip_cleanup: true
  56. - provider: releases
  57. api_key:
  58. secure: FfxZGQexxAGT0Skbctl1FuqmEvNHejPDPtNG8Du1ACSGjS7Y+M6o/aPqE6HL158AmddOgndsIPR+HM7VfMDAUMkLTbOhv3nMpDBZu1h25vwk+jHOM65tm5LWUu/ROWBpaAQiG7NKrvtfkNfbNBSETsEbWBt/DPrhlIfSbgsXBFDiid7uRrCiwvDUJ097/EUOJ9OVUrk+O4ebSzfIfKPGPtRU2rQQ0eNX7yX3TCm3jbQm/kplkQNRL9mnAJNxtKuvuko4LqZ6jN4XLoLTHUMjO7E0r6wXVB4GVjA4HA214eLlQD6BhgTbWMDxKgWyuKzPG+2GLKyluSSn0RurSl8tYryXKxKxuN3H1FX9r23a8AzGtpRACJtIePC2YmPuQRSnz2Bw8jlSP2WPLJtXGD036J/wVMj6W9TROm7IBigiC7QlqAqCYNByOnoKyhRCgYyAJZb0Jpa3qWaFhA6b6gCGhyH85QCcrc0q6JAB3oqH8Wfm/K2HVzBobmKaSFu5DpwInNnUXnLWGVzhSt3oCq6ld773izReGdLJtLC2vaJ9rZVaVw29s9M662EEuAGgaVLO/sinZJFeIIaCF4i4zUXwXSLIdfKXGOR0ZibkyT2FS6qPGvl/lLN5IREzD7v/rV8htGMLmw4jpPLNskvRjCHX42ewRRYdMvZzQQOAvSlWcsw=
  59. file: ${ASSET}
  60. on:
  61. branch: development
  62. repo: Joystream/joystream
  63. draft: true
  64. prerelease: true
  65. overwrite: true
  66. skip_cleanup: true