run_relup_tests.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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.4
  27. os:
  28. - ubuntu20.04
  29. arch:
  30. - amd64
  31. runs-on: ubuntu-20.04
  32. container: "ghcr.io/emqx/emqx-builder/5.0-16:${{ 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. run: echo "VSN=$(emqx/pkg-vsn.sh ${{ matrix.profile }})" >> $GITHUB_ENV
  69. - name: build emqx
  70. env:
  71. PROFILE: ${{ matrix.profile }}
  72. run: make -C emqx ${PROFILE}-tgz
  73. - name: build emqtt-bench
  74. run: make -C emqtt-bench
  75. - name: build lux
  76. run: |
  77. set -e -u -x
  78. cd lux
  79. autoconf
  80. ./configure
  81. make
  82. make install
  83. - name: run relup test
  84. env:
  85. PROFILE: ${{ matrix.profile }}
  86. timeout-minutes: 20
  87. run: |
  88. set -e -x -u
  89. if [ -n "$OLD_VSNS" ]; then
  90. mkdir -p packages
  91. cp emqx/_packages/${PROFILE}/*.tar.gz packages
  92. cp emqx/_upgrade_base/*.tar.gz packages
  93. lux \
  94. --case_timeout infinity \
  95. --var PROFILE=$PROFILE \
  96. --var PACKAGE_PATH=$(pwd)/packages \
  97. --var BENCH_PATH=$(pwd)/emqtt-bench \
  98. --var ONE_MORE_EMQX_PATH=$(pwd)/one_more_emqx \
  99. --var VSN="$VSN" \
  100. --var OLD_VSNS="$OLD_VSNS" \
  101. emqx/.ci/fvt_tests/relup.lux
  102. fi
  103. - uses: actions/upload-artifact@v1
  104. if: failure()
  105. with:
  106. name: lux_logs
  107. path: lux_logs