run_relup_tests.yaml 2.8 KB

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