ci: some more fixes

This commit is contained in:
Ivan Dyachkov 2023-08-02 17:11:54 +02:00
parent 38809ffd4b
commit 3c4d5bdde7
14 changed files with 80 additions and 69 deletions

View File

@ -14,9 +14,9 @@ runs:
name: emqx-docker
path: /tmp
- name: load docker image
shell: bash
env:
PKG_VSN: ${{ inputs.version-emqx }}
shell: bash
run: |
EMQX_DOCKER_IMAGE_TAG=$(docker load < /tmp/emqx-docker-${PKG_VSN}.tar.gz | sed 's/Loaded image: //g')
echo "_EMQX_DOCKER_IMAGE_TAG=$EMQX_DOCKER_IMAGE_TAG" >> $GITHUB_ENV
@ -36,9 +36,9 @@ runs:
with:
name: apache-jmeter.tgz
- name: install jmeter
shell: bash
env:
JMETER_VERSION: 5.4.3
shell: bash
run: |
tar -xf apache-jmeter.tgz
ln -s apache-jmeter-$JMETER_VERSION jmeter

View File

@ -5,11 +5,16 @@ on:
env:
IS_CI: "yes"
OTP_VSN: "25.3.2-1"
ELIXIR_VSN: "1.14.5"
BUILDER_VSN: "25.3.2-1"
BUILDER: "ghcr.io/emqx/emqx-builder/5.1-3:1.14.5-25.3.2-1-ubuntu22.04"
RUNNER: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
jobs:
sanity-checks:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
container: ghcr.io/emqx/emqx-builder/5.1-3:1.14.5-25.3.2-1-ubuntu22.04
runs-on: ${{ env.RUNNER }}
container: ${{ env.BUILDER }}
outputs:
ct-matrix: ${{ steps.matrix.outputs.ct-matrix }}
ct-host: ${{ steps.matrix.outputs.ct-host }}
@ -29,14 +34,14 @@ jobs:
MATRIX="$(echo "${APPS}" | jq -c '
[
(.[] | select(.profile == "emqx") | . + {
builder: "5.1-3",
otp: "25.3.2-1",
elixir: "1.14.5"
builder: "${BUILDER_VSN}",
otp: "${OTP_VSN}",
elixir: "${ELIXIR_VSN}"
}),
(.[] | select(.profile == "emqx-enterprise") | . + {
builder: "5.1-3",
otp: ["25.3.2-1"][],
elixir: "1.14.5"
builder: "${BUILDER_VSN}",
otp: ["${OTP_VSN}"][],
elixir: "${ELIXIR_VSN}"
})
]
')"
@ -51,9 +56,10 @@ jobs:
echo "version-emqx-enterprise=$(./pkg-vsn.sh emqx-enterprise)" | tee -a $GITHUB_OUTPUT
compile:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
container: ghcr.io/emqx/emqx-builder/5.1-3:1.14.5-25.3.2-1-ubuntu22.04
needs: [sanity-checks]
runs-on: ${{ env.RUNNER }}
container: ${{ env.BUILDER }}
needs:
- sanity-checks
strategy:
matrix:
profile:
@ -80,15 +86,15 @@ jobs:
path: ${{ matrix.profile }}.zip
retention-days: 1
# run_test_cases:
# needs:
# - sanity-checks
# - compile
# uses: ./.github/workflows/run_test_cases.yaml
# with:
# ct-matrix: ${{ needs.sanity-checks.outputs.ct-matrix }}
# ct-host: ${{ needs.sanity-checks.outputs.ct-host }}
# ct-docker: ${{ needs.sanity-checks.outputs.ct-docker }}
run_test_cases:
needs:
- sanity-checks
- compile
uses: ./.github/workflows/run_test_cases.yaml
with:
ct-matrix: ${{ needs.sanity-checks.outputs.ct-matrix }}
ct-host: ${{ needs.sanity-checks.outputs.ct-host }}
ct-docker: ${{ needs.sanity-checks.outputs.ct-docker }}
static_checks:
needs:

View File

@ -36,8 +36,6 @@ jobs:
runs-on: ubuntu-latest
env:
EMQX_NAME: ${{ matrix.profile }}
OTP_VSN: 25.3.2-1
ELIXIR_VSN: 1.14.5
PKG_VSN: ${{ matrix.profile == 'emqx-enterprise' && inputs.version-emqx-enterprise || inputs.version-emqx }}
strategy:

