Skip to content

Commit

Permalink
Merge pull request #2085 from eclipse-iceoryx/iox-2084-fix-qnx-build-…
Browse files Browse the repository at this point in the history
…and-setup-ci-for-gcc-8-3

iox-#2084 Fix qnx build and setup CI for gcc 8.3
  • Loading branch information
elfenpiff authored Nov 15, 2023
2 parents 0f33118 + 03c632f commit 421cb50
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 30 deletions.
108 changes: 87 additions & 21 deletions .cirrus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@

---

#
# Filter to run the CI only on the master and release branches or for pull request to the master, release* and iox-* branches
#

only_if: $CIRRUS_BRANCH == 'master'
|| $CIRRUS_BRANCH == 'release*'
|| ($CIRRUS_PR != '' && ($CIRRUS_BASE_BRANCH == 'master'
|| $CIRRUS_BASE_BRANCH == 'release*'
|| $CIRRUS_BASE_BRANCH == 'iox-*'
)
)

#
# Templates
#
Expand All @@ -31,23 +43,41 @@ iox_common_cpu_and_memory_config_for_tests_template: &IOX_COMMON_CPU_AND_MEMORY_

# Build and Test

iox_posix_clean_build_script_template: &IOX_POSIX_CLEAN_BUILD
- echo "#### Deleting build and iox-tests-bin dir"
- if [[ -d "build" ]]; then rm -rf build; fi
- if [[ -d "iox-tests-bin" ]]; then rm -rf iox-tests-vin; fi
- echo "#### Running cmake to configure build"
- cmake -Bbuild -Hiceoryx_meta -DBUILD_STRICT=ON -DBINDING_C=ON -DINTROSPECTION=ON -DEXAMPLES=ON -DBUILD_TEST=ON -DCMAKE_INSTALL_PREFIX=build/install
- echo "#### Running cmake to build with CIRRUS_CPU = " $CIRRUS_CPU
- cmake --build build --target install -j $CIRRUS_CPU

iox_posix_clean_build_with_additional_user_template: &IOX_POSIX_CLEAN_BUILD_WITH_ADDITIONAL_USER
- echo "#### Deleting build and iox-tests-bin dir"
- if [[ -d "build" ]]; then rm -rf build; fi
- if [[ -d "iox-tests-bin" ]]; then rm -rf iox-tests-vin; fi
- echo "#### Running cmake to configure build"
- cmake -Bbuild -Hiceoryx_meta -DBUILD_STRICT=ON -DBINDING_C=ON -DINTROSPECTION=ON -DEXAMPLES=ON -DBUILD_TEST=ON -DTEST_ADD_USER=ON -DCMAKE_INSTALL_PREFIX=build/install
- echo "#### Running cmake to build with CIRRUS_CPU = " $CIRRUS_CPU
- cmake --build build --target install -j $CIRRUS_CPU
iox_posix_pre_cmake_config_script_template: &IOX_POSIX_PRE_CMAKE_CONFIG
echo "#### Deleting build and iox-tests-bin dir"
&& if [[ -d "build" ]]; then rm -rf build; fi
&& if [[ -d "iox-tests-bin" ]]; then rm -rf iox-tests-vin; fi

iox_posix_post_cmake_config_script_template: &IOX_POSIX_POST_CMAKE_CONFIG
echo "#### Running cmake to build with CIRRUS_CPU = " $CIRRUS_CPU
&& cmake --build build --target install -j $CIRRUS_CPU

iox_posix_cmake_config_strict_with_no_additional_user_script_template: &IOX_POSIX_CMAKE_CONFIG_STRICT_WITH_NO_ADDITIONAL_USER
echo "#### Running cmake to configure build"
&& cmake -Bbuild -Hiceoryx_meta -DBUILD_STRICT=ON -DBINDING_C=ON -DINTROSPECTION=ON -DEXAMPLES=ON -DBUILD_TEST=ON -DTEST_ADD_USER=OFF -DCMAKE_INSTALL_PREFIX=build/install

