1
0
mirror of https://github.com/3cky/mbusd synced 2025-10-26 23:46:44 +08:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Jakob Schlyter
55889a7292
Add simple Dockerfile for running mbusd containerized (#79)
* init

* simplify

* explicit gcc not needed

* do not clone repository, copy source from cwd (or we cannot build releases)
2021-11-15 14:04:04 +03:00
Victor Antonovich
cb9576a5a0 Remove travis.yml 2021-11-15 13:09:24 +03:00
Victor Antonovich
16e68947ce Move to Github Actions build status badge 2021-11-15 13:08:32 +03:00
Victor Antonovich
bf98aa6382 Install Twisted as test dependency into github build workflow 2021-11-15 13:01:40 +03:00
Victor Antonovich
dd71375628 Install socat as test dependency into github build workflow 2021-11-15 12:53:52 +03:00
Victor Antonovich
af0534d18f Install python and test dependencies into github build workflow 2021-11-15 12:31:10 +03:00
4 changed files with 26 additions and 22 deletions

View File

@ -15,7 +15,11 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
@ -25,8 +29,16 @@ jobs:
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twisted pymodbus
sudo apt-get install -y socat
- name: Run tests
working-directory: ${{github.workspace}}/build
# Execute tests
run: make test
- name: Show failed test log
if: ${{ failure() }}
run: cat ${{github.workspace}}/build/Testing/Temporary/LastTest.log

View File

@ -1,18 +0,0 @@
sudo: required
dist: trusty
language: c
compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
script:
- mkdir build
- cd build
- cmake ..
- make

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM alpine:latest AS build
RUN apk add --no-cache alpine-sdk cmake
COPY . /mbusd
WORKDIR /mbusd/build
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr .. && make && make install
FROM alpine:latest AS scratch
ENV QEMU_EXECVE=1
COPY --from=build /usr/bin/mbusd /usr/bin/mbusd
ENTRYPOINT ["/usr/bin/mbusd", "-d", "-L", "-", "-c", "/etc/mbusd.conf"]

View File

@ -1,7 +1,7 @@
About mbusd
===========
[![Build Status](https://travis-ci.org/3cky/mbusd.svg?branch=master)](https://travis-ci.org/3cky/mbusd)
[![mbusd](https://github.com/3cky/mbusd/actions/workflows/build.yml/badge.svg)](https://github.com/3cky/mbusd/actions/workflows/build.yml)
**mbusd** is open-source [Modbus TCP to Modbus RTU (RS-232/485)](https://en.wikipedia.org/wiki/Modbus)
gateway. It presents a network of RTU slaves as single TCP slave.