Skip to content

Commit

Permalink
[eclipse-iceoryx#210] Fix FreeBSD and Cirrus CI
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Jun 14, 2024
1 parent b989026 commit f8783f2
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 33 deletions.
22 changes: 4 additions & 18 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,34 +86,20 @@ iox2_common_build_and_test_no_doc_tests_release_template: &IOX2_COMMON_BUILD_AND

iox2_ffi_common_debug_template: &IOX2_FFI_COMMON_DEBUG
ffi_script:
- cmake . \
-B target/ffi/build \
-DCMAKE_INSTALL_PREFIX=target/ffi/install \
-DEXAMPLES=ON \
-DCMAKE_BUILD_TYPE="Debug"
- cmake . -B target/ffi/build -DCMAKE_INSTALL_PREFIX=target/ffi/install -DEXAMPLES=ON -DCMAKE_BUILD_TYPE=Debug
- cmake --build target/ffi/build
- cmake --install target/ffi/build
- rm -rf target/ffi/build
- cmake examples/c \
-B target/ffi/out-of-tree \
-DCMAKE_PREFIX_PATH=$( pwd )/target/ffi/install \
-DCMAKE_BUILD_TYPE="Debug"
- cmake examples/c -B target/ffi/out-of-tree -DCMAKE_PREFIX_PATH=$( pwd )/target/ffi/install -DCMAKE_BUILD_TYPE=Debug
- cmake --build target/ffi/out-of-tree

iox2_ffi_common_release_template: &IOX2_FFI_COMMON_RELEASE
ffi_script:
- cmake . \
-B target/ffi/build \
-DCMAKE_INSTALL_PREFIX=target/ffi/install \
-DEXAMPLES=ON \
-DCMAKE_BUILD_TYPE="Release"
- cmake . -B target/ffi/build -DCMAKE_INSTALL_PREFIX=target/ffi/install -DEXAMPLES=ON -DCMAKE_BUILD_TYPE=Release
- cmake --build target/ffi/build
- cmake --install target/ffi/build
- rm -rf target/ffi/build
- cmake examples/c \
-B target/ffi/out-of-tree \
-DCMAKE_PREFIX_PATH=$( pwd )/target/ffi/install \
-DCMAKE_BUILD_TYPE="Release"
- cmake examples/c -B target/ffi/out-of-tree -DCMAKE_PREFIX_PATH="$( pwd )/target/ffi/install" -DCMAKE_BUILD_TYPE=Release
- cmake --build target/ffi/out-of-tree

iox2_freebsd_setup_template: &IOX2_FREEBSD_SETUP
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ jobs:
mode:
- name: "release"
arg: "--release"
cmake_build_type: "Release"
cmake-build-type: "Release"
- name: "debug"
arg: ""
cmake_build_type: "Debug"
cmake-build-type: "Debug"
timeout-minutes: 60
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
-B target/ffi/build \
-DCMAKE_INSTALL_PREFIX=target/ffi/install \
-DEXAMPLES=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.mode.cmake_build_type }} \
-DCMAKE_BUILD_TYPE=${{ matrix.mode.cmake-build-type }} \
-DRUST_TARGET_TRIPLET="i686-unknown-linux-gnu" \
-DCMAKE_C_FLAGS="-m32"
cmake --build target/ffi/build
Expand All @@ -161,7 +161,7 @@ jobs:
cmake examples/c \
-B target/ffi/out-of-tree \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/target/ffi/install \
-DCMAKE_BUILD_TYPE=${{ matrix.mode.cmake_build_type }} \
-DCMAKE_BUILD_TYPE=${{ matrix.mode.cmake-build-type }} \
-DCMAKE_C_FLAGS="-m32"
cmake --build target/ffi/out-of-tree
Expand All @@ -175,10 +175,22 @@ jobs:
mode:
- name: "release"
arg: "--release"
cmake_build_type: "Release"
cmake-build-type: "Release"
- name: "debug"
arg: ""
cmake_build_type: "Debug"
cmake-build-type: "Debug"
cmake-build-system-generator: ['']
include:
- os: windows-latest
toolchain: stable-gnu
mode:
- name: "release"
arg: "--release"
cmake-build-type: "Release"
- name: "debug"
arg: ""
cmake-build-type: "Debug"
cmake-build-system-generator: '-G "MinGW Makefiles"'
timeout-minutes: 60
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -210,17 +222,18 @@ jobs:
run: cargo build --workspace --all-targets ${{ matrix.mode.arg }}