iox_posix_cmake_config_strict_with_additional_user_script_template: &IOX_POSIX_CMAKE_CONFIG_STRICT_WITH_ADDITIONAL_USER
echo "#### Running cmake to configure build"
&& cmake -Bbuild -Hiceoryx_meta -DBUILD_STRICT=ON -DBINDING_C=ON -DINTROSPECTION=ON -DEXAMPLES=ON -DBUILD_TEST=ON -DTEST_ADD_USER=ON -DCMAKE_INSTALL_PREFIX=build/install

iox_posix_cmake_config_no_strict_with_additional_user_script_template: &IOX_POSIX_CMAKE_CONFIG_NO_STRICT_WITH_ADDITIONAL_USER
echo "#### Running cmake to configure build"
&& cmake -Bbuild -Hiceoryx_meta -DBUILD_STRICT=OFF -DBINDING_C=ON -DINTROSPECTION=ON -DEXAMPLES=ON -DBUILD_TEST=ON -DTEST_ADD_USER=ON -DCMAKE_INSTALL_PREFIX=build/install

iox_posix_clean_build_strict_with_no_additional_user_template: &IOX_POSIX_CLEAN_BUILD_STRICT_WITH_NO_ADDITIONAL_USER
- *IOX_POSIX_PRE_CMAKE_CONFIG
- *IOX_POSIX_CMAKE_CONFIG_STRICT_WITH_NO_ADDITIONAL_USER
- *IOX_POSIX_POST_CMAKE_CONFIG

iox_posix_clean_build_strict_with_additional_user_template: &IOX_POSIX_CLEAN_BUILD_STRICT_WITH_ADDITIONAL_USER
- *IOX_POSIX_PRE_CMAKE_CONFIG
- *IOX_POSIX_CMAKE_CONFIG_STRICT_WITH_ADDITIONAL_USER
- *IOX_POSIX_POST_CMAKE_CONFIG

iox_posix_clean_build_no_strict_with_additional_user_template: &IOX_POSIX_CLEAN_BUILD_NO_STRICT_WITH_ADDITIONAL_USER
- *IOX_POSIX_PRE_CMAKE_CONFIG
- *IOX_POSIX_CMAKE_CONFIG_NO_STRICT_WITH_ADDITIONAL_USER
- *IOX_POSIX_POST_CMAKE_CONFIG

iox_prepare_test_binaries_for_cache_template: &IOX_PREPARE_TEST_BINARIES_FOR_CACHE
- mkdir -p iox-tests-bin
Expand Down Expand Up @@ -101,7 +131,7 @@ ubuntu_22_04_aarch64_build_task:
reupload_on_changes: true
fingerprint_key: $CIRRUS_OS_ubuntu_22_04_aarch64_test_binaries_cache
build_script:
<<: *IOX_POSIX_CLEAN_BUILD_WITH_ADDITIONAL_USER
<<: *IOX_POSIX_CLEAN_BUILD_STRICT_WITH_ADDITIONAL_USER
populate_test_binary_folder_script:
<<: *IOX_PREPARE_TEST_BINARIES_FOR_CACHE

Expand All @@ -118,6 +148,42 @@ ubuntu_22_04_aarch64_test_task:
test_script:
<<: *IOX_RUN_TESTS

#
# Arch Linux x64 gcc 8.3 aka QNX canary build
#

arch_linux_x64_gcc_8_3_aka_qnx_canary_build_task:
depends_on: preflight_check
container:
dockerfile: tools/ci/docker/archlinux-base-devel
<<: *IOX_COMMON_CPU_AND_MEMORY_CONFIG_FOR_BUILDS
<<: *IOX_TASK_TIMEOUT
test_binaries_cache:
folder: iox-tests-bin
reupload_on_changes: true
fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache
env:
# use GCC 8.3 which corresponds to QCC 8.3 on QNX 7.1
CC: gcc-8
CXX: g++-8
build_script:
<<: *IOX_POSIX_CLEAN_BUILD_STRICT_WITH_ADDITIONAL_USER
populate_test_binary_folder_script:
<<: *IOX_PREPARE_TEST_BINARIES_FOR_CACHE

