mirror of
https://github.com/Telecominfraproject/oopt-tai-implementations.git
synced 2025-10-29 17:22:39 +00:00
Merge pull request #12 from Telecominfraproject/mux
- mux: update the TAI submodule - ci: move to github action
This commit is contained in:
16
.github/workflows/ci.yml
vendored
Normal file
16
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: crazy-max/ghaction-docker-buildx@v1
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- run: make -C tai_mux builder
|
||||
- run: TAI_DOCKER_RUN_OPTION='--rm' TAI_DOCKER_CMD='make test' make -C tai_mux cmd
|
||||
12
.travis.yml
12
.travis.yml
@@ -1,12 +0,0 @@
|
||||
sudo: required
|
||||
|
||||
language: cpp # we run all tests in docker container so this can be anything
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
before_install:
|
||||
- make -C tai_mux docker-image
|
||||
|
||||
script:
|
||||
- TAI_DOCKER_CMD='make test' make -C tai_mux cmd
|
||||
@@ -24,6 +24,10 @@ ifndef TAI_MUX_BUILDDIR
|
||||
TAI_MUX_BUILDDIR := build
|
||||
endif
|
||||
|
||||
ifndef TAI_DOCKER_RUN_OPTION
|
||||
TAI_DOCKER_RUN_OPTION := -it --rm
|
||||
endif
|
||||
|
||||
CFLAGS := -std=c++17 -g3 -shared -fPIC -DTAI_EXPOSE_PLATFORM -fno-gnu-unique
|
||||
|
||||
INCLUDES := -I $(TAI_DIR)/inc -I $(TAI_DIR)/meta -I $(TAI_LIB_DIR) -I $(TAI_FRAMEWORK_DIR) -include mux.hpp
|
||||
@@ -34,7 +38,7 @@ HEADERS := $(wildcard *.hpp $(TAI_LIB_DIR)/*.hpp $(TAI_FRAMEWORK_DIR)/*.hpp)
|
||||
OBJECTS := $(addprefix $(BUILDDIR)/,$(SOURCES:%.cpp=%.o))
|
||||
DEPS := $(addprefix $(BUILDDIR)/,$(SOURCES:%.cpp=%.d))
|
||||
|
||||
.PHONY = all meta test cmd docker docker-image bash clean clean-all
|
||||
.PHONY = all meta test cmd docker builder bash clean clean-all
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
@@ -56,12 +60,12 @@ test:
|
||||
$(MAKE) -C tests
|
||||
|
||||
cmd:
|
||||
TAI_DOCKER_CMD="$(TAI_DOCKER_CMD)" TAI_DOCKER_RUN_OPTION="--privileged --net=host -it --rm" TAI_DOCKER_MOUNT="`pwd`:/data" $(MAKE) -C $(TAI_DIR) $@
|
||||
TAI_DOCKER_MOUNT="`pwd`:/data" $(MAKE) -C $(TAI_DIR) $@
|
||||
|
||||
docker:
|
||||
TAI_DOCKER_CMD="make" $(MAKE) cmd
|
||||
|
||||
docker-image:
|
||||
builder:
|
||||
$(MAKE) -C $(TAI_DIR) $@
|
||||
|
||||
bash:
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace tai::mux {
|
||||
m_pa = std::make_shared<StaticPlatformAdapter>(0, services);
|
||||
break;
|
||||
default:
|
||||
ERROR("unsupported platform_adapter: %s", pa_name.c_str());
|
||||
TAI_ERROR("unsupported platform_adapter: %s", pa_name.c_str());
|
||||
throw Exception(TAI_STATUS_NOT_SUPPORTED);
|
||||
}
|
||||
}
|
||||
|
||||
Submodule tai_mux/oopt-tai updated: 4ca1e6d61f...0a483c5c95
@@ -27,7 +27,7 @@ namespace tai::mux {
|
||||
auto dst = std::make_shared<Attribute>(meta, src);
|
||||
auto ret = convert_oid(ctx->object_type, oid, dst, dst, true);
|
||||
if ( ret != TAI_STATUS_SUCCESS ) {
|
||||
ERROR("failed to convert oid of attribute: %d", src.id);
|
||||
TAI_ERROR("failed to convert oid of attribute: %d", src.id);
|
||||
continue;
|
||||
}
|
||||
attrs.emplace_back(dst);
|
||||
|
||||
Reference in New Issue
Block a user