build: test macos package in clean-ish environment

This commit is contained in:
Ivan Dyachkov 2022-09-12 11:09:28 +02:00
parent 4a192adf3d
commit f4c23bbad8
1 changed files with 7 additions and 2 deletions

View File

@ -141,7 +141,7 @@ jobs:
- name: prepare
run: |
brew update
brew install curl zip unzip kerl coreutils
brew install curl zip unzip kerl coreutils openssl@1.1
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
echo "/usr/local/bin" >> $GITHUB_PATH
echo "EMQX_NAME=${{ matrix.profile }}" >> $GITHUB_ENV
@ -150,7 +150,7 @@ jobs:
id: cache
with:
path: ~/.kerl/${{ matrix.otp }}
key: otp-install-${{ matrix.otp }}-${{ matrix.macos }}
key: otp-install-${{ matrix.otp }}-${{ matrix.macos }}-static-ssl
- name: build erlang
if: steps.cache.outputs.cache-hit != 'true'
timeout-minutes: 60
@ -176,6 +176,11 @@ jobs:
make ${{ matrix.profile }}-tgz
- name: test
run: |
# cleanup build-related packages to simulate clean environment
for f in $(brew list); do
brew uninstall --force --ignore-dependencies --zap --quiet $f
done
brew install curl
pkg_name=$(find _packages/${{ matrix.profile }} -mindepth 1 -maxdepth 1 -iname \*.tar.gz)
mkdir -p emqx
tar -C emqx -zxf $pkg_name