Merge pull request #9566 from zmstone/1216-fix-ci

1216 fix ci
This commit is contained in:
Zaiming (Stone) Shi 2022-12-16 11:04:45 +01:00 committed by GitHub
commit e8c2a3c8f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -116,7 +116,20 @@ emqx_test(){
fi
;;
"rpm")
yum install -y "${PACKAGE_PATH}/${packagename}"
# yum wants python2
if [[ "${SYSTEM:-}" == "amzn2" ]]; then
alternatives --list | grep python && alternatives --set python /usr/bin/python2
fi
YUM_RES="$(yum install -y "${PACKAGE_PATH}/${packagename}"| tee /dev/null)"
if [[ $YUM_RES =~ "Failed" ]]; then
echo "yum install failed"
exit 1
fi
# restore python3
if [[ "${SYSTEM:-}" == "amzn2" ]]; then
alternatives --list | grep python && alternatives --set python /usr/bin/python3
fi
if ! rpm -q "${PROFILE}" | grep -q "${PROFILE}"; then
echo "package install error"
exit 1

View File

@ -225,7 +225,7 @@ jobs:
path: .
- name: unzip source code
run: unzip -q source.zip
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: all