Skip to content

Commit df23353

Browse files
committed
Use kerl to manage OTP installation
1 parent 5f4baee commit df23353

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ jobs:
2020
- run: mix local.rebar --force
2121

2222
- restore_cache: # restores saved mix cache
23+
name: Restore mix cache
2324
keys: # list of cache keys, in decreasing specificity
2425
- mix-cache-{{ .Branch }}-{{ checksum "mix.lock" }}
2526
- mix-cache-{{ .Branch }}
2627
- mix-cache
2728
- restore_cache: # restores saved build cache
29+
name: Restore build cache
2830
keys:
2931
- build-cache-{{ .Branch }}
3032
- build-cache

script/ci/prepare.sh

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,17 @@ export ELIXIR_VERSION="v1.6.0"
1111

1212
export ERLANG_PATH="$INSTALL_PATH/otp_src_$ERLANG_VERSION"
1313
export ELIXIR_PATH="$INSTALL_PATH/elixir_$ELIXIR_VERSION"
14+
export KERL_PATH="$INSTALL_PATH/bin/kerl"
1415

1516
mkdir -p $INSTALL_PATH
1617
cd $INSTALL_PATH
1718

1819
# Install erlang
1920
if [ ! -e $INSTALL_PATH/bin/erl ]; then
20-
curl -L -O http://www.erlang.org/download/otp_src_$ERLANG_VERSION.tar.gz
21-
tar xzf otp_src_$ERLANG_VERSION.tar.gz
22-
cd $ERLANG_PATH
23-
./configure --enable-smp-support \
24-
--enable-m64-build \
25-
--disable-native-libs \
26-
--disable-sctp \
27-
--enable-threads \
28-
--enable-kernel-poll \
29-
--disable-hipe \
30-
--without-javac \
31-
--prefix=$INSTALL_PATH
32-
make install
21+
curl https://raw.githubusercontent.com/kerl/kerl/master/kerl -o $KERL_PATH
22+
chmod a+x $KERL_PATH
23+
$KERL_PATH build $ERLANG_VERSION $ERLANG_VERSION
24+
$KERL_PATH install $ERLANG_VERSION $INSTALL_PATH
3325
else
3426
echo "Erlang already installed."
3527
fi

0 commit comments

Comments
 (0)