ci: inspec erl in PATH for macos builds

This commit is contained in:
Zaiming (Stone) Shi 2023-06-05 23:19:34 +02:00
parent cd04b7cf8b
commit 541dc1b9cf
1 changed files with 8 additions and 4 deletions

View File

@ -62,19 +62,19 @@ runs:
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
shell: bash shell: bash
run: | run: |
OTP_SOURCE_PATH="${{ steps.prepare.outputs.OTP_SOURCE_PATH }}"
OTP_INSTALL_PATH="${{ steps.prepare.outputs.OTP_INSTALL_PATH }}"
SELF_HOSTED="${{ steps.prepare.outputs.SELF_HOSTED }}" SELF_HOSTED="${{ steps.prepare.outputs.SELF_HOSTED }}"
# when it's self-hosted, it never hits the cache, # when it's self-hosted, it never hits the cache,
# skip rebuild if it's self-hosted and the install path already has a 'bin' # skip rebuild if it's self-hosted and the install path already has a 'bin'
if [ "$SELF_HOSTED" = 'true' ]; then if [ "$SELF_HOSTED" = 'true' ]; then
if [ -d "$OTP_INSTALL_PATH/bin" ]; then if [ -n "$OTP_INSTALL_PATH" && -d "$OTP_INSTALL_PATH/bin" ]; then
echo "Skip rebuilding OTP, found $OTP_INSTALL_PATH" echo "Skip rebuilding OTP, found $OTP_INSTALL_PATH"
exit 0 exit 0
fi fi
fi fi
## when it's not self-hosted, or the install path is not found, ## when it's not self-hosted, or the install path is not found,
## build otp from source code. ## build otp from source code.
OTP_SOURCE_PATH="${{ steps.prepare.outputs.OTP_SOURCE_PATH }}"
OTP_INSTALL_PATH="${{ steps.prepare.outputs.OTP_INSTALL_PATH }}"
if [ -d "$OTP_SOURCE_PATH" ]; then if [ -d "$OTP_SOURCE_PATH" ]; then
rm -rf "$OTP_SOURCE_PATH" rm -rf "$OTP_SOURCE_PATH"
fi fi
@ -108,6 +108,10 @@ runs:
shell: bash shell: bash
run: | run: |
export PATH="${{ steps.prepare.outputs.OTP_INSTALL_PATH }}/bin:$PATH" export PATH="${{ steps.prepare.outputs.OTP_INSTALL_PATH }}/bin:$PATH"
# inspec erl in PATH
which erl
# inspec erl command banner
erl -s init stop
make ensure-rebar3 make ensure-rebar3
mkdir -p $HOME/bin mkdir -p $HOME/bin
cp rebar3 $HOME/bin/rebar3 cp rebar3 $HOME/bin/rebar3