diff options
author | Nullptrderef <nullptrderef@proton.me> | 2024-06-16 11:49:58 +0200 |
---|---|---|
committer | Nullptrderef <nullptrderef@proton.me> | 2024-06-16 11:49:58 +0200 |
commit | 858c314332ab61b81702d5144ecd56252da8b5cc (patch) | |
tree | 1dcaa0197c1f665f56c051ba202ddbc57ffc5ef3 | |
parent | 1dd236d07a9b1b926d64701723838d2cd954d9ca (diff) | |
download | exchange-858c314332ab61b81702d5144ecd56252da8b5cc.tar.xz |
arm64 and riscv64 builds
30 files changed, 98 insertions, 4 deletions
diff --git a/contrib/ci/ci.sh b/contrib/ci/ci.sh index f0be84242..f454a6e3b 100755 --- a/contrib/ci/ci.sh +++ b/contrib/ci/ci.sh @@ -1,21 +1,28 @@ #!/bin/bash set -exvuo pipefail -# Use podman, fails if it isn't found in PATH +# Requires podman +# Fails if not found in PATH OCI_RUNTIME=$(which podman) REPO_NAME=$(basename "${PWD}") JOB_NAME="${1}" -JOB_CONTAINER=$((grep CONTAINER_NAME contrib/ci/jobs/${JOB_NAME}/config.ini | cut -d' ' -f 3) || echo "localhost/${REPO_NAME}") JOB_ARCH=$((grep CONTAINER_ARCH contrib/ci/jobs/${JOB_NAME}/config.ini | cut -d' ' -f 3) || echo "${2:-amd64}") +JOB_CONTAINER=$((grep CONTAINER_NAME contrib/ci/jobs/${JOB_NAME}/config.ini | cut -d' ' -f 3) || echo "localhost/${REPO_NAME}:${JOB_ARCH}") CONTAINER_BUILD=$((grep CONTAINER_BUILD contrib/ci/jobs/${JOB_NAME}/config.ini | cut -d' ' -f 3) || echo "True") +CONTAINERFILE="contrib/ci/$JOB_ARCH.Containerfile" -echo "${JOB_CONTAINER}" +if ! [[ -f "$CONTAINERFILE" ]]; then + CONTAINERFILE="$(dirname "$CONTAINERFILE")/Containerfile" +fi; + +echo "Image name: ${JOB_CONTAINER} +Containerfile: ${CONTAINERFILE}" if [ "${CONTAINER_BUILD}" = "True" ] ; then "${OCI_RUNTIME}" build \ --arch "${JOB_ARCH}" \ -t "${JOB_CONTAINER}" \ - -f contrib/ci/Containerfile . + -f "$CONTAINERFILE" . fi "${OCI_RUNTIME}" run \ diff --git a/contrib/ci/jobs/1-build/build.sh b/contrib/ci/common/build/build.sh index d3fcfab85..d3fcfab85 100755 --- a/contrib/ci/jobs/1-build/build.sh +++ b/contrib/ci/common/build/build.sh diff --git a/contrib/ci/jobs/1-build/job.sh b/contrib/ci/common/build/job.sh index 8d79902c5..8d79902c5 100755 --- a/contrib/ci/jobs/1-build/job.sh +++ b/contrib/ci/common/build/job.sh diff --git a/contrib/ci/jobs/4-deb-package/install-fix.patch b/contrib/ci/common/deb-package/install-fix.patch index 8334c5a7a..8334c5a7a 100644 --- a/contrib/ci/jobs/4-deb-package/install-fix.patch +++ b/contrib/ci/common/deb-package/install-fix.patch diff --git a/contrib/ci/jobs/4-deb-package/job.sh b/contrib/ci/common/deb-package/job.sh index 922f8bf63..922f8bf63 100755 --- a/contrib/ci/jobs/4-deb-package/job.sh +++ b/contrib/ci/common/deb-package/job.sh diff --git a/contrib/ci/jobs/4-deb-package/version.sh b/contrib/ci/common/deb-package/version.sh index 52031b23a..52031b23a 100755 --- a/contrib/ci/jobs/4-deb-package/version.sh +++ b/contrib/ci/common/deb-package/version.sh diff --git a/contrib/ci/jobs/1-build-amd64/build.sh b/contrib/ci/jobs/1-build-amd64/build.sh new file mode 120000 index 000000000..4c3fda3a5 --- /dev/null +++ b/contrib/ci/jobs/1-build-amd64/build.sh @@ -0,0 +1 @@ +../../common/build/build.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/1-build-amd64/job.sh b/contrib/ci/jobs/1-build-amd64/job.sh new file mode 120000 index 000000000..0620e044c --- /dev/null +++ b/contrib/ci/jobs/1-build-amd64/job.sh @@ -0,0 +1 @@ +../../common/build/job.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/10-deb-package-riscv64/config.ini b/contrib/ci/jobs/10-deb-package-riscv64/config.ini new file mode 100644 index 000000000..73914f224 --- /dev/null +++ b/contrib/ci/jobs/10-deb-package-riscv64/config.ini @@ -0,0 +1,6 @@ +[build] +HALT_ON_FAILURE = True +WARN_ON_FAILURE = True +CONTAINER_BUILD = True +CONTAINER_NAME = gnunet:riscv64 +CONTAINER_ARCH = riscv64 diff --git a/contrib/ci/jobs/10-deb-package-riscv64/install-fix.patch b/contrib/ci/jobs/10-deb-package-riscv64/install-fix.patch new file mode 120000 index 000000000..3b8a8758f --- /dev/null +++ b/contrib/ci/jobs/10-deb-package-riscv64/install-fix.patch @@ -0,0 +1 @@ +../../common/deb-package/install-fix.patch
\ No newline at end of file diff --git a/contrib/ci/jobs/10-deb-package-riscv64/job.sh b/contrib/ci/jobs/10-deb-package-riscv64/job.sh new file mode 120000 index 000000000..3301c9cec --- /dev/null +++ b/contrib/ci/jobs/10-deb-package-riscv64/job.sh @@ -0,0 +1 @@ +../../common/deb-package/job.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/10-deb-package-riscv64/version.sh b/contrib/ci/jobs/10-deb-package-riscv64/version.sh new file mode 120000 index 000000000..ddea5ae8b --- /dev/null +++ b/contrib/ci/jobs/10-deb-package-riscv64/version.sh @@ -0,0 +1 @@ +../../common/deb-package/version.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/11-deploy-package-riscv64 b/contrib/ci/jobs/11-deploy-package-riscv64 new file mode 120000 index 000000000..a58645d78 --- /dev/null +++ b/contrib/ci/jobs/11-deploy-package-riscv64 @@ -0,0 +1 @@ +5-deploy-package-amd64
\ No newline at end of file diff --git a/contrib/ci/jobs/4-deb-package-amd64/install-fix.patch b/contrib/ci/jobs/4-deb-package-amd64/install-fix.patch new file mode 120000 index 000000000..3b8a8758f --- /dev/null +++ b/contrib/ci/jobs/4-deb-package-amd64/install-fix.patch @@ -0,0 +1 @@ +../../common/deb-package/install-fix.patch
\ No newline at end of file diff --git a/contrib/ci/jobs/4-deb-package-amd64/job.sh b/contrib/ci/jobs/4-deb-package-amd64/job.sh new file mode 120000 index 000000000..3301c9cec --- /dev/null +++ b/contrib/ci/jobs/4-deb-package-amd64/job.sh @@ -0,0 +1 @@ +../../common/deb-package/job.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/4-deb-package-amd64/version.sh b/contrib/ci/jobs/4-deb-package-amd64/version.sh new file mode 120000 index 000000000..ddea5ae8b --- /dev/null +++ b/contrib/ci/jobs/4-deb-package-amd64/version.sh @@ -0,0 +1 @@ +../../common/deb-package/version.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/5-deploy-package/config.ini b/contrib/ci/jobs/5-deploy-package-amd64/config.ini index 8d6409a6e..8d6409a6e 100644 --- a/contrib/ci/jobs/5-deploy-package/config.ini +++ b/contrib/ci/jobs/5-deploy-package-amd64/config.ini diff --git a/contrib/ci/jobs/5-deploy-package/job.sh b/contrib/ci/jobs/5-deploy-package-amd64/job.sh index d39cf9987..d39cf9987 100755 --- a/contrib/ci/jobs/5-deploy-package/job.sh +++ b/contrib/ci/jobs/5-deploy-package-amd64/job.sh diff --git a/contrib/ci/jobs/6-build-arm64/build.sh b/contrib/ci/jobs/6-build-arm64/build.sh new file mode 120000 index 000000000..4c3fda3a5 --- /dev/null +++ b/contrib/ci/jobs/6-build-arm64/build.sh @@ -0,0 +1 @@ +../../common/build/build.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/6-build-arm64/config.ini b/contrib/ci/jobs/6-build-arm64/config.ini new file mode 100644 index 000000000..b5b4b5fe7 --- /dev/null +++ b/contrib/ci/jobs/6-build-arm64/config.ini @@ -0,0 +1,6 @@ +[build] +HALT_ON_FAILURE = True +WARN_ON_FAILURE = True +CONTAINER_BUILD = True +CONTAINER_NAME = gnunet:arm64 +CONTAINER_ARCH = arm64 diff --git a/contrib/ci/jobs/6-build-arm64/job.sh b/contrib/ci/jobs/6-build-arm64/job.sh new file mode 120000 index 000000000..0620e044c --- /dev/null +++ b/contrib/ci/jobs/6-build-arm64/job.sh @@ -0,0 +1 @@ +../../common/build/job.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/7-deb-package-arm64/config.ini b/contrib/ci/jobs/7-deb-package-arm64/config.ini new file mode 100644 index 000000000..b5b4b5fe7 --- /dev/null +++ b/contrib/ci/jobs/7-deb-package-arm64/config.ini @@ -0,0 +1,6 @@ +[build] +HALT_ON_FAILURE = True +WARN_ON_FAILURE = True +CONTAINER_BUILD = True +CONTAINER_NAME = gnunet:arm64 +CONTAINER_ARCH = arm64 diff --git a/contrib/ci/jobs/7-deb-package-arm64/install-fix.patch b/contrib/ci/jobs/7-deb-package-arm64/install-fix.patch new file mode 120000 index 000000000..3b8a8758f --- /dev/null +++ b/contrib/ci/jobs/7-deb-package-arm64/install-fix.patch @@ -0,0 +1 @@ +../../common/deb-package/install-fix.patch
\ No newline at end of file diff --git a/contrib/ci/jobs/7-deb-package-arm64/job.sh b/contrib/ci/jobs/7-deb-package-arm64/job.sh new file mode 120000 index 000000000..3301c9cec --- /dev/null +++ b/contrib/ci/jobs/7-deb-package-arm64/job.sh @@ -0,0 +1 @@ +../../common/deb-package/job.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/7-deb-package-arm64/version.sh b/contrib/ci/jobs/7-deb-package-arm64/version.sh new file mode 120000 index 000000000..ddea5ae8b --- /dev/null +++ b/contrib/ci/jobs/7-deb-package-arm64/version.sh @@ -0,0 +1 @@ +../../common/deb-package/version.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/8-deploy-package-arm64 b/contrib/ci/jobs/8-deploy-package-arm64 new file mode 120000 index 000000000..a58645d78 --- /dev/null +++ b/contrib/ci/jobs/8-deploy-package-arm64 @@ -0,0 +1 @@ +5-deploy-package-amd64
\ No newline at end of file diff --git a/contrib/ci/jobs/9-build-riscv64/build.sh b/contrib/ci/jobs/9-build-riscv64/build.sh new file mode 120000 index 000000000..4c3fda3a5 --- /dev/null +++ b/contrib/ci/jobs/9-build-riscv64/build.sh @@ -0,0 +1 @@ +../../common/build/build.sh
\ No newline at end of file diff --git a/contrib/ci/jobs/9-build-riscv64/config.ini b/contrib/ci/jobs/9-build-riscv64/config.ini new file mode 100644 index 000000000..73914f224 --- /dev/null +++ b/contrib/ci/jobs/9-build-riscv64/config.ini @@ -0,0 +1,6 @@ +[build] +HALT_ON_FAILURE = True +WARN_ON_FAILURE = True +CONTAINER_BUILD = True +CONTAINER_NAME = gnunet:riscv64 +CONTAINER_ARCH = riscv64 diff --git a/contrib/ci/jobs/9-build-riscv64/job.sh b/contrib/ci/jobs/9-build-riscv64/job.sh new file mode 120000 index 000000000..0620e044c --- /dev/null +++ b/contrib/ci/jobs/9-build-riscv64/job.sh @@ -0,0 +1 @@ +../../common/build/job.sh
\ No newline at end of file diff --git a/contrib/ci/riscv64.Containerfile b/contrib/ci/riscv64.Containerfile new file mode 100644 index 000000000..02a1b8bb8 --- /dev/null +++ b/contrib/ci/riscv64.Containerfile @@ -0,0 +1,46 @@ +# This file is separate as trixie does not offer a stable riscv on docker yet. +FROM docker.io/library/debian:unstable + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -yqq && \ + apt-get upgrade -yqq && \ + apt-get install -yqq \ + git \ + autoconf \ + libextractor-dev \ + libjansson-dev \ + libgcrypt-dev \ + libqrencode-dev \ + libpq-dev \ + libmicrohttpd-dev \ + pkg-config \ + libtool \ + recutils \ + make \ + python3-sphinx \ + python3-sphinx-book-theme \ + python3-sphinx-multiversion \ + python3-sphinx-rtd-theme \ + texinfo \ + autopoint \ + curl \ + libcurl4-openssl-dev \ + libsodium-dev \ + libidn11-dev \ + zlib1g-dev \ + libunistring-dev \ + iptables + +# Debian packaging tools +RUN apt-get install -yqq \ + po-debconf \ + build-essential \ + debhelper-compat \ + devscripts \ + git-buildpackage \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /workdir + +CMD ["/bin/bash"] |