From 785e2199e19a0f3797bcb59d2cd910a1a5913131 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Tue, 27 Aug 2024 21:43:50 +0200 Subject: [PATCH] Add Dockerfile with hamnet70 build dependencies --- ci/docker/impl/Dockerfile | 11 +++++++++++ ci/docker/impl/build.sh | 8 ++++++++ ci/docker/impl/test.sh | 8 ++++++++ ci/docker/impl/upload.sh | 10 ++++++++++ 4 files changed, 37 insertions(+) create mode 100644 ci/docker/impl/Dockerfile create mode 100755 ci/docker/impl/build.sh create mode 100755 ci/docker/impl/test.sh create mode 100755 ci/docker/impl/upload.sh diff --git a/ci/docker/impl/Dockerfile b/ci/docker/impl/Dockerfile new file mode 100644 index 0000000..26227fe --- /dev/null +++ b/ci/docker/impl/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:stable + +# for Forgejo Actions +RUN apt update && apt install -y --no-install-recommends nodejs git && apt clean + +# Hamnet70 build dependencies +RUN apt install -y --no-install-recommends cmake make gcc libc-dev libliquid-dev libhackrf-dev libfec-dev libfftw3-dev && apt clean + +# run as unprivileged user in the container +RUN useradd -m ciuser +USER ciuser diff --git a/ci/docker/impl/build.sh b/ci/docker/impl/build.sh new file mode 100755 index 0000000..1500172 --- /dev/null +++ b/ci/docker/impl/build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "usage: $0 " + exit 1 +fi + +docker build -t git.tkolb.de/amateurfunk/hamnet70/impl_buildenv:$1 . diff --git a/ci/docker/impl/test.sh b/ci/docker/impl/test.sh new file mode 100755 index 0000000..986308e --- /dev/null +++ b/ci/docker/impl/test.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "usage: $0 " + exit 1 +fi + +docker run -v $(realpath ../../../impl):/impl -it git.tkolb.de/amateurfunk/hamnet70/impl_buildenv:$1 diff --git a/ci/docker/impl/upload.sh b/ci/docker/impl/upload.sh new file mode 100755 index 0000000..63a7857 --- /dev/null +++ b/ci/docker/impl/upload.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "usage: $0 " + exit 1 +fi + +docker login +docker push git.tkolb.de/amateurfunk/hamnet70/impl_buildenv:$1 +docker logout