- name: Run cargo nextest
if: ${{ matrix.toolchain != 'stable-gnu' }}
run: cargo nextest run --workspace --no-fail-fast ${{ matrix.mode.arg }}

- name: Print native libs of FFI target
if: false
if: true # This step takes 1 to 2 minutes; only enable if there are linker issues with the FFI target
run: |
cd iceoryx2-ffi/ffi
cargo rustc -q -- --print=native-static-libs
- name: Build language bindings
run: |
cmake . -B target/ffi/build -DCMAKE_INSTALL_PREFIX=target/ffi/install -DEXAMPLES=ON -DCMAKE_BUILD_TYPE=${{ matrix.mode.cmake_build_type }}
cmake . -B target/ffi/build -DCMAKE_INSTALL_PREFIX=target/ffi/install -DEXAMPLES=ON -DCMAKE_BUILD_TYPE=${{ matrix.mode.cmake-build-type }} ${{ matrix.cmake-build-system-generator }}
cmake --build target/ffi/build
cmake --install target/ffi/build
Expand All @@ -233,7 +246,7 @@ jobs:

- name: Build language binding examples in out-of-tree configuration
run: |
cmake examples/c -B target/ffi/out-of-tree -DCMAKE_PREFIX_PATH=${{ github.workspace }}/target/ffi/install -DCMAKE_BUILD_TYPE=${{ matrix.mode.cmake_build_type }}
cmake examples/c -B target/ffi/out-of-tree -DCMAKE_PREFIX_PATH=${{ github.workspace }}/target/ffi/install -DCMAKE_BUILD_TYPE=${{ matrix.mode.cmake-build-type }} ${{ matrix.cmake-build-system-generator }}
cmake --build target/ffi/out-of-tree
x86_64_unstable:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.22)
set(IOX2_VERSION_STRING "0.3.0")
project(iceoryx2 VERSION ${IOX2_VERSION_STRING})

Expand Down
2 changes: 1 addition & 1 deletion examples/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# elfenpiff is stupid

cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.22)
project(examples_c LANGUAGES C)

add_subdirectory(discovery)
Expand Down
2 changes: 1 addition & 1 deletion examples/c/discovery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.22)
project(example_c_discovery LANGUAGES C)

find_package(iceoryx2-c REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion examples/c/publish_subscribe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.22)
project(example_c_publish_subscribe LANGUAGES C)

find_package(iceoryx2-c REQUIRED)
Expand Down
4 changes: 2 additions & 2 deletions iceoryx2-ffi/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

cmake_minimum_required(VERSION 3.28)
cmake_minimum_required(VERSION 3.22)
project(iceoryx2-c VERSION ${IOX2_VERSION_STRING} LANGUAGES C)

set(PREFIX iceoryx2/v${CMAKE_PROJECT_VERSION})
Expand Down Expand Up @@ -113,7 +113,7 @@ target_link_libraries(static-lib INTERFACE
iceoryx2-c::includes-only
$<BUILD_INTERFACE:${ICEORYX2_C_STATIC_LIB_LINK_FILE}>
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_LIBDIR}/${ICEORYX2_C_STATIC_LIB_LINK_NAME}>
$<$<NOT:$<PLATFORM_ID:Windows>>:m>
$<$<NOT:$<PLATFORM_ID:Windows>>:m pthread>
$<$<AND:$<PLATFORM_ID:Windows>,$<C_COMPILER_ID:MSVC>>:bcrypt userenv ntdll synchronization ws2_32 wsock32>
$<$<AND:$<PLATFORM_ID:Windows>,$<NOT:$<C_COMPILER_ID:MSVC>>>:ntdll ws2_32 wsock32>
$<$<PLATFORM_ID:Darwin>:stdc++>
Expand Down

0 comments on commit f8783f2

Please sign in to comment.