View File

@ -26,7 +26,7 @@ on:
jobs:
linux:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
env:
EMQX_NAME: ${{ matrix.profile[0] }}
@ -38,12 +38,8 @@ jobs:
- ["emqx", "25.3.2-1", "ubuntu22.04", "elixir"]
- ["emqx-enterprise", "25.3.2-1", "amzn2023", "erlang"]
- ["emqx-enterprise", "25.3.2-1", "ubuntu20.04", "erlang"]
builder:
- 5.1-3
elixir:
- '1.14.5'
container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.profile[1] }}-${{ matrix.profile[2] }}"
container: "ghcr.io/emqx/emqx-builder/${{ env.BUILDER }}:${{ env.ELIXIR }}-${{ matrix.profile[1] }}-${{ matrix.profile[2] }}"
steps:
- uses: AutoModality/action-clean@v1
@ -142,10 +138,10 @@ jobs:
- emqx
- emqx-enterprise
otp:
- 25.3.2-1
- ${{ env.OTP_VSN }}
os:
- macos-11
- macos-12-arm64
- macos-13
runs-on: ${{ matrix.os }}
env:

View File

@ -5,8 +5,8 @@ on:
jobs:
check_deps_integrity:
runs-on: aws-amd64
container: ghcr.io/emqx/emqx-builder/5.1-1:1.14.5-25.3.2-1-ubuntu22.04
runs-on: ${{ env.RUNNER }}
container: ${{ env.BUILDER }}
steps:
- uses: actions/checkout@v3
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

View File

@ -13,13 +13,13 @@ on:
jobs:
elixir_release_build:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
container: ${{ env.BUILDER }}
strategy:
matrix:
profile:
- emqx
- emqx-enterprise
container: ghcr.io/emqx/emqx-builder/5.1-3:1.14.5-25.3.2-1-ubuntu22.04
steps:
- uses: actions/download-artifact@v3
with:

View File

@ -17,19 +17,16 @@ on:
# - e*
# pull_request:
env:
IS_CI: "yes"
jobs:
run_conf_tests:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
container: ${{ env.BUILDER }}
strategy:
fail-fast: false
matrix:
profile:
- emqx
- emqx-enterprise
container: "ghcr.io/emqx/emqx-builder/5.1-3:1.14.5-25.3.2-1-ubuntu22.04"
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/download-artifact@v3

View File

@ -25,7 +25,7 @@ on:
jobs:
basic-tests:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false
@ -48,7 +48,7 @@ jobs:
path: /tmp
- name: load docker image
run: |
EMQX_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz | sed 's/Loaded image: //g')
EMQX_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz 2>/dev/null | sed 's/Loaded image: //g')
echo "EMQX_IMAGE_TAG=$EMQX_IMAGE_TAG" >> $GITHUB_ENV
- name: test two nodes cluster with proto_dist=inet_tls in docker
run: |
@ -68,10 +68,10 @@ jobs:
docker compose rm -fs
pytest:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
env:
EMQX_NAME: ${{ matrix.profile[0] }}
PKG_VSN: ${{ matrix.profile[0] == 'emqx-enterprise' && inputs.version-emqx-enterprise || inputs.version-emqx }}
EMQX_NAME: ${{ matrix.profile }}
PKG_VSN: ${{ matrix.profile == 'emqx-enterprise' && inputs.version-emqx-enterprise || inputs.version-emqx }}
DB_BACKEND: ${{ matrix.cluster_db_backend }}
strategy:
@ -93,7 +93,7 @@ jobs:
path: /tmp
- name: load docker image
run: |
EMQX_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz | sed 's/Loaded image: //g')
EMQX_IMAGE_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz 2>/dev/null | sed 's/Loaded image: //g')
echo "EMQX_IMAGE_TAG=$EMQX_IMAGE_TAG" >> $GITHUB_ENV
- name: run emqx
timeout-minutes: 5

View File

@ -50,7 +50,7 @@ jobs:
path: /tmp
- name: load docker image
run: |
EMQX_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz | sed 's/Loaded image: //g')
EMQX_TAG=$(docker load < /tmp/${EMQX_NAME}-${PKG_VSN}.tar.gz 2>/dev/null | sed 's/Loaded image: //g')
echo "EMQX_TAG=$EMQX_TAG" >> $GITHUB_ENV
echo "TARGET=emqx/${EMQX_NAME}" >> $GITHUB_ENV
- run: minikube start

