Skip to content

Update Github Actions #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CMake Build and Test

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup
run: |
sudo apt update
sudo apt install build-essential cmake
sudo apt install libgtest-dev libgmock-dev libmosquitto-dev
- uses: actions/checkout@v3
- name: Build
run: cmake -B build && cmake --build build
- name: Test
run: find ./build -name *_test -exec {} \;
12 changes: 7 additions & 5 deletions .github/workflows/build.yml → .github/workflows/make.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Make Build and Test

on:
push:
Expand All @@ -10,11 +10,13 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: setup
- name: Setup
run: |
sudo apt update
sudo apt install build-essential
sudo apt install libgtest-dev libgmock-dev libmosquitto-dev
- uses: actions/checkout@v2
- name: build
run: make 3rd-party modules RELEASE=1 STAGING_DIR=$HOME/.tbox
- uses: actions/checkout@v3
- name: Build
run: make
- name: Test
run: find .build -name test -exec {} \;
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ option(TBOX_ENABLE_NETWORK "build network" ON)
option(TBOX_ENABLE_TERMINAL "build terminal" ON)
option(TBOX_ENABLE_MAIN "build main" ON)

option(TBOX_ENABLE_COROUTINE "build coroutine" OFF)
option(TBOX_ENABLE_HTTP "build http" OFF)
option(TBOX_ENABLE_MQTT "build mqtt" OFF)
option(TBOX_ENABLE_FLOW "build flow" OFF)
option(TBOX_ENABLE_ALARM "build alarm" OFF)
option(TBOX_ENABLE_CRYPTO "build crypto" OFF)
option(TBOX_ENABLE_COROUTINE "build coroutine" ON)
option(TBOX_ENABLE_HTTP "build http" ON)
option(TBOX_ENABLE_MQTT "build mqtt" ON)
option(TBOX_ENABLE_FLOW "build flow" ON)
option(TBOX_ENABLE_ALARM "build alarm" ON)
option(TBOX_ENABLE_CRYPTO "build crypto" ON)

#
# 3rd-party libraries
Expand Down Expand Up @@ -226,4 +226,3 @@ install(
"${CMAKE_CURRENT_BINARY_DIR}/tboxConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/tbox
)

1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ _If we have forgotten your name, please contact us_

* Hevake Lee
* Lucas Law
* Gwill
12 changes: 6 additions & 6 deletions config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ MODULES += main
MODULES += run

## 非核心模块,请根据需要选择
#MODULES += coroutine
#MODULES += http
#MODULES += mqtt
#MODULES += flow
#MODULES += alarm
#MODULES += crypto
MODULES += coroutine
MODULES += http
MODULES += mqtt
MODULES += flow
MODULES += alarm
MODULES += crypto

## 第三方库依赖
THIRDPARTY += nlohmann
4 changes: 2 additions & 2 deletions modules/terminal/impl/service/telnetd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void Telnetd::Impl::sendNego(const TcpServer::ConnToken &ct, Cmd cmd, Opt o)

void Telnetd::Impl::sendCmd(const TcpServer::ConnToken &ct, Cmd cmd)
{
const uint8_t tmp[] = { Cmd::kIAC, cmd};
const uint8_t tmp[] = { Cmd::kIAC, cmd };
send(ct, tmp, sizeof(tmp));
}

Expand All @@ -182,7 +182,7 @@ void Telnetd::Impl::sendSub(const TcpServer::ConnToken &ct, Opt o, const uint8_t
uint8_t tmp[size];
tmp[0] = Cmd::kIAC;
tmp[1] = Cmd::kSB;
tmp[2] = 0;
tmp[2] = o;
memcpy(tmp + 3, p, s);
tmp[size-2] = Cmd::kIAC;
tmp[size-1] = Cmd::kSE;
Expand Down
2 changes: 1 addition & 1 deletion version.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TBOX版本号
TBOX_VERSION_MAJOR := 1
TBOX_VERSION_MINOR := 5
TBOX_VERSION_REVISION := 14
TBOX_VERSION_REVISION := 15