Skip to content

Commit

Permalink
Merge pull request #996 from fengzeroz/v2.3
Browse files Browse the repository at this point in the history
V2.3
  • Loading branch information
fengzeroz authored Dec 23, 2022
2 parents b09b998 + 8e0d796 commit 7025f71
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 60 deletions.
54 changes: 3 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
- published

env:
VERSION: 2.3.0
UI_VERSION: 2.3
VERSION: 2.3.1
UI_VERSION: 2.3.1
BRANCH: v2.3

jobs:
Expand Down Expand Up @@ -58,54 +58,6 @@ jobs:
path: |
neuron-sdk-*.tar.gz
cross-build-old:
runs-on: ubuntu-18.04
strategy:
matrix:
arch:
- [aarch64-linux-gnu, aarch64, arm64]
- [arm-linux-gnueabihf, armv4, armhf]
- [x86_64-linux-gnu, x86_64, amd64]
container: neugates/build_old:${{ matrix.arch[1] }}-2.3

steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v3
with:
repository: troydhanson/uthash
path: extern/uthash

- name: compile
run: |
git config --global --add safe.directory $(pwd)
mkdir -p build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/${{ matrix.arch[0] }}.cmake \
-DCMAKE_BUILD_TYPE=Release -DDISABLE_UT=ON
make -j4
- name: fetch dashboard
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "emqx/neuron-dashboard-src"
version: "tags/${{ env.UI_VERSION }}"
file: "neuron-dashboard.zip"
target: "neuron-dashboard.zip"

- name: unpack dashboard
run: |
unzip neuron-dashboard.zip -d ./build
- name: Create neuron sdk package
run: |
./package-sdk.sh -p ${{ matrix.arch[2] }} -n neuron-sdk-old-$VERSION
- uses: actions/upload-artifact@v3
with:
name: neuron-sdk-old-${{ matrix.arch[2] }}
path: |
neuron-sdk-old-*.tar.gz
build-debug-sdk:
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -178,7 +130,7 @@ jobs:
strategy:
matrix:
arch: [arm64, armhf, amd64]
type: [neuron-sdk, neuron-sdk-old]
type: [neuron-sdk]
package: [tar.gz]

steps:
Expand Down
4 changes: 3 additions & 1 deletion cmake/aarch64-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME Linux)
set(COMPILER_PREFIX aarch64-linux-gnu)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(LIBRARY_DIR /opt/externs/libs)
set(LIBRARY_DIR /home/neuron/libs)

set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
Expand All @@ -20,3 +20,5 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
link_directories(${CMAKE_STAGING_PREFIX})

file(COPY ${CMAKE_STAGING_PREFIX}/lib/libzlog.so.1.2 DESTINATION /usr/local/lib)
4 changes: 3 additions & 1 deletion cmake/arm-linux-gnueabi.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME Linux)
set(COMPILER_PREFIX arm-linux-gnueabi)
set(CMAKE_SYSTEM_PROCESSOR armv5tejl)
set(LIBRARY_DIR /opt/externs/libs)
set(LIBRARY_DIR /home/neuron/libs)

set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
Expand All @@ -20,3 +20,5 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
link_directories(${CMAKE_STAGING_PREFIX})

file(COPY ${CMAKE_STAGING_PREFIX}/lib/libzlog.so.1.2 DESTINATION /usr/local/lib)
4 changes: 3 additions & 1 deletion cmake/arm-linux-gnueabihf.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_NAME Linux)
set(COMPILER_PREFIX arm-linux-gnueabihf)
set(CMAKE_SYSTEM_PROCESSOR armv7l)
set(LIBRARY_DIR /opt/externs/libs)
set(LIBRARY_DIR /home/neuron/libs)

set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
Expand All @@ -20,3 +20,5 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
link_directories(${CMAKE_STAGING_PREFIX})

file(COPY ${CMAKE_STAGING_PREFIX}/lib/libzlog.so.1.2 DESTINATION /usr/local/lib)
21 changes: 19 additions & 2 deletions cmake/x86_64-linux-gnu.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
set(CMAKE_SYSTEM_NAME Linux)
set(COMPILER_PREFIX x86_64-linux-gnu)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(LIBRARY_DIR /usr/local)
set(LIBRARY_DIR /home/neuron/libs)

set(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-g++)
set(CMAKE_AR ${COMPILER_PREFIX}-ar)
set(CMAKE_LINKER ${COMPILER_PREFIX}-ld)
set(CMAKE_NM ${COMPILER_PREFIX}-nm)
set(CMAKE_OBJDUMP ${COMPILER_PREFIX}-objdump)
set(CMAKE_RANLIB ${COMPILER_PREFIX}-ranlib)
set(CMAKE_STAGING_PREFIX ${LIBRARY_DIR}/${COMPILER_PREFIX})
set(CMAKE_PREFIX_PATH ${CMAKE_STAGING_PREFIX})
set(CMAKE_PREFIX_PATH ${CMAKE_STAGING_PREFIX})

include_directories(SYSTEM ${CMAKE_STAGING_PREFIX}/include)
include_directories(SYSTEM ${CMAKE_STAGING_PREFIX}/openssl/include)
set(CMAKE_FIND_ROOT_PATH ${CMAKE_STAGING_PREFIX})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
link_directories(${CMAKE_STAGING_PREFIX})

file(COPY ${CMAKE_STAGING_PREFIX}/lib/libzlog.so.1.2 DESTINATION /usr/local/lib)
2 changes: 1 addition & 1 deletion package-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cp -r build/dist ${package_name}/

cp build/neuron ${package_name}
cp build/libneuron-base.so ${package_name}/lib
cp /library/zlog/src/libzlog.so.1.2 ${package_name}/lib
cp /usr/local/lib/libzlog.so.1.2 ${package_name}/lib

cp persistence/*.sql ${package_name}/config/

Expand Down
2 changes: 1 addition & 1 deletion src/adapter/driver/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ int neu_adapter_driver_add_group(neu_adapter_driver_t *driver, const char *name,
.second = interval / 1000,
.millisecond = interval % 1000,
.usr_data = (void *) find,
.type = NEU_EVENT_TIMER_BLOCK,
.type = NEU_EVENT_TIMER_NOBLOCK,
};

find->driver = driver;
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ target_include_directories(jwt_test PRIVATE
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/src/utils)
target_link_libraries(jwt_test neuron-base gtest_main gtest jansson ssl crypto jwt)
target_link_libraries(jwt_test neuron-base gtest_main gtest jansson ssl crypto jwt libzlog.so)

add_executable(base64_test base64_test.cc ${CMAKE_SOURCE_DIR}/src/utils/base64.c)
target_include_directories(base64_test PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0
2.3.1

0 comments on commit 7025f71

Please sign in to comment.