View File

@ -16,7 +16,7 @@ on:
jobs:
jmeter_artifact:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
steps:
- uses: AutoModality/action-clean@v1
- name: Cache Jmeter
@ -46,7 +46,7 @@ jobs:
path: /tmp/apache-jmeter.tgz
advanced_feat:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false
@ -103,7 +103,7 @@ jobs:
path: ./jmeter_logs
pgsql_authn_authz:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false
@ -181,7 +181,7 @@ jobs:
path: ./jmeter_logs
mysql_authn_authz:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false
@ -252,7 +252,7 @@ jobs:
path: ./jmeter_logs
JWT_authn:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false
@ -295,7 +295,7 @@ jobs:
-c "java -jar jwkserver-0.0.1.jar"
- name: run jmeter
run: |
/opt/jmeter/bin/jmeter.sh \
jmeter/bin/jmeter.sh \
-Jjmeter.save.saveservice.output_format=xml -n \
-t scripts/broker-autotest-suite/${{ matrix.scripts_type }}.jmx \
-Demqx_ip=$HAPROXY_IP \
@ -315,7 +315,7 @@ jobs:
path: ./jmeter_logs
built_in_database_authn_authz:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false

View File

@ -16,8 +16,8 @@ on:
jobs:
relup_test_plan:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
container: "ghcr.io/emqx/emqx-builder/5.1-3:1.14.5-25.3.2-1-ubuntu22.04"
runs-on: ${{ env.RUNNER }}
container: ${{ env.BUILDER }}
outputs:
CUR_EE_VSN: ${{ steps.find-versions.outputs.CUR_EE_VSN }}
OLD_VERSIONS: ${{ steps.find-versions.outputs.OLD_VERSIONS }}
@ -60,12 +60,11 @@ jobs:
needs:
- relup_test_plan
if: needs.relup_test_plan.outputs.OLD_VERSIONS != '[]'
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
old_vsn: ${{ fromJson(needs.relup_test_plan.outputs.OLD_VERSIONS) }}
container: "ghcr.io/emqx/emqx-builder/5.1-3:1.14.5-25.3.2-1-ubuntu22.04"
env:
OLD_VSN: "${{ matrix.old_vsn }}"
CUR_EE_VSN: "${{ needs.relup_test_plan.outputs.CUR_EE_VSN }}"
@ -73,7 +72,22 @@ jobs:
run:
shell: bash
steps:
- uses: AutoModality/action-clean@v1
- uses: erlef/setup-beam@v1.15.4
with:
otp-version: 25.3.2
- uses: actions/checkout@v3
with:
repository: hawk/lux
ref: lux-2.8.1
path: lux
- name: Install lux
run: |
set -e -u -x
cd lux
autoconf
./configure
make
echo "$(pwd)/bin" >> $GITHUB_PATH
- uses: actions/download-artifact@v3
name: Download built emqx and test scenario
with:

View File

@ -32,7 +32,7 @@ env:
jobs:
eunit_and_proper:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false
matrix:
@ -72,7 +72,7 @@ jobs:
path: _build/test/cover
ct_docker:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false
matrix:
@ -119,7 +119,7 @@ jobs:
path: _build/test/logs
ct:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false
matrix:
@ -164,8 +164,8 @@ jobs:
- eunit_and_proper
- ct
- ct_docker
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
container: "ghcr.io/emqx/emqx-builder/5.1-3:1.14.5-25.3.2-1-ubuntu22.04"
runs-on: ${{ env.RUNNER }}
container: ${{ env.BUILDER }}
strategy:
fail-fast: false
matrix:
@ -205,7 +205,7 @@ jobs:
# do this in a separate job
upload_coverdata:
needs: make_cover
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
steps:
- name: Coveralls Finished
env:

View File

@ -31,7 +31,7 @@ jobs:
profile:
- emqx
- emqx-enterprise
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
steps:
- uses: actions/download-artifact@v3
with:

View File

@ -26,7 +26,7 @@ env:
jobs:
static_checks:
runs-on: ${{ github.repository_owner == 'emqx' && 'aws-amd64' || 'ubuntu-22.04' }}
runs-on: ${{ env.RUNNER }}
strategy:
fail-fast: false
matrix: