Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgauth committed Mar 12, 2024
1 parent 59cbb6d commit ec49690
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 68 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: lpgauth/erlang-cassandra:0.1.1
image: lpgauth/erlang-scylla:26.2.2-5.2

steps:
- uses: actions/checkout@v1
- name: Start Cassandra
run: cassandra -R
- name: Start Scylla
run: systemctl start scylla-server
- name: Compile
run: make compile
- name: Elvis rock
run: make elvis
- name: Run xref
run: make xref
- name: Run eunit
Expand Down
48 changes: 25 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
FROM cassandra:3.11
FROM scylladb/scylla:5.2

ENV OTP_VERSION="24.1.2" \
REBAR3_VERSION="3.17.0"
ENV OTP_VERSION="26.2.2"

RUN apt-get update
RUN apt-get -y --no-install-recommends install \
autoconf \
dpkg-dev \
gcc \
g++ \
make \
libncurses-dev \
unixodbc-dev \
libssl-dev \
libsctp-dev \
wget \
ca-certificates \
pax-utils

RUN set -xe \
&& OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \
&& OTP_DOWNLOAD_SHA256="c141a046bb7184a7bb5c3d6da2ed013e465d1fbe4ff5cd16e0fbb7a0e786a152" \
&& deps='dpkg-dev g++ gcc libncurses5-dev libssl-dev git-all' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $deps \
&& OTP_DOWNLOAD_SHA256="93c09aa8814018c23d218ac68b2bcdba188e12086223fbfa08af5cc70edd7ee1" \
&& deps='dpkg-dev g++ gcc libncurses5-dev libssl-dev git-all' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $deps \
&& curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \
&& echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \
&& export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" \
&& mkdir -vp $ERL_TOP \
&& tar -xzf otp-src.tar.gz -C $ERL_TOP --strip-components=1 \
&& rm otp-src.tar.gz \
&& ( cd $ERL_TOP \
&& ./otp_build autoconf \
&& gnuArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" \
&& ./configure --build="$gnuArch" \
&& make -j$(nproc) \
&& make -j$(nproc) docs DOC_TARGETS=chunks \
&& make install install-docs DOC_TARGETS=chunks ) \
&& find /usr/local -name examples | xargs rm -rf

CMD ["erl"]

RUN set -xe \
&& REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \
&& REBAR3_DOWNLOAD_SHA256="4c7f33a342bcab498f9bf53cc0ee5b698d9598b8fa9ef6a14bcdf44d21945c27" \
&& mkdir -p /usr/src/rebar3-src \
&& curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \
&& echo "$REBAR3_DOWNLOAD_SHA256 rebar3-src.tar.gz" | sha256sum -c - \
&& tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \
&& rm rebar3-src.tar.gz \
&& cd /usr/src/rebar3-src \
&& HOME=$PWD ./bootstrap \
&& install -v ./rebar3 /usr/local/bin/ \
&& rm -rf /usr/src/rebar3-src
&& find /usr/local -name examples | xargs rm -rf \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf $ERL_TOP /var/lib/apt/lists/*
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ compile:
@echo "Running rebar3 compile..."
@$(REBAR3) as compile compile

coveralls:
@echo "Running rebar3 coveralls send..."
@$(REBAR3) as test coveralls send

dialyzer:
@echo "Running rebar3 dialyze..."
@$(REBAR3) dialyzer
Expand Down Expand Up @@ -52,4 +48,4 @@ xref:
@echo "Running rebar3 xref..."
@$(REBAR3) xref

.PHONY: clean compile coveralls dialyzer edoc elvis eunit profile xref
.PHONY: clean compile dialyzer edoc eunit profile xref
Binary file removed bin/elvis
Binary file not shown.
35 changes: 0 additions & 35 deletions elvis.config

This file was deleted.

28 changes: 28 additions & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{"1.2.0",
[{<<"foil">>,
{git,"https://github.com/lpgauth/foil.git",
{ref,"e462829855a745d8f20fb0508ae3eb8e323b03bd"}},
0},
{<<"granderl">>,
{git,"https://github.com/tokenrove/granderl.git",
{ref,"ee3fac0a2ca1d460c90808537216707f82cc777f"}},
0},
{<<"lz4">>,
{git,"https://github.com/lpgauth/erlang-lz4.git",
{ref,"30ac242cf8f6ec9ef097f494ae87f6295039ffd4"}},
0},
{<<"metal">>,{pkg,<<"metal">>,<<"0.1.1">>},1},
{<<"murmur">>,
{git,"https://github.com/lpgauth/murmur.git",
{ref,"1ef5b3680c61498aa9f9c99aae6ea021d7844b71"}},
0},
{<<"shackle">>,
{git,"https://github.com/lpgauth/shackle.git",
{ref,"a4f7d82d10115cf0d676582b638a56260be685d5"}},
0}]}.
[
{pkg_hash,[
{<<"metal">>, <<"5D3D1322DA7BCD34B94FED5486F577973685298883954F7A3E517EF5EF6953F5">>}]},
{pkg_hash_ext,[
{<<"metal">>, <<"88B82B634998A1A768DEDCD372C2F7E657B19445325C0AF5CCBAC62C77210F1D">>}]}
].

0 comments on commit ec49690

Please sign in to comment.