Skip to content

Commit

Permalink
Merge pull request #53 from lpgauth/upkeep/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
lpgauth authored Mar 18, 2024
2 parents a2ef36d + 1348e01 commit 7ff2afc
Show file tree
Hide file tree
Showing 34 changed files with 79 additions and 1,451 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/erlang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: lpgauth/erlang-cassandra:0.1.1

image: lpgauth/erlang-scylla:26.2.2-5.2-amd64
steps:
- uses: actions/checkout@v1
- name: Start Cassandra
run: cassandra -R
- name: Start Scylla
run: |
python3 /docker-entrypoint.py&
sleep 30
- name: Set Path
run: |
echo "/usr/local/lib/erlang/bin" >> $GITHUB_PATH
- name: Compile
run: make compile
- name: Elvis rock
run: make elvis
- name: Run xref
run: make xref
- name: Run eunit
Expand Down
63 changes: 26 additions & 37 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
FROM cassandra:3.11
FROM scylladb/scylla:5.2

ENV OTP_VERSION="24.1.2" \
REBAR3_VERSION="3.17.0"
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 \
git

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 \
&& 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 \
&& 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
RUN mkdir -p /OTP/subdir
RUN wget -nv "https://github.com/erlang/otp/archive/OTP-26.2.3.tar.gz" && tar -zxf "OTP-26.2.3.tar.gz" -C /OTP/subdir --strip-components=1
WORKDIR /OTP/subdir
RUN ./otp_build autoconf
RUN ./configure --with-ssl
RUN make -j$(getconf _NPROCESSORS_ONLN)
RUN make -j$(getconf _NPROCESSORS_ONLN) install
RUN find /usr/local -regex '/usr/local/lib/erlang/\(lib/\|erts-\).*/\(man\|obj\|c_src\|emacs\|info\|examples\)' | xargs rm -rf
RUN find /usr/local -name src | xargs -r find | grep -v '\.hrl$' | xargs rm -v || true
RUN find /usr/local -name src | xargs -r find | xargs rmdir -vp || true
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2017 Louis-Philippe Gauthier
Copyright (c) 2015-2024 Louis-Philippe Gauthier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

16 changes: 5 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
CACHEGRIND=qcachegrind
ELVIS=./bin/elvis
REBAR3=$(shell which rebar3)
ifeq ($(REBAR3),)
REBAR3=./bin/rebar3
endif

all: compile

Expand All @@ -12,10 +14,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 All @@ -24,10 +22,6 @@ edoc:
@echo "Running rebar3 edoc..."
@$(REBAR3) as edoc edoc

elvis:
@echo "Running elvis rock..."
@$(ELVIS) rock

eunit:
@echo "Running rebar3 eunit..."
@$(REBAR3) do eunit -cv, cover -v
Expand All @@ -43,10 +37,10 @@ profile:
@_build/test/lib/fprofx/erlgrindx -p fprofx.analysis
@$(CACHEGRIND) fprofx.cgrind

test: elvis xref eunit dialyzer
test: xref eunit dialyzer

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
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# marina
High-Performance Erlang Cassandra CQL Client

[![Build Status](https://travis-ci.org/lpgauth/marina.svg?branch=master)](https://travis-ci.org/lpgauth/marina)
[![Coverage Status](https://coveralls.io/repos/github/lpgauth/marina/badge.svg?branch=master)](https://coveralls.io/github/lpgauth/marina?branch=master)
High-Performance Erlang Cassandra / Scylla CQL Client

### Requirements

Expand Down Expand Up @@ -100,9 +97,6 @@ High-Performance Erlang Cassandra CQL Client

The pool is bootstraped by querying the `system.peers` table. `marina` will try each ip from `boostrap_ips` until it can connect and retrieve the list of peers. For backward compatibility, `ip` will be used if `bootstrap_ips` is not provided.

## API
<a href="http://github.com/lpgauth/marina/blob/master/doc/marina.md#index" class="module">Function Index</a>

### Examples

```erlang
Expand Down Expand Up @@ -155,7 +149,6 @@ The pool is bootstraped by querying the `system.peers` table. `marina` will try

```makefile
make dialyzer
make elvis
make eunit
make xref
```
Expand All @@ -170,7 +163,7 @@ make xref
```license
The MIT License (MIT)
Copyright (c) 2015-2018 Louis-Philippe Gauthier
Copyright (c) 2015-2024 Louis-Philippe Gauthier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Binary file removed bin/elvis
Binary file not shown.
Binary file modified bin/rebar3
Binary file not shown.
6 changes: 0 additions & 6 deletions doc/edoc-info

This file was deleted.

137 changes: 0 additions & 137 deletions doc/marina.md

This file was deleted.

56 changes: 0 additions & 56 deletions doc/marina_app.md

This file was deleted.

Loading

0 comments on commit 7ff2afc

Please sign in to comment.