Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use kerl to manage OTP installation #272

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ jobs:
- run: mix local.rebar --force

- restore_cache: # restores saved mix cache
name: Restore mix cache
keys: # list of cache keys, in decreasing specificity
- mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }}
- mix-cache-{{ .Branch }}
- mix-cache
- restore_cache: # restores saved build cache
name: Restore build cache
keys:
- build-cache-{{ .Branch }}
- build-cache
Expand Down
23 changes: 9 additions & 14 deletions script/ci/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,21 @@ export ERLANG_VERSION="20.3"
export ELIXIR_VERSION="v1.6.0"

export ERLANG_PATH="$INSTALL_PATH/otp_src_$ERLANG_VERSION"
export ERLANG_INSTALL="$ERLANG_PATH/$ERLANG_VERSION"
export ELIXIR_PATH="$INSTALL_PATH/elixir_$ELIXIR_VERSION"
export KERL_PATH="$INSTALL_PATH/bin/kerl"

mkdir -p $INSTALL_PATH
mkdir -p $INSTALL_PATH/bin
mkdir -p $ERLANG_INSTALL
cd $INSTALL_PATH

# Install erlang
if [ ! -e $INSTALL_PATH/bin/erl ]; then
curl -L -O http://www.erlang.org/download/otp_src_$ERLANG_VERSION.tar.gz
tar xzf otp_src_$ERLANG_VERSION.tar.gz
cd $ERLANG_PATH
./configure --enable-smp-support \
--enable-m64-build \
--disable-native-libs \
--disable-sctp \
--enable-threads \
--enable-kernel-poll \
--disable-hipe \
--without-javac \
--prefix=$INSTALL_PATH
make install
curl https://raw.githubusercontent.com/kerl/kerl/master/kerl -o $KERL_PATH
chmod a+x $KERL_PATH
$KERL_PATH build $ERLANG_VERSION $ERLANG_VERSION
$KERL_PATH install $ERLANG_VERSION $ERLANG_INSTALL
cp -R $ERLANG_INSTALL @INSTALL_PATH
else
echo "Erlang already installed."
fi
Expand Down