Skip to content

Build and push container images to GHCR #179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build

on:
push:
branches:
- main

jobs:
build-and-push-image:
strategy:
matrix:
feature:
- goesproc
- goesrecv
platform:
- linux/arm64
- linux/amd64
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Log into registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
build-args:
version=latest
context: .
target: ${{ matrix.feature }}
platforms: ${{ matrix.platform }}
push: true
tags: ghcr.io/${{ github.repository }}/${{ matrix.feature }}:latest
labels: ${{ steps.meta.outputs.labels }}
34 changes: 0 additions & 34 deletions .github/workflows/build.yml

This file was deleted.

16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon")

# Assume Raspbian if we're cross compiling for ARM
if(CMAKE_CROSSCOMPILING)
# Raspbian supports multiarch and as such places libraries in
# directories named after their architecture identifier.
shift_link_directories(${RASPBERRYPI_SYSROOT}/lib/arm-linux-gnueabihf)
shift_link_directories(${RASPBERRYPI_SYSROOT}/usr/lib/arm-linux-gnueabihf)
set(ENV{PKG_CONFIG_PATH} "${RASPBERRYPI_SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig")
set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RASPBERRYPI_SYSROOT}")
endif()
#if(CMAKE_CROSSCOMPILING)
# # Raspbian supports multiarch and as such places libraries in
# # directories named after their architecture identifier.
# shift_link_directories(${RASPBERRYPI_SYSROOT}/lib/arm-linux-gnueabihf)
# shift_link_directories(${RASPBERRYPI_SYSROOT}/usr/lib/arm-linux-gnueabihf)
# set(ENV{PKG_CONFIG_PATH} "${RASPBERRYPI_SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig")
# set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RASPBERRYPI_SYSROOT}")
#endif()
endif()

if(SANITIZE_ADDRESS OR SANITIZE_MEMORY OR
Expand Down
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ARG version
FROM debian:${version} AS build-env

ENV TZ="Etc/UTC"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && apt-get install -y build-essential cmake git-core libairspy-dev libopencv-dev libproj-dev librtlsdr-dev zlib1g-dev pkgconf
WORKDIR /build
COPY . /goestools
RUN cmake /goestools
RUN make
RUN ls -al /build

FROM debian:${version} AS goesrecv
ENV TZ="Etc/UTC"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
librtlsdr0 \
libairspy0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /goesrecv
COPY --from=build-env /build/src/goesrecv/goesrecv .
CMD ["./goesrecv","-c","/config/goesrecv.conf"]

FROM debian:${version} AS goesproc
ENV TZ="Etc/UTC"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
libopencv-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /goesproc
COPY --from=build-env /build/src/goesproc/goesproc .
COPY --from=build-env /build/share/goesproc-goesr.conf ./config/goesproc.conf
CMD ["./goesproc","-c","/config/goesproc.conf","--out","/media/","-m","packet","--subscribe","tcp://127.0.0.1:5004"]
19 changes: 0 additions & 19 deletions docker/ubuntu/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions docker/ubuntu/run_cmake.sh

This file was deleted.

6 changes: 0 additions & 6 deletions docker/ubuntu/run_compile.sh

This file was deleted.

2 changes: 1 addition & 1 deletion vendor/libaec
Submodule libaec updated from d808db to be7cc2
2 changes: 1 addition & 1 deletion vendor/libcorrect
Submodule libcorrect updated 1 files
+5 −18 CMakeLists.txt
2 changes: 1 addition & 1 deletion vendor/nanomsg
Submodule nanomsg updated 54 files
+0 −53 .appveyor.yml
+41 −0 .github/workflows/codeql.yml
+22 −0 .github/workflows/darwin.yml
+22 −0 .github/workflows/linux.yml
+22 −0 .github/workflows/windows.yml
+0 −39 .travis.yml
+1 −1 .version
+1 −0 AUTHORS
+41 −7 CMakeLists.txt
+29 −21 README.md
+12 −13 RELEASING
+23 −0 SUPPORT
+34 −0 cmake/nanomsg-config.cmake.in
+29 −0 demo/CMakeLists.txt
+3 −0 demo/README
+1 −1 doc/nanocat.adoc
+1 −1 doc/nn_freemsg.adoc
+2 −2 doc/nn_inproc.adoc
+1 −1 doc/nn_pair.adoc
+5 −1 doc/nn_pubsub.adoc
+1 −1 doc/nn_survey.adoc
+35 −1 src/CMakeLists.txt
+0 −1 src/aio/poller_epoll.inc
+11 −5 src/aio/usock_posix.inc
+76 −43 src/aio/usock_win.inc
+11 −4 src/aio/worker_win.h
+33 −9 src/aio/worker_win.inc
+19 −9 src/core/global.c
+1 −1 src/core/poll.c
+4 −0 src/core/sock.c
+4 −4 src/nn.h
+2 −2 src/pkgconfig.in
+2 −0 src/transports/inproc/sinproc.c
+1 −1 src/transports/ipc/cipc.c
+1 −0 src/transports/ipc/sipc.c
+2 −2 src/transports/tcp/btcp.c
+1 −1 src/transports/tcp/ctcp.c
+40 −2 src/transports/utils/literal.c
+1 −0 src/transports/utils/streamhdr.c
+1 −1 src/transports/ws/bws.c
+1 −1 src/transports/ws/cws.c
+7 −2 src/utils/atomic.c
+51 −66 src/utils/chunkref.c
+3 −6 src/utils/chunkref.h
+43 −120 src/utils/efd_win.inc
+14 −14 src/utils/hash.c
+70 −68 src/utils/sem.c
+11 −11 src/utils/sem.h
+5 −4 src/utils/stopwatch.h
+1 −1 tests/bug777.c
+4 −0 tests/ipc.c
+1 −1 tests/ipc_stress.c
+3 −3 tests/win_sec_attr.c
+2 −0 tools/options.c
2 changes: 1 addition & 1 deletion vendor/tinytoml