-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/_build | ||
/build | ||
.git | ||
.github | ||
Dockerfile* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: libmbus | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: build examples and tests | ||
run: | | ||
./build.sh | ||
cd test && make | ||
cd .. | ||
- name: generate test frames | ||
run: | | ||
PROG=test/mbus_parse_hex | ||
./test/generate-xml.sh test/test-frames $PROG | ||
echo "NOTE: error-frames have about 30 parse errors, and unsupported-frames have 12" | ||
./test/generate-xml.sh test/error-frames $PROG || true | ||
./test/generate-xml.sh test/unsupported-frames $PROG || true | ||
- name: install and run gcovr | ||
run: sudo pip install gcovr && gcovr . | ||
|
||
debian: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install packages | ||
run: | | ||
sudo apt update -y | ||
sudo apt install -y debhelper devscripts dh-autoreconf dpkg-dev fakeroot | ||
- name: build debian package | ||
run: | | ||
./build-deb.sh | ||
sudo dpkg -i ../*.deb | ||
ls /usr/lib | ||
# doc: | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: build doxygen documentation | ||
# run: sudo apt install -y doxygen | ||
# | ||
# - name: build doxygen documentation | ||
# run: | | ||
# rm -rf build || true | ||
# mkdir build | ||
# cd build | ||
# cmake .. -DLIBMBUS_BUILD_DOCS=ON | ||
# cmake --build . --target doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# docker build . -f Dockerfile.deb -t deb_builder | ||
|
||
FROM ubuntu | ||
|
||
RUN apt update -y && apt install -y gcc g++ make && \ | ||
apt-get install -y autoconf libtool | ||
# What package is debuild | ||
RUN apt-get install -y gnupg dput dh-make devscripts lintian | ||
COPY . /tmp | ||
RUN cd /tmp && \ | ||
./build-deb.sh && \ | ||
ls -al . .. && \ | ||
cd .. && \ | ||
dpkg -i *.deb || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# docker build . -f Dockerfile.test -t test_builder | ||
|
||
FROM ubuntu | ||
|
||
RUN apt update -y && \ | ||
apt install -y gcc g++ make && \ | ||
apt-get install -y autoconf libtoolw | ||
COPY . /tmp | ||
RUN cd /tmp && \ | ||
./build.sh && \ | ||
cd test && \ | ||
make && \ | ||
./generate-xml.sh test-frames/ ./mbus_parse_hex | ||
|
||
RUN cd /tmp && \ | ||
echo "NOTE: error-frames have about 30 parse errors, and unsupported-frames have 12" && \ | ||
./test/generate-xml.sh test/error-frames || true ; \ | ||
./test/generate-xml.sh test/unsupported-frames || true |