From b9c913d18f4632ab4147588b51aa3d5d34019efd Mon Sep 17 00:00:00 2001 From: zhanghongtong Date: Tue, 23 Mar 2021 16:40:23 +0800 Subject: [PATCH] chore(CI): fix windows build error --- .github/workflows/build_packages.yaml | 11 ++++++++--- .github/workflows/run_fvt_tests.yaml | 1 - deploy/packages/rpm/Makefile | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_packages.yaml b/.github/workflows/build_packages.yaml index 8a7f77498..ecd672a98 100644 --- a/.github/workflows/build_packages.yaml +++ b/.github/workflows/build_packages.yaml @@ -55,6 +55,7 @@ jobs: runs-on: windows-2019 needs: prepare + if: endsWith(github.repository, 'emqx') strategy: matrix: @@ -91,16 +92,20 @@ jobs: cd source ## We do not build/release bcrypt for windows package Remove-Item -Recurse -Force -Path _build/default/lib/bcrypt/ - Remove-Item -Force -Path rebar.lock + if (Test-Path rebar.lock) { + Remove-Item -Force -Path rebar.lock + } make ${{ matrix.profile }} mkdir -p _packages/${{ matrix.profile }} Compress-Archive -Path _build/${{ matrix.profile }}/rel/emqx -DestinationPath _build/${{ matrix.profile }}/rel/$pkg_name mv _build/${{ matrix.profile }}/rel/$pkg_name _packages/${{ matrix.profile }} Get-FileHash -Path "_packages/${{ matrix.profile }}/$pkg_name" | Format-List | grep 'Hash' | awk '{print $3}' > _packages/${{ matrix.profile }}/$pkg_name.sha256 - name: run emqx + timeout-minutes: 1 run: | cd source ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start + Start-Sleep -s 5 ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx stop ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx install ./_build/${{ matrix.profile }}/rel/emqx/bin/emqx uninstall @@ -348,7 +353,7 @@ jobs: delete-artifact: runs-on: ubuntu-20.04 - needs: [prepare, windows, mac, linux, docker] + needs: [prepare, mac, linux, docker] steps: - uses: geekyeggo/delete-artifact@v1 with: @@ -359,7 +364,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') - needs: [prepare, windows, mac, linux, docker] + needs: [prepare, mac, linux, docker] strategy: matrix: diff --git a/.github/workflows/run_fvt_tests.yaml b/.github/workflows/run_fvt_tests.yaml index a3568350a..6aa1e6844 100644 --- a/.github/workflows/run_fvt_tests.yaml +++ b/.github/workflows/run_fvt_tests.yaml @@ -138,7 +138,6 @@ jobs: emqx2=$(kubectl get pods emqx-2 -o jsonpath='{.status.podIP}') pytest -v paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host $emqx_svc - pytest -v paho.mqtt.testing/interoperability/test_client --host $emqx_svc pytest -v paho.mqtt.testing/interoperability/test_cluster --host1 $emqx1 --host2 $emqx2 relup_test: diff --git a/deploy/packages/rpm/Makefile b/deploy/packages/rpm/Makefile index ae4bd37df..5a6e6bee4 100644 --- a/deploy/packages/rpm/Makefile +++ b/deploy/packages/rpm/Makefile @@ -1,5 +1,4 @@ # Keep this short to avoid bloating beam files with long file path info -ARCH ?= amd64 TOPDIR := /tmp/emqx SRCDIR := $(TOPDIR)/$(PKG_VSN) BUILT := $(SRCDIR)/BUILT @@ -9,6 +8,7 @@ space := $(none) $(none) RPM_VSN ?= $(shell echo $(PKG_VSN) | grep -oE "[0-9]+\.[0-9]+(\.[0-9]+)?") RPM_REL ?= $(shell echo $(PKG_VSN) | grep -oE "(alpha|beta|rc)\.[0-9]") +ARCH ?= amd64 ifeq ($(ARCH),mips64) ARCH:=mips64el endif