ci: inspec erl in PATH for macos builds
This commit is contained in:
parent
cd04b7cf8b
commit
541dc1b9cf
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue