feature test env
Some checks failed
rpcrypto-build / build (Release, mips64el-linux-gnuabi64.toolchain.cmake) (push) Waiting to run
rpcrypto-build / build (Release, mipsel-openwrt-linux-musl.toolchain.cmake) (push) Waiting to run
rpcrypto-build / build (Release, mipsel-openwrt-linux.toolchain.cmake) (push) Waiting to run
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 1m9s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Successful in 1m11s
rpcrypto-build / build (Debug, hisiv500.toolchain.cmake) (push) Successful in 1m23s
rpcrypto-build / build (Debug, host-afl.toolchain.cmake) (push) Failing after 1m50s
rpcrypto-build / build (Debug, mips64el-linux-gnuabi64.toolchain.cmake) (push) Successful in 1m9s
rpcrypto-build / build (Debug, host.toolchain.cmake) (push) Failing after 2m23s
rpcrypto-build / build (Debug, mipsel-openwrt-linux-musl.toolchain.cmake) (push) Successful in 1m14s
rpcrypto-build / build (Debug, mipsel-openwrt-linux.toolchain.cmake) (push) Successful in 1m22s
rpcrypto-build / build (Release, host-afl.toolchain.cmake) (push) Has been cancelled
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Has been cancelled
rpcrypto-build / build (Release, host.toolchain.cmake) (push) Has been cancelled
rpcrypto-build / build (Release, hisiv500.toolchain.cmake) (push) Has been cancelled
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Has been cancelled

This commit is contained in:
tqcq 2023-12-05 15:52:30 +08:00
parent 2728f2d5e7
commit 60f965cce3
5 changed files with 13 additions and 20 deletions

View File

@ -33,7 +33,7 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=toolchains/${{ matrix.toolchain }} \ -DCMAKE_TOOLCHAIN_FILE=toolchains/${{ matrix.toolchain }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=./install \ -DCMAKE_INSTALL_PREFIX=./install \
-DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_VERBOSE_MAKEFILE=ON ${CUSTOM_CMAKE_ARGS}
cmake --build build --config ${{ matrix.build_type }} --target all -- -j `nproc` cmake --build build --config ${{ matrix.build_type }} --target all -- -j `nproc`
cmake --build build --config ${{ matrix.build_type }} --target install cmake --build build --config ${{ matrix.build_type }} --target install
steps: steps:
@ -52,7 +52,7 @@ jobs:
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install -y libarchive-dev libssl-dev autoconf libtool pkg-config cmake make gcc g++ sudo apt-get install -y libarchive-dev libssl-dev autoconf libtool pkg-config cmake make gcc g++
${{ env.build_command }} -DULIB_BUILD_TESTS=ON ${{ env.build_command }}
- name: run_gtest - name: run_gtest
if: matrix.toolchain == 'host.toolchain.cmake' if: matrix.toolchain == 'host.toolchain.cmake'
@ -68,6 +68,7 @@ jobs:
export AFL_LLVM_LAF_ALL=1 export AFL_LLVM_LAF_ALL=1
export CC=/usr/bin/afl-clang-fast export CC=/usr/bin/afl-clang-fast
export CXX=/usr/bin/afl-clang-fast++ export CXX=/usr/bin/afl-clang-fast++
export CUSTOM_CMAKE_ARGS="-DULIB_BUILD_TESTS=ON"
${{ env.build_command }} ${{ env.build_command }}
- name: build-in-centos - name: build-in-centos

View File

@ -32,9 +32,6 @@ target_link_libraries(${PROJECT_NAME} PUBLIC fmt::fmt)
target_compile_definitions(${PROJECT_NAME} PRIVATE ULIB_LIBRARY_IMPL) target_compile_definitions(${PROJECT_NAME} PRIVATE ULIB_LIBRARY_IMPL)
target_include_directories(${PROJECT_NAME} PUBLIC src) target_include_directories(${PROJECT_NAME} PUBLIC src)
add_executable(ulib_main_test src/main.cpp)
target_link_libraries(ulib_main_test PRIVATE ${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME} DESTINATION lib) install(TARGETS ${PROJECT_NAME} DESTINATION lib)
if(ULIB_BUILD_TESTS) if(ULIB_BUILD_TESTS)

View File

@ -1,13 +0,0 @@
//
// Created by tqcq on 2023/12/5.
//
#include <string>
#include <ulib/log/log.h>
#include <string.h>
int main(int argc, char* argv[]) {
ULOG_SET_STRIPPED_PREFIX_LEN(strlen(__FILE__) - strlen("src/main.cpp"));
ULOG_TRACE("Hello, world!");
return 0;
}

View File

@ -4,7 +4,12 @@ project(ulib_test)
set(CMAKE_CXX_STANDARD 98) set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(ulib_test src/ulib/sigslot/sigslot_test.cpp) add_executable(ulib_test
target_link_libraries(ulib_test gtest gtest_main) src/ulib/sigslot/sigslot_test.cpp)
target_link_libraries(ulib_test PRIVATE
ulib
gtest
gtest_main)
add_test(NAME ulib_test COMMAND ulib_test) add_test(NAME ulib_test COMMAND ulib_test)

View File

@ -1,3 +1,6 @@
// //
// Created by tqcq on 2023/12/5. // Created by tqcq on 2023/12/5.
// //
#include <ulib/sigslot/sigslot.h>