From c0c826d2ee106a1e450f7b89ad163ebe629c2662 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Tue, 4 Jan 2022 16:39:46 +0100 Subject: [PATCH] ci: introduce in ci the compilation testing on different os Changelog-None: introduce in ci the compilation testing on different os Signed-off-by: Vincenzo Palazzo --- .github/workflows/ci_build.yml | 17 ++++++++++++++ contrib/docker/Dockerfile.alpine | 23 +++++++++++++++++++ contrib/{ => docker}/Dockerfile.builder | 0 .../{ => docker}/Dockerfile.builder.fedora | 0 contrib/{ => docker}/Dockerfile.tester | 0 contrib/{ => docker}/linuxarm32v7.Dockerfile | 0 contrib/{ => docker}/linuxarm64v8.Dockerfile | 0 7 files changed, 40 insertions(+) create mode 100644 .github/workflows/ci_build.yml create mode 100644 contrib/docker/Dockerfile.alpine rename contrib/{ => docker}/Dockerfile.builder (100%) rename contrib/{ => docker}/Dockerfile.builder.fedora (100%) rename contrib/{ => docker}/Dockerfile.tester (100%) rename contrib/{ => docker}/linuxarm32v7.Dockerfile (100%) rename contrib/{ => docker}/linuxarm64v8.Dockerfile (100%) diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml new file mode 100644 index 000000000000..7683c539d4ae --- /dev/null +++ b/.github/workflows/ci_build.yml @@ -0,0 +1,17 @@ +name: CI Compilation testing + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - { OS: alpine } + steps: + - uses: actions/checkout@v2 + - name: Integration testing + run: | + docker build -f contrib/docker/Dockerfile.${{matrix.OS}} -t clightning-${{matrix.OS}} . diff --git a/contrib/docker/Dockerfile.alpine b/contrib/docker/Dockerfile.alpine new file mode 100644 index 000000000000..d1ab045f9f05 --- /dev/null +++ b/contrib/docker/Dockerfile.alpine @@ -0,0 +1,23 @@ +FROM alpine:3.14.3 +LABEL org.opencontainers.image.authors="Vincenzo Palazzo (@vincenzopalazzo) vincenzopalazzodev@gmail.com" + +WORKDIR /build + +RUN apk update && \ + apk add ca-certificates alpine-sdk autoconf automake git libtool \ + gmp-dev sqlite-dev python3 py3-mako net-tools zlib-dev libsodium gettext su-exec \ + python3 py3-pip #&& \ + #apk add --upgrade fortify-headers + +RUN mkdir lightning +COPY . lightning + +RUN cd lightning && \ + git submodule update --init --recursive && \ + ./configure && \ + pip3 install mrkd mistune==0.8.4 && \ + make -j$(nproc) && \ + make install + +# TODO: review entry point here, to make this availale for the user +CMD ["lightningd", "--version"] diff --git a/contrib/Dockerfile.builder b/contrib/docker/Dockerfile.builder similarity index 100% rename from contrib/Dockerfile.builder rename to contrib/docker/Dockerfile.builder diff --git a/contrib/Dockerfile.builder.fedora b/contrib/docker/Dockerfile.builder.fedora similarity index 100% rename from contrib/Dockerfile.builder.fedora rename to contrib/docker/Dockerfile.builder.fedora diff --git a/contrib/Dockerfile.tester b/contrib/docker/Dockerfile.tester similarity index 100% rename from contrib/Dockerfile.tester rename to contrib/docker/Dockerfile.tester diff --git a/contrib/linuxarm32v7.Dockerfile b/contrib/docker/linuxarm32v7.Dockerfile similarity index 100% rename from contrib/linuxarm32v7.Dockerfile rename to contrib/docker/linuxarm32v7.Dockerfile diff --git a/contrib/linuxarm64v8.Dockerfile b/contrib/docker/linuxarm64v8.Dockerfile similarity index 100% rename from contrib/linuxarm64v8.Dockerfile rename to contrib/docker/linuxarm64v8.Dockerfile