diff --git a/action.yml b/action.yml deleted file mode 100644 index 034d68c8e852..000000000000 --- a/action.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: 'Lightning CI' -description: 'A preconfigured container with all Core Lightning dependencies' -runs: - using: 'docker' - image: 'contrib/Dockerfile.tester' diff --git a/contrib/docker/Dockerfile.alpine b/contrib/docker/Dockerfile.alpine deleted file mode 100644 index c1605c1de16c..000000000000 --- a/contrib/docker/Dockerfile.alpine +++ /dev/null @@ -1,54 +0,0 @@ -FROM alpine:3.16 as builder -LABEL org.opencontainers.image.authors="Vincenzo Palazzo (@vincenzopalazzo) vincenzopalazzodev@gmail.com" - -WORKDIR /build - -RUN apk update && \ - apk add \ - alpine-sdk \ - autoconf \ - automake \ - ca-certificates \ - cargo \ - gettext \ - git \ - libsodium \ - libtool \ - net-tools \ - postgresql-dev \ - linux-headers \ - py3-pip \ - python3 \ - python3-dev \ - sqlite-dev \ - sqlite-static \ - su-exec \ - zlib-dev \ - zlib-static - -COPY . /source - -RUN git clone /source /repo --recursive && \ - cd /repo && \ - python3 -m pip install poetry && \ - poetry export --without-hashes --with=dev > requirements.txt && \ - python3 -m pip install -r requirements.txt --ignore-installed --force && \ - ./configure --enable-static --prefix=/usr && \ - make -j $(nproc) && \ - make install - -FROM alpine:3.16 as runner - -RUN apk update && \ - apk add \ - postgresql \ - bitcoin-cli - -COPY --from=builder /usr/bin/lightningd /usr/bin/ -COPY --from=builder /usr/bin/lightning-cli /usr/bin/ -COPY --from=builder /usr/bin/lightning-hsmtool /usr/bin/ -COPY --from=builder /usr/libexec/c-lightning /usr/libexec/c-lightning -COPY --from=builder /usr/share/man/man8 /usr/share/man/man8 -COPY --from=builder /usr/share/doc/c-lightning /usr/share/doc/c-lightning - -ENTRYPOINT ["/usr/bin/lightningd"] diff --git a/contrib/docker/Dockerfile.builder b/contrib/docker/Dockerfile.builder deleted file mode 100644 index 8c2e83e1f2d3..000000000000 --- a/contrib/docker/Dockerfile.builder +++ /dev/null @@ -1,69 +0,0 @@ -FROM ubuntu:16.04 -MAINTAINER Christian Decker - -ENV DEBIAN_FRONTEND noninteractive -ENV BITCOIN_VERSION 27.1 - -WORKDIR /build - -RUN apt-get -qq update && \ - apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \ - autoconf \ - automake \ - clang \ - cppcheck \ - docbook-xml \ - shellcheck \ - eatmydata \ - software-properties-common \ - build-essential \ - autoconf \ - locales \ - libtool \ - libprotobuf-c-dev \ - libsqlite3-dev \ - git \ - python3 \ - valgrind \ - net-tools \ - python3-mako \ - python3-pip \ - python3-setuptools \ - python-pkg-resources \ - shellcheck \ - libxml2-utils \ - lowdown \ - wget \ - jq \ - gettext \ - xsltproc \ - zlib1g-dev && \ - rm -rf /var/lib/apt/lists/* - -ENV LANGUAGE=en_US.UTF-8 -ENV LANG=en_US.UTF-8 -ENV LC_ALL=en_US.UTF-8 -RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales - -RUN cd /tmp/ && \ - wget https://bitcoin.org/bin/bitcoin-core-$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz -O bitcoin.tar.gz && \ - tar -xvzf bitcoin.tar.gz && \ - mv /tmp/bitcoin-$BITCOIN_VERSION/bin/bitcoin* /usr/local/bin/ && \ - rm -rf bitcoin.tar.gz /tmp/bitcoin-$BITCOIN_VERSION - -RUN pip3 install --upgrade pip && \ - python3 -m pip install \ - CherryPy==17.3.0 \ - Flask==1.0.2 \ - cheroot==8.2.1 \ - ephemeral-port-reserve==1.1.0 \ - pytest-benchmark==3.1.1 \ - pytest-forked==0.2 \ - pytest-timeout==1.3.3 \ - pytest-xdist==1.22.2 \ - pytest==3.8.1 \ - python-bitcoinlib==0.10.2 \ - tqdm==4.26.0 \ - pytest-test-groups==1.0.3 \ - flake8==3.5.0 \ - pytest-rerunfailures==3.1 diff --git a/contrib/docker/Dockerfile.tester b/contrib/docker/Dockerfile.tester deleted file mode 100644 index 2b80d08745b7..000000000000 --- a/contrib/docker/Dockerfile.tester +++ /dev/null @@ -1,78 +0,0 @@ -FROM ubuntu:22.04 -LABEL mantainer="Christian Decker " - -ENV DEBIAN_FRONTEND noninteractive -ENV BITCOIN_VERSION 27.1 -ENV ELEMENTS_VERSION 23.2.1 - -RUN useradd -ms /bin/bash tester -RUN mkdir /build /bolts && chown tester -R /build /bolts -WORKDIR /build - -RUN apt-get -qq update && \ - apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \ - autoconf \ - autoconf \ - automake \ - binfmt-support \ - build-essential \ - clang \ - cppcheck \ - docbook-xml \ - eatmydata \ - gcc-aarch64-linux-gnu \ - gcc-arm-linux-gnueabihf \ - gcc-arm-none-eabi \ - gettext \ - git \ - libc6-dev-arm64-cross \ - libc6-dev-armhf-cross \ - libpq-dev \ - libprotobuf-c-dev \ - libsqlite3-dev \ - libtool \ - libxml2-utils \ - locales \ - net-tools \ - postgresql-10 \ - python-pkg-resources \ - python3 \ - python3-dev \ - python3-pip \ - python3-setuptools \ - qemu \ - qemu-system-arm \ - qemu-user-static \ - shellcheck \ - software-properties-common \ - sudo \ - tcl \ - unzip \ - valgrind \ - wget \ - jq \ - xsltproc \ - zlib1g-dev && \ - rm -rf /var/lib/apt/lists/* - -ENV LANGUAGE=en_US.UTF-8 -ENV LANG=en_US.UTF-8 -ENV LC_ALL=en_US.UTF-8 -RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales -RUN echo "tester ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/tester && \ - chmod 0440 /etc/sudoers.d/tester - -RUN cd /tmp/ && \ - wget https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz && \ - wget https://github.com/ElementsProject/elements/releases/download/elements-$ELEMENTS_VERSION/elements-$ELEMENTS_VERSION-x86_64-linux-gnu.tar.gz && \ - tar -xzf bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz && \ - tar -xzf elements-$ELEMENTS_VERSION-x86_64-linux-gnu.tar.gz && \ - mv bitcoin-$BITCOIN_VERSION/bin/* /usr/local/bin && \ - mv elements-$ELEMENTS_VERSION/bin/* /usr/local/bin && \ - rm -rf \ - bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz \ - bitcoin-$BITCOIN_VERSION \ - elements-$ELEMENTS_VERSION-x86_64-linux-gnu.tar.gz \ - elements-$ELEMENTS_VERSION - -USER tester diff --git a/contrib/docker/Dockerfile.ubuntu b/contrib/docker/Dockerfile.ubuntu deleted file mode 100644 index 401a60d1cb2d..000000000000 --- a/contrib/docker/Dockerfile.ubuntu +++ /dev/null @@ -1,40 +0,0 @@ -FROM ubuntu:22.04 -LABEL mantainer="Vincenzo Palazzo vincenzopalazzodev@gmail.com" - -WORKDIR /work - -ENV DEBIAN_FRONTEND=noninteractive -ENV LANGUAGE=en_US.UTF-8 -ENV LANG=en_US.UTF-8 -ENV LC_ALL=en_US.UTF-8 -ENV TZ="Europe/London" - -RUN apt-get -qq update && \ - apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \ - sudo \ - locales \ - tzdata - -RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime - -RUN locale-gen en_US.UTF-8 && dpkg-reconfigure --frontend noninteractive tzdata - -# install package for python cryptography lib -# https://cryptography.io/en/latest/installation/#debian-ubuntu - -RUN apt-get -qq update && \ - apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \ - jq build-essential libssl-dev libffi-dev \ - python3-dev cargo python3-pip - -COPY . . - -RUN pip install poetry && \ - poetry export --without-hashes -o /tmp/requirements.txt && \ - cat /tmp/requirements.txt && \ - pip install -r /tmp/requirements.txt - -# move the script in the root of the directory -RUN cp contrib/docker/scripts/*.sh . - -CMD ["./contrib/docker/scripts/entrypoint.sh"] diff --git a/contrib/docker/scripts/build.sh b/contrib/docker/scripts/build.sh deleted file mode 100755 index 3037ae66af44..000000000000 --- a/contrib/docker/scripts/build.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -echo "Running in $(pwd)" -export ARCH=${ARCH:-64} -export BOLTDIR=bolts -export CC=${COMPILER:-gcc} -export COMPAT=${COMPAT:-1} -export TEST_CHECK_DBSTMTS=${TEST_CHECK_DBSTMTS:-0} -export PATH=$CWD/dependencies/bin:"$HOME"/.local/bin:"$PATH" -export PYTEST_OPTS="--maxfail=5 --suppress-no-test-exit-code ${PYTEST_OPTS}" -export PYTEST_PAR=${PYTEST_PAR:-10} -export PYTEST_SENTRY_ALWAYS_REPORT=1 -export SLOW_MACHINE=1 -export TEST_CMD=${TEST_CMD:-"make -j $PYTEST_PAR pytest"} -export TEST_DB_PROVIDER=${TEST_DB_PROVIDER:-"sqlite3"} -export TEST_NETWORK=${NETWORK:-"regtest"} -export TIMEOUT=900 -export VALGRIND=${VALGRIND:-0} -export FUZZING=${FUZZING:-0} -export LIGHTNINGD_POSTGRES_NO_VACUUM=1 - -pip3 install --upgrade pip -pip3 install --user poetry -poetry export --dev --without-hashes -o requirements.txt -pip3 install -r requirements.txt - -git clone https://github.com/lightning/bolts.git ../bolts -git submodule update --init --recursive - -./configure CC="$CC" -cat config.vars - -cat << EOF > pytest.ini -[pytest] -addopts=-p no:logging --color=yes --timeout=1800 --timeout-method=thread --test-group-random-seed=42 -markers = - slow_test: marks tests as slow (deselect with '-m "not slow_test"') -EOF - -if [ "$TARGET_HOST" == "arm-linux-gnueabihf" ] || [ "$TARGET_HOST" == "aarch64-linux-gnu" ] -then - export QEMU_LD_PREFIX=/usr/"$TARGET_HOST"/ - export MAKE_HOST="$TARGET_HOST" - export BUILD=x86_64-pc-linux-gnu - export AR="$TARGET_HOST"-ar - export AS="$TARGET_HOST"-as - export CC="$TARGET_HOST"-gcc - export CXX="$TARGET_HOST"-g++ - export LD="$TARGET_HOST"-ld - export STRIP="$TARGET_HOST"-strip - export CONFIGURATION_WRAPPER=qemu-"${TARGET_HOST%%-*}"-static - - wget -q https://zlib.net/fossils/zlib-1.2.13.tar.gz - tar xf zlib-1.2.13.tar.gz - cd zlib-1.2.13 || exit 1 - ./configure --prefix="$QEMU_LD_PREFIX" - make - sudo make install - cd .. || exit 1 - rm zlib-1.2.13.tar.gz && rm -rf zlib-1.2.13 - - wget -q https://www.sqlite.org/2018/sqlite-src-3260000.zip - unzip -q sqlite-src-3260000.zip - cd sqlite-src-3260000 || exit 1 - automake --add-missing --force-missing --copy || true - ./configure --disable-tcl \ - --enable-static \ - --disable-readline \ - --disable-threadsafe \ - --disable-load-extension \ - --host="$TARGET_HOST" \ - --prefix="$QEMU_LD_PREFIX" - make - sudo make install - cd .. || exit 1 - rm sqlite-src-3260000.zip - rm -rf sqlite-src-3260000 - - ./configure CC="$TARGET_HOST-gcc" --enable-static - - make -j32 CC="$TARGET_HOST-gcc" > /dev/null -else - eatmydata make -j32 - # shellcheck disable=SC2086 - eatmydata $TEST_CMD -fi diff --git a/contrib/docker/scripts/entrypoint.sh b/contrib/docker/scripts/entrypoint.sh deleted file mode 100755 index 28e4f5bc2388..000000000000 --- a/contrib/docker/scripts/entrypoint.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -./setup.sh -./build.sh diff --git a/contrib/docker/scripts/setup.sh b/contrib/docker/scripts/setup.sh deleted file mode 100755 index a05e02fe7653..000000000000 --- a/contrib/docker/scripts/setup.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -export DEBIAN_FRONTEND=noninteractive -export BITCOIN_VERSION=27.1 -export ELEMENTS_VERSION=23.2.1 -export RUST_VERSION=nightly -export TZ="Europe/London" - -sudo apt-get update -qq - -sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \ - autoconf \ - automake \ - binfmt-support \ - build-essential \ - clang \ - cppcheck \ - docbook-xml \ - eatmydata \ - gcc-aarch64-linux-gnu \ - gcc-arm-linux-gnueabihf \ - gcc-arm-none-eabi \ - gettext \ - git \ - libc6-dev-arm64-cross \ - libc6-dev-armhf-cross \ - libpq-dev \ - libprotobuf-c-dev \ - libsqlite3-dev \ - libtool \ - libxml2-utils \ - locales \ - net-tools \ - postgresql \ - python-pkg-resources \ - python3 \ - python3-dev \ - python3-pip \ - python3-setuptools \ - qemu \ - qemu-system-arm \ - qemu-user-static \ - shellcheck \ - software-properties-common \ - sudo \ - tcl \ - unzip \ - valgrind \ - wget \ - jq \ - xsltproc \ - zlib1g-dev - -( - cd /tmp/ || exit 1 - wget https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz - wget https://github.com/ElementsProject/elements/releases/download/elements-$ELEMENTS_VERSION/elements-$ELEMENTS_VERSION-x86_64-linux-gnu.tar.gz - tar -xzf bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz - tar -xzf elements-$ELEMENTS_VERSION-x86_64-linux-gnu.tar.gz - sudo mv bitcoin-$BITCOIN_VERSION/bin/* /usr/local/bin - sudo mv elements-$ELEMENTS_VERSION/bin/* /usr/local/bin - rm -rf \ - bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz \ - bitcoin-$BITCOIN_VERSION \ - elements-$ELEMENTS_VERSION-x86_64-linux-gnu.tar.gz \ - elements-$ELEMENTS_VERSION -) - -if [ "$RUST" == "1" ]; then - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \ - -y --default-toolchain ${RUST_VERSION} -fi