Skip to content

Commit

Permalink
Add Android CMake to GHA, Fix Building ACE/TAO
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed Sep 18, 2023
1 parent b5afc62 commit b51cea5
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 7 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12691,3 +12691,104 @@ jobs:
run: |
cd OpenDDS
cmake --build build -t test
build_cmake_u22_no_features:

runs-on: ubuntu-22.04

steps:
- name: Checkout OpenDDS
uses: actions/checkout@v3
with:
path: OpenDDS
submodules: true
- name: Checkout MPC
uses: actions/checkout@v3
with:
repository: DOCGroup/MPC
path: MPC
- name: Checkout ACE/TAO
uses: actions/checkout@v3
with:
repository: DOCGroup/ACE_TAO
path: OpenDDS/build/ACE_TAO
- name: Install xerces
run: sudo apt-get -y install libxerces-c-dev
- name: Configure
run: |
cd OpenDDS
cmake -B build \
-DCMAKE_UNITY_BUILD=TRUE \
-DBUILD_SHARED_LIBS=FALSE \
-DCMAKE_BUILD_TYPE=Debug \
-DOPENDDS_ACE_TAO_SRC=$GITHUB_WORKSPACE/OpenDDS/build/ACE_TAO \
-DOPENDDS_MPC=$GITHUB_WORKSPACE/MPC \
-DOPENDDS_BUILD_TESTS=TRUE \
-DOPENDDS_BUILT_IN_TOPICS=FALSE \
-DOPENDDS_OBJECT_MODEL_PROFILE=FALSE \
-DOPENDDS_PERSISTENCE_PROFILE=FALSE \
-DOPENDDS_OWNERSHIP_PROFILE=FALSE \
-DOPENDDS_CONTENT_SUBSCRIPTION=FALSE \
-DOPENDDS_CMAKE_VERBOSE=all
- uses: ammaraskar/[email protected]
- name: Build
run: |
cd OpenDDS
cmake --build build -- -j $(getconf _NPROCESSORS_ONLN)
- name: Run Tests
run: |
cd OpenDDS
cmake --build build -t test
build_cmake_u22_android29:

runs-on: ubuntu-22.04

steps:
- name: Checkout OpenDDS
uses: actions/checkout@v3
with:
path: OpenDDS
submodules: true
- uses: nttld/setup-ndk@v1
with:
ndk-version: r25c
add-to-path: false
- name: Checkout MPC
uses: actions/checkout@v3
with:
repository: DOCGroup/MPC
path: MPC
- name: Checkout ACE/TAO
uses: actions/checkout@v3
with:
repository: DOCGroup/ACE_TAO
path: OpenDDS/build/ACE_TAO
- name: Install xerces
run: sudo apt-get -y install libxerces-c-dev
- name: Configure Host Tools
run: |
cd OpenDDS
cmake -B build-host \
-G Ninja \
-DBUILD_SHARED_LIBS=FALSE \
-DOPENDDS_JUST_BUILD_HOST_TOOLS=TRUE
- name: Configure
run: |
cd OpenDDS
cmake -B build-host \
-G Ninja \
-DBUILD_SHARED_LIBS=TRUE \
-DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-29 \
--toolchain ${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake \
-DOPENDDS_CMAKE_VERBOSE=all \
-DOPENDDS_HOST_TOOLS=$(realpath build-host)
- uses: ammaraskar/[email protected]
- name: Build Host Tools
run: |
cd OpenDDS
cmake --build build-host
- name: Build
run: |
cd OpenDDS
cmake --build build-target
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set(OPENDDS_IS_BEING_BUILT TRUE CACHE INTERNAL "")
set(OPENDDS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "")
if(EXISTS "${OPENDDS_SOURCE_DIR}/dds/DdsDcpsC.h")
message(FATAL_ERROR "It looks like OpenDDS was already built here using MPC. This could cause "
"issues with a CMake build. Please clean this source tree or use a seperate one.")
"issues with a CMake build. Please clean this source tree or use a separate one.")
endif()
set(OPENDDS_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "")
get_filename_component(_OPENDDS_SOURCE_DIR_REAL "${OPENDDS_SOURCE_DIR}" REALPATH)
Expand Down Expand Up @@ -124,12 +124,14 @@ if(OPENDDS_BUILD_EXAMPLES OR OPENDDS_BUILD_TESTS)
endif()
if(OPENDDS_BUILD_TESTS)
add_subdirectory(tests/cmake/ace_tao_only)
add_subdirectory(tests/cmake/Messenger)
if(OPENDDS_OWNERSHIP_PROFILE)
add_subdirectory(tests/cmake/Messenger)
endif()
add_subdirectory(tests/cmake/idl_compiler_tests)
add_subdirectory(tests/cmake/include_subdir)
# TODO: This shouldn't matter, but linker complains about ACE/TAO libs
# lacking -fPIC.
if(NOT OPENDDS_STATIC)
if(OPENDDS_OWNERSHIP_PROFILE AND NOT OPENDDS_STATIC)
add_subdirectory(tests/cmake/generated_global)
endif()
endif()
4 changes: 2 additions & 2 deletions cmake/configure_ace_tao.pl
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ sub read_file {
"#define ACE_LACKS_READDIR_R\n" .
"#define ACE_LACKS_TEMPNAM\n" .
"#include \"$values{'config-file'}\"\n";
# Always writing the config.h file will cause rebuilds, so don't it unless we
# actually need to change it.
# Always writing the config.h file will cause rebuilds, so don't do it unless
# we actually need to change it.
if (!-f $config_path || read_file($config_path) ne $config_file_should_be) {
open(my $config_file, '>', $config_path) or die("Failed to open $config_path: $!");
print $config_file ($config_file_should_be);
Expand Down
2 changes: 1 addition & 1 deletion cmake/import_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function(_opendds_find_executables group exes)
endif()

set(mpc_projects_var "${group_prefix}_MPC_PROJECTS")
if(DEFINED "${mpc_projects_var}")
if(DEFINED "${mpc_projects_var}" AND NOT ${var}_HOST_TOOL)
_opendds_find_in_mpc_projects(
"${found_var}" "${var}" "${${mpc_projects_var}}" "${${var}_MPC_NAME}")
if(${${found_var}})
Expand Down
1 change: 0 additions & 1 deletion dds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ target_sources(OpenDDS_Dcps
DCPS/transport/framework/TransportImpl.inl
DCPS/transport/framework/TransportImpl_rch.h
DCPS/transport/framework/TransportInst.h
DCPS/transport/framework/TransportInst.inl
DCPS/transport/framework/TransportInst_rch.h
DCPS/transport/framework/TransportQueueElement.h
DCPS/transport/framework/TransportQueueElement.inl
Expand Down

0 comments on commit b51cea5

Please sign in to comment.