mirror of
https://github.com/3cky/mbusd
synced 2025-10-26 23:46:44 +08:00
Compare commits
6 Commits
868d605f5d
...
55889a7292
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55889a7292 | ||
|
|
cb9576a5a0 | ||
|
|
16e68947ce | ||
|
|
bf98aa6382 | ||
|
|
dd71375628 | ||
|
|
af0534d18f |
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
18
.travis.yml
18
.travis.yml
|
|
@ -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
10
Dockerfile
Normal 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"]
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
About mbusd
|
||||
===========
|
||||
|
||||
[](https://travis-ci.org/3cky/mbusd)
|
||||
[](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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user