Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1054 add freebsd CI target
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Eltzschig <me@elchris.org>
  • Loading branch information
elfenpiff committed Jan 30, 2022
1 parent db3d446 commit 0ff46be
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,19 @@ jobs:
- uses: actions/checkout@v2
- run: ./tools/ci/build-test-ubuntu-with-gcc54.sh

# uses macos to run freebsd in a virtualbox
build-test-unix-with-freebsd:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Unix (FreeBSD) test
id: Test
uses: vmactions/freebsd-vm@0.1.5
with:
usesh: true
prepare: pkg install -y cmake git ncurses bash wget bison
run: ./tools/ci/build-test-freebsd.sh

coverage-and-docs:
runs-on: ubuntu-20.04
needs: pre-flight-check
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_hoofs/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ elseif(WIN32)
set(ICEORYX_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/win/)
elseif(UNIX)
set(ICEORYX_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/unix/)
message(WARNING "The unix platform is not officially supported (not run as CI target) but should work.")
else()
message(WARNING "Could not detect supported platform, but I'm feeling lucky today." )
set(ICEORYX_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/unix/)
message(WARNING "Could not detect supported platform, but I'm feeling lucky today. Maybe its Unix." )
endif()

set(ICEORYX_PLATFORM ${ICEORYX_PLATFORM} CACHE PATH "" FORCE)
Expand Down
3 changes: 2 additions & 1 deletion iceoryx_posh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ if(LINUX)
elseif(QNX)
elseif(APPLE)
elseif(WIN32)
elseif(UNIX)
else()
message(WARNING "Could not detect supported platform, but I'm feeling lucky today." )
message(WARNING "Could not detect supported platform, but I'm feeling lucky today. Maybe its Unix." )
endif()

install(
Expand Down
41 changes: 41 additions & 0 deletions tools/ci/build-test-freebsd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/local/bin/bash
# Copyright (c) 2022 by Apex.AI Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

# This script builds iceoryx_hoofs und iceoryx_posh and executes all tests

set -e

msg() {
printf "\033[1;32m%s: %s\033[0m\n" "${FUNCNAME[1]}" "$1"
}

WORKSPACE=$(git rev-parse --show-toplevel)
cd "${WORKSPACE}"

msg "compiler version:
$(clang --version)"

export OSTYPE="darwin"
./tools/iceoryx_build_test.sh clean build-strict build-all out-of-tree

msg "running tests (excluding timing_tests)"
cd "${WORKSPACE}"/build
make all_tests
cd "${WORKSPACE}"

msg "building RouDi examples without TOML support"
./tools/iceoryx_build_test.sh out-of-tree examples toml-config-off clean
3 changes: 2 additions & 1 deletion tools/iceoryx_build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ fi
if [ "$OUT_OF_TREE_FLAG" == "ON" ]; then
rm -rf "$WORKSPACE"/build_out_of_tree
cd "$WORKSPACE"
EXAMPLES=$(find iceoryx_examples/ -maxdepth 1 -type d -printf '%d\t%P\n' | sort -r -nk1 | cut -f2-)

EXAMPLES=$(cd iceoryx_examples; find * -maxdepth 1 -type d)
# Exclude directories without CMake file from the out-of-tree build
EXAMPLES=${EXAMPLES/iceensemble/""}
EXAMPLES=${EXAMPLES/icecrystal/""}
Expand Down

0 comments on commit 0ff46be

Please sign in to comment.