Skip to content

Commit

Permalink
* enabling GH actions
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berger <christian.berger@gu.se>
  • Loading branch information
chrberger committed Dec 4, 2021
1 parent 9c96625 commit d268b5c
Show file tree
Hide file tree
Showing 7 changed files with 3,563 additions and 2,853 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Docker Image CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release

on:
release:
types: [published]

jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: build and push
id: docker_build_and_push
uses: docker/build-push-action@v2
with:
file: Dockerfile
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
ghcr.io/chrberger/cluon-livefeed:latest
ghcr.io/chrberger/cluon-livefeed:${{ github.event.release.tag_name }}
9 changes: 5 additions & 4 deletions Dockerfile.amd64 → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019 Christian Berger
# Copyright (C) 2021 Christian Berger
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -14,15 +14,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# Part to build cluon-livefeed.
FROM alpine:3.7 as builder
FROM alpine:3.15 as builder
MAINTAINER Christian Berger "christian.berger@gu.se"

RUN apk update && \
apk --no-cache add \
g++
g++ \
linux-headers
ADD . /opt/sources
WORKDIR /opt/sources
RUN ln -sf cluon-complete-v0.0.122.hpp cluon-complete.cpp && \
RUN ln -sf cluon-complete-v0.0.140.hpp cluon-complete.cpp && \
g++ -std=c++14 -Wall -D HAVE_CLUON_LIVEFEED -pthread -s -static -static-libgcc -static-libstdc++ -o /tmp/cluon-livefeed cluon-complete.cpp


Expand Down
44 changes: 0 additions & 44 deletions Dockerfile.aarch64

This file was deleted.

44 changes: 0 additions & 44 deletions Dockerfile.armhf

This file was deleted.

11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

`cluon-livefeed` is a microservice for [libcluon](https://github.com/chrberger/libcluon)-based [OD4Sessions](https://github.com/chalmers-revere/opendlv) to display the currently exchanged messages in [`Envelope`](https://github.com/chrberger/libcluon/blob/master/libcluon/resources/cluonDataStructures.odvd#L23-L30) data format.

[![License](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://raw.githubusercontent.com/chrberger/libcluon/master/LICENSE) [![x86_64](https://img.shields.io/badge/platform-x86_64-blue.svg)](https://hub.docker.com/r/chrberger/cluon-livefeed-amd64/tags/) [![armhf](https://img.shields.io/badge/platform-armhf-blue.svg)](https://hub.docker.com/r/chrberger/cluon-livefeed-armhf/tags/) [![aarch64](https://img.shields.io/badge/platform-aarch64-blue.svg)](https://hub.docker.com/r/chrberger/cluon-livefeed-aarch64/tags/) [![multi](https://img.shields.io/badge/platform-multi-blue.svg)](https://hub.docker.com/r/chrberger/cluon-livefeed-multi/tags/)
[![License](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://raw.githubusercontent.com/chrberger/libcluon/master/LICENSE)

## Table of Contents
* [Features](#features)
Expand All @@ -24,21 +24,16 @@ project as it ships its dependencies as part of the source distribution:
)](https://www.gnu.org/licenses/gpl-3.0.txt)

## Usage
This microservice is created automatically on changes to this repository via Docker's public registry for:
* [x86_64](https://hub.docker.com/r/chrberger/cluon-livefeed-amd64/tags/)
* [armhf](https://hub.docker.com/r/chrberger/cluon-livefeed-armhf/tags/)
* [aarch64](https://hub.docker.com/r/chrberger/cluon-livefeed-aarch64/tags/)

This microservice is supposed to be used in parallel with a running [OD4Sessions](https://github.com/chalmers-revere/opendlv) with other microservices that exchange messages in [`Envelope`](https://github.com/chrberger/libcluon/blob/master/libcluon/resources/cluonDataStructures.odvd#L23-L30) data format. The purpose of this microservice to display the type and timestamps of the currently exchanged messages on console. It can be used as shown in the following:

```
docker run --rm -ti --init --net=host chrberger/cluon-livefeed-multi:v0.0.122 --cid=111
docker run --rm -ti --init --net=host ghcr.io/chrberger/cluon-livefeed:latest --cid=111
```

Additionally, you can supply a message specification in `.odvd`-file like, for example, the [OpenDLV Standard Message Set](https://github.com/chalmers-revere/opendlv.standard-message-set/blob/master/opendlv.odvd) to dynamically resolve the data types of the exchanged messages. In the following, it is assumed that you have the `.odvd`-file named `example.odvd` residing in the current working directory:

```
docker run --rm -ti --init --net=host -v $PWD:/opt chrberger/cluon-livefeed-multi:v0.0.122 --cid=111 --odvd=/opt/example.odvd
docker run --rm -ti --init --net=host -v $PWD:/opt ghcr.io/chrberger/cluon-livefeed:latest --cid=111 --odvd=/opt/example.odvd
```

## License
Expand Down
Loading

0 comments on commit d268b5c

Please sign in to comment.