chore(CI): use cache for mac

This commit is contained in:
zhanghongtong 2021-05-08 13:59:24 +08:00 committed by Yudai Kiyofuji
parent 7ef173f2c2
commit 0abdde0bad
2 changed files with 18 additions and 4 deletions

View File

@ -137,10 +137,17 @@ jobs:
run: unzip -q source.zip
- name: prepare
run: |
brew update
brew install curl zip unzip gnu-sed kerl unixodbc freetds
echo "/usr/local/bin" >> $GITHUB_PATH
git config --global credential.helper store
- uses: actions/cache@v2
id: cache
with:
path: ~/.kerl
key: erl${{ matrix.erl_otp }}-macos10.15
- name: build erlang
if: steps.cache.outputs.cache-hit != 'true'
timeout-minutes: 60
run: |
kerl build ${{ matrix.erl_otp }}
@ -153,7 +160,7 @@ jobs:
run: |
cd source
pkg_name=$(basename _packages/${{ matrix.profile }}/${{ matrix.profile }}-*.zip)
unzip _packages/${{ matrix.profile }}/$pkg_name
unzip -q _packages/${{ matrix.profile }}/$pkg_name
gsed -i '/emqx_telemetry/d' ./emqx/data/loaded_plugins
./emqx/bin/emqx start || cat emqx/log/erlang.log.1
ready='no'

View File

@ -69,10 +69,17 @@ jobs:
fi
- name: prepare
run: |
brew update
brew install curl zip unzip gnu-sed kerl unixodbc freetds
echo "/usr/local/bin" >> $GITHUB_PATH
git config --global credential.helper store
- uses: actions/cache@v2
id: cache
with:
path: ~/.kerl
key: erl${{ matrix.erl_otp }}-macos10.15
- name: build erlang
if: steps.cache.outputs.cache-hit != 'true'
timeout-minutes: 60
run: |
kerl build ${{ matrix.erl_otp }}
@ -84,7 +91,7 @@ jobs:
- name: test
run: |
pkg_name=$(basename _packages/${EMQX_NAME}/emqx-*.zip)
unzip _packages/${EMQX_NAME}/$pkg_name
unzip -q _packages/${EMQX_NAME}/$pkg_name
gsed -i '/emqx_telemetry/d' ./emqx/data/loaded_plugins
./emqx/bin/emqx start || cat emqx/log/erlang.log.1
ready='no'
@ -103,7 +110,7 @@ jobs:
./emqx/bin/emqx_ctl status
./emqx/bin/emqx stop
rm -rf emqx
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v2
with:
name: macos
path: _packages/emqx/.
path: _packages/**/*.zip