joystream-node.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. name: joystream-node
  2. on:
  3. pull_request:
  4. jobs:
  5. benchmarking:
  6. name: Benchmarking
  7. runs-on: ubuntu-latest
  8. steps:
  9. - uses: actions/checkout@v1
  10. - uses: actions/setup-node@v1
  11. with:
  12. node-version: '14.x'
  13. - uses: technote-space/get-diff-action@v3
  14. with:
  15. PREFIX_FILTER: |
  16. node
  17. runtime-modules
  18. utils/chain-spec-builder
  19. SUFFIX_FILTER: |
  20. .rs
  21. FILES: |
  22. Cargo.lock
  23. Cargo.toml
  24. # TODO: Look for change in source code but no corresponding version bump of runtime or binaries
  25. # - name: Check version modified correctly
  26. # if: env.GIT_DIFF
  27. - name: Toolchains
  28. run: |
  29. ./setup.sh
  30. if: env.GIT_DIFF
  31. - name: Build
  32. run: |
  33. pushd node
  34. WASM_BUILD_TOOLCHAIN=nightly-2021-02-20 cargo +nightly-2021-02-20 build --release --features runtime-benchmarks
  35. popd
  36. if: env.GIT_DIFF
  37. - name: Generate Weights
  38. run: |
  39. ./scripts/generate-weights.sh 5 2
  40. # Show any changes in computed weights
  41. git diff
  42. if: env.GIT_DIFF
  43. # Build and test joystream-node with all runtime profiles
  44. runtime_profiles:
  45. name: Runtime Profiles
  46. runs-on: ubuntu-latest
  47. steps:
  48. - uses: actions/checkout@v1
  49. - uses: actions/setup-node@v1
  50. with:
  51. node-version: '14.x'
  52. - uses: technote-space/get-diff-action@v3
  53. with:
  54. PREFIX_FILTER: |
  55. node
  56. runtime-modules
  57. utils/chain-spec-builder
  58. SUFFIX_FILTER: |
  59. .rs
  60. FILES: |
  61. Cargo.lock
  62. Cargo.toml
  63. - name: Toolchains
  64. run: |
  65. ./setup.sh
  66. if: env.GIT_DIFF
  67. - name: Production Runtime
  68. run: |
  69. yarn cargo-checks && yarn cargo-build
  70. ./target/release/joystream-node --version
  71. if: env.GIT_DIFF
  72. - name: Staging Runtime
  73. env:
  74. RUNTIME_PROFILE: STAGING
  75. run: |
  76. yarn cargo-checks && yarn cargo-build
  77. ./target/release/joystream-node --version
  78. if: env.GIT_DIFF
  79. - name: Playground Runtime
  80. env:
  81. RUNTIME_PROFILE: PLAYGROUND
  82. run: |
  83. yarn cargo-checks && yarn cargo-build
  84. ./target/release/joystream-node --version
  85. if: env.GIT_DIFF
  86. - name: Testing Runtime
  87. env:
  88. RUNTIME_PROFILE: TESTING
  89. run: |
  90. yarn cargo-checks && yarn cargo-build
  91. ./target/release/joystream-node --version
  92. if: env.GIT_DIFF