This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to refs/heads/develop by this push:
new fda7217 Feature/workflows update (#180)
fda7217 is described below
commit fda721751c9eeb369563bc91052cd54cde5c3533
Author: Pepijn Noltes <[email protected]>
AuthorDate: Wed Apr 1 21:33:57 2020 +0200
Feature/workflows update (#180)
* Updates github workflows
* minimises travis config
* refactors build options
Co-authored-by: Alexander Broekhuis <[email protected]>
---
.github/workflows/build.yml | 87 +++++++++-------------
.travis.yml | 22 ------
bundles/device_access/CMakeLists.txt | 2 +-
.../log_writer/log_writer_syslog/CMakeLists.txt | 6 +-
bundles/pubsub/CMakeLists.txt | 26 ++++---
bundles/remote_services/CMakeLists.txt | 2 +-
libs/framework/CMakeLists.txt | 5 +-
libs/utils/CMakeLists.txt | 5 +-
8 files changed, 62 insertions(+), 93 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 82f225b..3015742 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,13 +8,20 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [macOS-10.14]
+ os: [macOS-latest]
#os: [ubuntu-18.04, ubuntu-16.04, macOS-10.14]
- compiler: [gcc, clang]
+ compiler: [clang]
include:
- os: ubuntu-18.04
+ compiler: clang
+ - os: ubuntu-18.04
+ name: sanitizer
compiler: gcc
sanitize: true
+ - os: ubuntu-18.04
+ name: only v3 api
+ compiler: gcc
+ v3_api: true
timeout-minutes: 120
steps:
- name: Checkout source code
@@ -22,85 +29,59 @@ jobs:
- name: Install dependencies
run: |
if [[ "${{ matrix.os }}" == "ubuntu"* ]]; then
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get -qq update
- sudo apt-get install -y uuid-dev libxml2-dev lcov libffi-dev
libcurl4-openssl-dev gcc-4.8 g++-4.8
+ sudo apt-get update
+ sudo apt-get install -yq --no-install-recommends \
+ build-essential \
+ curl \
+ uuid-dev \
+ libjansson-dev \
+ libcurl4-openssl-dev \
+ default-jdk \
+ cmake \
+ libffi-dev \
+ libxml2-dev \
+ libczmq-dev \
+ libcpputest-dev
fi
if [[ "${{ matrix.os }}" == "macOS"* ]]; then
brew update
- brew install lcov libffi zeromq czmq openssl
+ brew install lcov libffi zeromq czmq openssl cpputest
brew link --force libffi
brew unlink openssl && brew link openssl --force
fi
- wget
https://github.com/cpputest/cpputest/releases/download/v3.8/cpputest-3.8.tar.gz
-O /tmp/cpputest.tar.gz
- tar -xzvf /tmp/cpputest.tar.gz -C /tmp
- cd /tmp/cpputest-* && ./configure --prefix=/usr/local && make && sudo
make install && cd -
- if [[ "${{ matrix.os }}" == "ubuntu"* ]]; then
- wget
https://github.com/zeromq/libzmq/releases/download/v4.3.1/zeromq-4.3.1.tar.gz
-O /tmp/zeromq.tar.gz
- tar -xzvf /tmp/zeromq.tar.gz -C /tmp && cd /tmp/zeromq-* && mkdir
build && cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_CURVE=ON .. && make
&& sudo make install
- wget
https://github.com/zeromq/czmq/releases/download/v4.2.0/czmq-4.2.0.tar.gz -O
/tmp/czmq.tar.gz
- tar -xzvf /tmp/czmq.tar.gz -C /tmp && cd /tmp/czmq-* && mkdir build
&& cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. && make && sudo make
install
- fi
- cd /tmp && git clone https://github.com/akheron/jansson.git
jansson-build
- cd jansson-build && git checkout 2.7
- cmake -DJANSSON_BUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local
. && make && sudo make install
cd $GITHUB_WORKSPACE
- name: Build
env:
CC: ${{ matrix.compiler }}
BUILD_OPTIONS: |
- -DBUILD_DEPLOYMENT_ADMIN=ON
- -DBUILD_DEPENDENCY_MANAGER=ON
- -DBUILD_EXAMPLES=ON -DBUILD_LOG_SERVICE=ON
- -DBUILD_LOG_WRITER=ON
- -DBUILD_REMOTE_SERVICE_ADMIN=OFF
- -DBUILD_RSA_REMOTE_SERVICE_ADMIN_DFI=OFF
- -DBUILD_RSA_DISCOVERY_CONFIGURED=ON
- -DBUILD_RSA_DISCOVERY_ETCD=ON
- -DBUILD_RSA_EXAMPLES=ON
- -DBUILD_REMOTE_SHELL=ON
- -DBUILD_SHELL=ON
- -DBUILD_SHELL_TUI=ON -DBUILD_DEVICE_ACCESS=ON
- -DBUILD_DEVICE_ACCESS_EXAMPLE=ON
- -DBUILD_HTTP_ADMIN=ON
- BUILD_OPTIONS_LINUX: |
- -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=ON
- -DBUILD_PUBSUB=ON
- -DBUILD_PUBSUB_PSA_ZMQ=ON
- -DBUILD_PUBSUB_TESTS=ON
- -DBUILD_RSA_DISCOVERY_SHM=ON
+ -DENABLE_TESTING=ON
+ BUILD_OPTIONS_LINUX:
BUILD_OPTIONS_OSX: |
- -DBUILD_RSA_REMOTE_SERVICE_ADMIN_SHM=OFF
- -DBUILD_PUBSUB=OFF
- -DBUILD_RSA_DISCOVERY_SHM=OFF
+ -DFFI_INCLUDE_DIR=/usr/local/opt/libffi/lib/libffi-3.2.1/include
+ -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib
BUILD_OPTIONS_SANITIZE: |
-DENABLE_ADDRESS_SANITIZER=ON
+ BUILD_OPTIONS_V3_API: |
+ -DCELIX_USE_ZIP_INSTEAD_OF_JAR=ON
+ -DCELIX_INSTALL_DEPRECATED_API=OFF
run: |
mkdir build install
cd build
if [[ "${{ matrix.sanitize }}" == "true" ]]; then
export BUILD_OPTIONS="${BUILD_OPTIONS} ${BUILD_OPTIONS_SANITIZE}"
fi
+ if [[ "${{ matrix.v3_api }}" == "true" ]]; then
+ export BUILD_OPTIONS="${BUILD_OPTIONS} ${BUILD_OPTIONS_V3_API}"
+ fi
if [[ "${{ matrix.os }}" == "ubuntu"* ]]; then
cmake -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS}
${BUILD_OPTIONS_LINUX} \
- -DBUILD_FRAMEWORK_TESTS=ON \
- -DBUILD_UTILS-TESTS=ON \
- -DENABLE_TESTING=ON ${BUILD_OPTS} \
-DCMAKE_INSTALL_PREFIX=../install ..
fi
if [[ "${{ matrix.os }}" == "macOS"* ]]; then
cmake -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS} ${BUILD_OPTIONS_OSX}
\
- -DBUILD_FRAMEWORK_TESTS=ON \
- -DBUILD_UTILS-TESTS=ON \
- -DENABLE_TESTING=ON \
- -DFFI_INCLUDE_DIR=/usr/local/opt/libffi/lib/libffi-3.2.1/include
\
- -DFFI_LIBRARY=/usr/local/opt/libffi/lib/libffi.dylib \
- ${BUILD_OPTS} \
-DCMAKE_INSTALL_PREFIX=../install ..
fi
- make all && make deploy && make install
+ make -j && make install
- name: Test
run: |
cd $GITHUB_WORKSPACE/build
diff --git a/.travis.yml b/.travis.yml
index 66d6ea3..a376768 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,28 +22,6 @@ matrix:
dist: bionic
compiler: gcc
name: "Ubuntu Bionic (18) gcc"
- - os: linux
- dist: bionic
- compiler: clang
- name: "Ubuntu Bionic (18) clang"
- - os: osx
- osx_image: xcode10.2
- compiler: clang
- env: MACOSX_DEPLOYMENT_TARGET=10.14
- name: "OSX (10.14) clang"
- - os: linux
- dist: bionic
- compiler: gcc
- env: SANITIZE=1
- name: "Ubuntu Bionic (18) gcc; address sanitizer"
- - os: linux
- dist: bionic
- compiler: gcc
- env:
- - USE_ZIP_INSTEAD_OF_JAR=1
- - ONLY_V3_API=1
- name: "Ubuntu Bionic (18) gcc; only v3 api"
-
#DISABLED ANDROID BUILD
# - os: linux
diff --git a/bundles/device_access/CMakeLists.txt
b/bundles/device_access/CMakeLists.txt
index 63576f6..1848644 100644
--- a/bundles/device_access/CMakeLists.txt
+++ b/bundles/device_access/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(DEVICE_ACCESS "Option to enable building the Device Access
Service bundles" OFF DEPS LAUNCHER LOG_SERVICE SHELL shell_tui)
+celix_subproject(DEVICE_ACCESS "Option to enable building the Device Access
Service bundles" ON DEPS LAUNCHER LOG_SERVICE SHELL shell_tui)
if(DEVICE_ACCESS)
add_subdirectory(device_access)
diff --git a/bundles/logging/log_writer/log_writer_syslog/CMakeLists.txt
b/bundles/logging/log_writer/log_writer_syslog/CMakeLists.txt
index bf6dbc0..13d565f 100644
--- a/bundles/logging/log_writer/log_writer_syslog/CMakeLists.txt
+++ b/bundles/logging/log_writer/log_writer_syslog/CMakeLists.txt
@@ -14,7 +14,11 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-celix_subproject(LOG_WRITER_SYSLOG "Option to enable building the Syslog
Writer" OFF DEPS FRAMEWORK LOG_SERVICE)
+set(LOG_WRITER_SYSLOG_DEFAULT ON)
+if (APPLE)
+ set(LOG_WRITER_SYSLOG_DEFAULT OFF)
+endif ()
+celix_subproject(LOG_WRITER_SYSLOG "Option to enable building the Syslog
Writer" ${LOG_WRITER_SYSLOG_DEFAULT} DEPS FRAMEWORK LOG_SERVICE)
if (LOG_WRITER_SYSLOG)
find_package(Syslog REQUIRED)
diff --git a/bundles/pubsub/CMakeLists.txt b/bundles/pubsub/CMakeLists.txt
index f036740..69dc37c 100644
--- a/bundles/pubsub/CMakeLists.txt
+++ b/bundles/pubsub/CMakeLists.txt
@@ -15,17 +15,20 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(PUBSUB "Option to build the pubsub bundles" OFF DEPS
FRAMEWORK)
+celix_subproject(PUBSUB "Option to build the pubsub bundles" ON DEPS FRAMEWORK)
if (PUBSUB)
- option(BUILD_PUBSUB_PSA_ZMQ "Build ZeroMQ PubSub Admin (LGPL License)" OFF)
+ option(BUILD_PUBSUB_PSA_ZMQ "Build ZeroMQ PubSub Admin (LGPL License)" ON)
if (BUILD_PUBSUB_PSA_ZMQ)
- message(WARNING "Celix will now contain a dependency with a LGPL
License (ZeroMQ). For more information about this, consult the pubsub/README.md
file.")
option(BUILD_ZMQ_SECURITY "Build with security for ZeroMQ." OFF)
add_subdirectory(pubsub_admin_zmq)
endif (BUILD_PUBSUB_PSA_ZMQ)
- option(BUILD_PUBSUB_PSA_TCP "Build TCP PubSub Admin" OFF)
+ set(BUILD_PUBSUB_PSA_TCP_DEFAULT ON)
+ if (APPLE)
+ set(BUILD_PUBSUB_PSA_TCP_DEFAULT OFF)
+ endif ()
+ option(BUILD_PUBSUB_PSA_TCP "Build TCP PubSub Admin"
${BUILD_PUBSUB_PSA_TCP_DEFAULT})
if (BUILD_PUBSUB_PSA_TCP)
add_subdirectory(pubsub_admin_tcp)
if (APPLE)
@@ -33,7 +36,11 @@ if (PUBSUB)
endif ()
endif (BUILD_PUBSUB_PSA_TCP)
- option(BUILD_PUBSUB_PSA_UDP_MC "Build UDP MC PubSub Admin" OFF)
+ set(BUILD_PUBSUB_PSA_UDP_MC_DEFAULT ON)
+ if (APPLE)
+ set(BUILD_PUBSUB_PSA_UDP_MC_DEFAULT OFF)
+ endif ()
+ option(BUILD_PUBSUB_PSA_UDP_MC "Build UDP MC PubSub Admin"
${BUILD_PUBSUB_PSA_UDP_MC_DEFAULT})
if (BUILD_PUBSUB_PSA_UDP_MC)
add_subdirectory(pubsub_admin_udp_mc)
if (APPLE)
@@ -41,7 +48,11 @@ if (PUBSUB)
endif ()
endif (BUILD_PUBSUB_PSA_UDP_MC)
- option(BUILD_PUBSUB_PSA_WS "Build WebSocket PubSub Admin" ON)
+ set(BUILD_PUBSUB_PSA_WS_DEFAULT ON)
+ if (APPLE)
+ set(BUILD_PUBSUB_PSA_WS_DEFAULT OFF)
+ endif ()
+ option(BUILD_PUBSUB_PSA_WS "Build WebSocket PubSub Admin"
${BUILD_PUBSUB_PSA_WS_DEFAULT})
if (BUILD_PUBSUB_PSA_WS)
add_subdirectory(pubsub_admin_websocket)
if (APPLE)
@@ -63,9 +74,6 @@ if (PUBSUB)
add_subdirectory(examples)
if (ENABLE_TESTING)
- option(BUILD_PUBSUB_TESTS "Enable Tests for PUBSUB" OFF)
- endif()
- if (ENABLE_TESTING AND BUILD_PUBSUB_TESTS)
add_subdirectory(test)
endif()
diff --git a/bundles/remote_services/CMakeLists.txt
b/bundles/remote_services/CMakeLists.txt
index 991d94a..b4977e4 100644
--- a/bundles/remote_services/CMakeLists.txt
+++ b/bundles/remote_services/CMakeLists.txt
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-celix_subproject(REMOTE_SERVICE_ADMIN "Option to enable building the Remote
Service Admin Service bundles" OFF)
+celix_subproject(REMOTE_SERVICE_ADMIN "Option to enable building the Remote
Service Admin Service bundles" ON)
if (REMOTE_SERVICE_ADMIN)
add_subdirectory(remote_services_api)
add_subdirectory(examples)
diff --git a/libs/framework/CMakeLists.txt b/libs/framework/CMakeLists.txt
index 70dc025..c7f51ee 100644
--- a/libs/framework/CMakeLists.txt
+++ b/libs/framework/CMakeLists.txt
@@ -57,8 +57,7 @@ if (ENABLE_TESTING)
endif()
-celix_subproject(FRAMEWORK_TESTS "Option to build the framework tests" "OFF"
DEPS)
-if (ENABLE_TESTING AND FRAMEWORK_TESTS)
+if (ENABLE_TESTING)
find_package(CppUTest REQUIRED)
include_directories(SYSTEM PRIVATE ${CPPUTEST_INCLUDE_DIR})
@@ -342,4 +341,4 @@ if (ENABLE_TESTING AND FRAMEWORK_TESTS)
# SETUP_TARGET_FOR_COVERAGE(service_tracker_test service_tracker_test
${CMAKE_BINARY_DIR}/coverage/service_tracker_test/service_tracker_test)
SETUP_TARGET_FOR_COVERAGE(wire_test wire_test
${CMAKE_BINARY_DIR}/coverage/wire_test/wire_test)
-endif (ENABLE_TESTING AND FRAMEWORK_TESTS)
+endif ()
diff --git a/libs/utils/CMakeLists.txt b/libs/utils/CMakeLists.txt
index 45cc297..7cab36a 100644
--- a/libs/utils/CMakeLists.txt
+++ b/libs/utils/CMakeLists.txt
@@ -77,8 +77,7 @@ install(DIRECTORY include/ DESTINATION include/celix
COMPONENT framework
add_library(Celix::utils ALIAS utils)
-celix_subproject(UTILS-TESTS "Option to build the utilities library tests"
"OFF")
-if (ENABLE_TESTING AND UTILS-TESTS)
+if (ENABLE_TESTING)
find_package(CppUTest REQUIRED)
include_directories(SYSTEM PRIVATE ${CPPUTEST_INCLUDE_DIR})
@@ -144,4 +143,4 @@ if (ENABLE_TESTING AND UTILS-TESTS)
SETUP_TARGET_FOR_COVERAGE(version_range_test version_range_test
${CMAKE_BINARY_DIR}/coverage/version_range_test/version_range_test)
SETUP_TARGET_FOR_COVERAGE(version_test version_test
${CMAKE_BINARY_DIR}/coverage/version_test/version_test)
-endif(ENABLE_TESTING AND UTILS-TESTS)
+endif ()