Skip to content

Commit

Permalink
Merge pull request #461 from r00t-/github-actions
Browse files Browse the repository at this point in the history
github actions
  • Loading branch information
r00t- committed Mar 14, 2021
2 parents 7787266 + 56995b1 commit b05eb1d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 109 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build+test.yml
@@ -0,0 +1,14 @@
name: build+test
on: [push]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: install deps
run: sudo apt-get install libjson-c-dev libcurl4-openssl-dev libmicrohttpd-dev libgcrypt20-dev libsasl2-dev libunistring-dev libmosquitto-dev
- name: build libsml
run: git clone https://github.com/volkszaehler/libsml.git ../libsml && cd ../libsml && make
- uses: actions/checkout@v2
- run: cmake . -DSML_HOME=../libsml/sml
- run: make
- run: ctest
10 changes: 10 additions & 0 deletions .github/workflows/check-formatting.yml
@@ -0,0 +1,10 @@
name: check-formatting
on: [push]
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- name: install clang-format
run: sudo apt-get install clang-format
- uses: actions/checkout@v2
- run: ./check-formatting.sh
107 changes: 0 additions & 107 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions check-formatting.sh
@@ -0,0 +1,6 @@
#!/bin/bash
set -xe
SRCDIRS=(include src tests)
clang-format --version
find "${SRCDIRS[@]}" -type f -name '*.h' -o -name '*.cpp' -o -name '*.hpp' | xargs -I{} -P1 clang-format -i -style=file {}
[[ -z "$(git status --porcelain "${SRCDIRS[@]}")" ]] || (git status; git diff; false)
2 changes: 1 addition & 1 deletion include/Config_Options.hpp
Expand Up @@ -112,7 +112,7 @@ class Config_Options {
// boolean bitfields, padding at the end of struct
int _channel_index : 1; // give a index of all available channels via local interface
int _local : 1; // enable local interface
int _foreground : 1; // don't daemonize
int _foreground : 1; // don't daemonize
int _doRegistration : 1; // FIXME
};

Expand Down
2 changes: 1 addition & 1 deletion src/local.cpp
Expand Up @@ -134,7 +134,7 @@ int handle_request(void *cls, struct MHD_Connection *connection, const char *url
// mapping between meters and channels
MapContainer *mappings = static_cast<MapContainer *>(cls);

struct MHD_Response *response;
struct MHD_Response *response = NULL;
const char *mode = MHD_lookup_connection_value(connection, MHD_GET_ARGUMENT_KIND, "mode");

try {
Expand Down

0 comments on commit b05eb1d

Please sign in to comment.