run_relup_tests.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. name: Release Upgrade Tests
  2. concurrency:
  3. group: relup-${{ github.event_name }}-${{ github.ref }}
  4. cancel-in-progress: true
  5. on:
  6. push:
  7. branches:
  8. - '**'
  9. tags:
  10. - v*
  11. - e*
  12. pull_request:
  13. jobs:
  14. relup_test:
  15. strategy:
  16. matrix:
  17. profile:
  18. - emqx
  19. - emqx-enterprise
  20. otp:
  21. - 24.2.1-1
  22. # no need to use more than 1 version of Elixir, since tests
  23. # run using only Erlang code. This is needed just to specify
  24. # the base image.
  25. elixir:
  26. - 1.13.3
  27. os:
  28. - ubuntu20.04
  29. arch:
  30. - amd64
  31. runs-on: ubuntu-20.04
  32. container: "ghcr.io/emqx/emqx-builder/5.0-10:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"
  33. defaults:
  34. run:
  35. shell: bash
  36. steps:
  37. - uses: actions/setup-python@v2
  38. with:
  39. python-version: '3.8'
  40. architecture: 'x64'
  41. - uses: actions/checkout@v2
  42. with:
  43. repository: emqx/paho.mqtt.testing
  44. ref: develop-4.0
  45. path: paho.mqtt.testing
  46. - uses: actions/checkout@v2
  47. with:
  48. repository: terry-xiaoyu/one_more_emqx
  49. ref: master
  50. path: one_more_emqx
  51. - uses: actions/checkout@v2
  52. with:
  53. repository: emqx/emqtt-bench
  54. ref: 0.3.4
  55. path: emqtt-bench
  56. - uses: actions/checkout@v2
  57. with:
  58. repository: hawk/lux
  59. ref: lux-2.6
  60. path: lux
  61. - uses: actions/checkout@v2
  62. with:
  63. repository: ${{ github.repository }}
  64. path: emqx
  65. fetch-depth: 0
  66. - name: Get old vsn
  67. run: echo "OLD_VSNS=$(emqx/scripts/relup-base-vsns.sh ${{ matrix.profile }} | xargs echo -n)" >> $GITHUB_ENV
  68. - name: Get deps git refs for cache
  69. id: deps-refs
  70. run: |
  71. cd emqx
  72. scripts/get-dep-refs.sh
  73. - name: load quicer cache
  74. uses: actions/cache@v2
  75. with:
  76. path: emqx/_build/default/lib/quicer/
  77. key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_QUICER_REF }}
  78. - name: build emqx
  79. env:
  80. PROFILE: ${{ matrix.profile }}
  81. run: make -C emqx ${PROFILE}-tgz
  82. - name: build emqtt-bench
  83. run: make -C emqtt-bench
  84. - name: build lux
  85. run: |
  86. set -e -u -x
  87. cd lux
  88. autoconf
  89. ./configure
  90. make
  91. make install
  92. - name: run relup test
  93. env:
  94. PROFILE: ${{ matrix.profile }}
  95. timeout-minutes: 20
  96. run: |
  97. set -e -x -u
  98. if [ -n "$OLD_VSNS" ]; then
  99. mkdir -p packages
  100. cp emqx/_packages/${PROFILE}/*.tar.gz packages
  101. cp emqx/_upgrade_base/*.tar.gz packages
  102. lux \
  103. --case_timeout infinity \
  104. --var PROFILE=$PROFILE \
  105. --var PACKAGE_PATH=$(pwd)/packages \
  106. --var BENCH_PATH=$(pwd)/emqtt-bench \
  107. --var ONE_MORE_EMQX_PATH=$(pwd)/one_more_emqx \
  108. --var VSN="$VSN" \
  109. --var OLD_VSNS="$OLD_VSNS" \
  110. emqx/.ci/fvt_tests/relup.lux
  111. fi
  112. - uses: actions/upload-artifact@v1
  113. if: failure()
  114. with:
  115. name: lux_logs
  116. path: lux_logs