run_relup_tests.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. runs-on: aws-amd64
  16. strategy:
  17. matrix:
  18. profile:
  19. - emqx
  20. - emqx-enterprise
  21. otp:
  22. - 24.2.1-1
  23. # no need to use more than 1 version of Elixir, since tests
  24. # run using only Erlang code. This is needed just to specify
  25. # the base image.
  26. elixir:
  27. - 1.13.4
  28. os:
  29. - ubuntu20.04
  30. arch:
  31. - amd64
  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: AutoModality/action-clean@v1
  38. - uses: actions/setup-python@v2
  39. with:
  40. python-version: '3.8'
  41. architecture: 'x64'
  42. - uses: actions/checkout@v2
  43. with:
  44. repository: emqx/paho.mqtt.testing
  45. ref: develop-4.0
  46. path: paho.mqtt.testing
  47. - uses: actions/checkout@v2
  48. with:
  49. repository: emqx/emqtt-bench
  50. ref: 0.3.4
  51. path: emqtt-bench
  52. - uses: actions/checkout@v2
  53. with:
  54. repository: hawk/lux
  55. ref: lux-2.6
  56. path: lux
  57. - uses: actions/checkout@v2
  58. with:
  59. repository: ${{ github.repository }}
  60. path: emqx
  61. fetch-depth: 0
  62. - name: Get old vsn
  63. run: |
  64. set -x
  65. echo "OLD_VSNS=$(emqx/scripts/relup-base-vsns.sh ${{ matrix.profile }} | xargs echo -n)" >> $GITHUB_ENV
  66. echo "NOW_VSN=$(emqx/pkg-vsn.sh ${{ matrix.profile }})" >> $GITHUB_ENV
  67. - name: build emqx
  68. env:
  69. PROFILE: ${{ matrix.profile }}
  70. run: make -C emqx ${PROFILE}-tgz
  71. - name: build emqtt-bench
  72. run: make -C emqtt-bench
  73. - name: build lux
  74. run: |
  75. set -e -u -x
  76. cd lux
  77. autoconf
  78. ./configure
  79. make
  80. make install
  81. - name: run relup test
  82. env:
  83. PROFILE: ${{ matrix.profile }}
  84. timeout-minutes: 20
  85. run: |
  86. set -e -x -u
  87. if [ -n "$OLD_VSNS" ]; then
  88. mkdir -p packages
  89. cp emqx/_packages/${PROFILE}/*.tar.gz packages/
  90. cp emqx/_upgrade_base/*.tar.gz packages/
  91. lux \
  92. --case_timeout infinity \
  93. --var PROFILE=$PROFILE \
  94. --var PACKAGE_PATH=$(pwd)/packages \
  95. --var BENCH_PATH=$(pwd)/emqtt-bench \
  96. --var VSN="$NOW_VSN" \
  97. --var OLD_VSNS="$OLD_VSNS" \
  98. emqx/.ci/fvt_tests/relup.lux
  99. fi
  100. - uses: actions/upload-artifact@v1
  101. if: failure()
  102. with:
  103. name: lux_logs
  104. path: lux_logs
  105. - uses: actions/upload-artifact@v1
  106. if: failure()
  107. with:
  108. name: packages
  109. path: packages