arch_linux_x64_gcc_8_3_aka_qnx_canary_test_task:
depends_on: arch_linux_x64_gcc_8_3_aka_qnx_canary_build
container:
dockerfile: tools/ci/docker/archlinux-base-devel
<<: *IOX_COMMON_CPU_AND_MEMORY_CONFIG_FOR_TESTS
<<: *IOX_TASK_TIMEOUT
test_binaries_cache:
folder: iox-tests-bin
reupload_on_changes: false
fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache
test_script:
<<: *IOX_RUN_TESTS

#
# Arch Linux x64
#
Expand All @@ -133,7 +199,7 @@ arch_linux_x64_build_task:
reupload_on_changes: true
fingerprint_key: $CIRRUS_OS_archlinux_x64_test_binaries_cache
build_script:
<<: *IOX_POSIX_CLEAN_BUILD_WITH_ADDITIONAL_USER
<<: *IOX_POSIX_CLEAN_BUILD_STRICT_WITH_ADDITIONAL_USER
populate_test_binary_folder_script:
<<: *IOX_PREPARE_TEST_BINARIES_FOR_CACHE

Expand Down Expand Up @@ -168,7 +234,7 @@ freebsd_x64_build_task:
- pkg install -y cmake git ncurses bash wget
- ln -s /usr/local/bin/bash /bin/bash
build_script:
<<: *IOX_POSIX_CLEAN_BUILD
<<: *IOX_POSIX_CLEAN_BUILD_STRICT_WITH_NO_ADDITIONAL_USER
populate_test_binary_folder_script:
<<: *IOX_PREPARE_TEST_BINARIES_FOR_CACHE

Expand Down Expand Up @@ -202,7 +268,7 @@ macos_aarch64_build_task:
setup_script:
- brew install ncurses
build_script:
<<: *IOX_POSIX_CLEAN_BUILD
<<: *IOX_POSIX_CLEAN_BUILD_STRICT_WITH_NO_ADDITIONAL_USER
populate_test_binary_folder_script:
<<: *IOX_PREPARE_TEST_BINARIES_FOR_CACHE

Expand Down
2 changes: 1 addition & 1 deletion doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
- Fix musl libc compile (missing sys/stat.h include in mqueue.h for mode_t definition) [\#2072](https://github.com/eclipse-iceoryx/iceoryx/issues/2072)
- cxx::Expects macro conflicts with Microsoft GSL Expects macro [#2080](https://github.com/eclipse-iceoryx/iceoryx/issues/2080)
- Implement move/copy constructor and assignment for `FixedPositionContainer` [#2052](https://github.com/eclipse-iceoryx/iceoryx/issues/2052)

- FixedPositionContainer fails to compile on QNX QCC [#2084](https://github.com/eclipse-iceoryx/iceoryx/issues/2084)

**Refactoring:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ class FixedPositionContainer final

friend class FixedPositionContainer;

template <IterMutability>
friend class IteratorBase;

/// @brief Construct a const iterator from an iterator
// NOLINTJUSTIFICATION conversion from non const iterator to const iterator follows the STL behavior
// NOLINTNEXTLINE(hicpp-explicit-conversions)
Expand Down
14 changes: 9 additions & 5 deletions tools/ci/docker/archlinux-base-devel
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ ARG DEBIAN_FRONTEND=noninteractive
# Minimize the number of layers (RUN, COPY and ADD create layers)
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers
# Install additional packages
RUN pacman -Syu --noconfirm \
clang \
cmake \
git \
ncurses \
RUN \
pacman -Syu --noconfirm \
clang \
cmake \
git \
ncurses \
&& pacman -U --noconfirm \
https://archive.archlinux.org/packages/g/gcc8-libs/gcc8-libs-8.3.0-4-x86_64.pkg.tar.xz \
https://archive.archlinux.org/packages/g/gcc8/gcc8-8.3.0-4-x86_64.pkg.tar.xz \
&& pacman -Scc --noconfirm \
&& useradd iox_roudi_test1 \
&& useradd iox_roudi_test2 \
Expand Down

0 comments on commit 421cb50

Please sign in to comment.