diff --git a/.github/actions/install-iceoryx-deps-and-clang/action.yml b/.github/actions/install-iceoryx-deps-and-clang/action.yml index 5b4c51da03..b4fd5e2afc 100644 --- a/.github/actions/install-iceoryx-deps-and-clang/action.yml +++ b/.github/actions/install-iceoryx-deps-and-clang/action.yml @@ -5,10 +5,12 @@ runs: - name: Install iceoryx dependencies and clang-tidy shell: bash run: | + sudo dpkg --add-architecture i386 sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" sudo apt-get update sudo apt-get install -y libacl1-dev libncurses5-dev + sudo apt-get install -y libacl1-dev:i386 libc6-dev-i386 libc6-dev-i386-cross libstdc++6-i386-cross gcc-multilib g++-multilib sudo apt-get install -y clang-format-15 clang-tidy-15 clang-tools-15 clang-15 lld sudo rm /usr/bin/clang sudo rm /usr/bin/clang++ diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 753ef62f70..e925a669bd 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -55,17 +55,24 @@ jobs: runs-on: ubuntu-20.04 needs: pre-flight-check steps: - - uses: actions/checkout@v4 - - uses: egor-tensin/setup-gcc@v1.3 + - name: Checkout + uses: actions/checkout@v4 + - name: Install iceoryx dependencies and clang-tidy + uses: ./.github/actions/install-iceoryx-deps-and-clang + - name: Setup GCC + uses: egor-tensin/setup-gcc@v1.3 with: # gcc 8.3 is compiler used in QNX 7.1 version: 8 platform: x64 - - uses: jwlawson/actions-setup-cmake@v2.0 + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v2.0 with: cmake-version: '3.16.3' # version used in Ubuntu 20.04 LTS - run: ./tools/ci/build-test-ubuntu.sh + + build-test-windows-msvc: # prevent stuck jobs consuming runners for 6 hours timeout-minutes: 60 @@ -172,6 +179,18 @@ jobs: - name: Run Thread Sanitizer run: ./tools/ci/build-test-ubuntu-with-sanitizers.sh clang tsan + build-test-ubuntu-32-bit: + # prevent stuck jobs consuming runners for 6 hours + timeout-minutes: 60 + runs-on: ubuntu-latest + needs: pre-flight-check + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install iceoryx dependencies and clang-tidy + uses: ./.github/actions/install-iceoryx-deps-and-clang + - run: ./tools/ci/build-test-ubuntu.sh 32-bit-x86 + # Bazel sanity check build-test-ubuntu-bazel: # prevent stuck jobs consuming runners for 6 hours diff --git a/doc/website/getting-started/installation.md b/doc/website/getting-started/installation.md index 32d253baf3..cfc486a208 100644 --- a/doc/website/getting-started/installation.md +++ b/doc/website/getting-started/installation.md @@ -43,6 +43,13 @@ You will need to install the following packages: sudo apt install gcc g++ cmake libacl1-dev libncurses5-dev pkg-config ``` +To build iceoryx as 32-bit library, the following packages need to be installed additionally: + +```bash +sudo dpkg --add-architecture i386 +sudo apt install libacl1-dev:i386 libc6-dev-i386 libc6-dev-i386-cross libstdc++6-i386-cross gcc-multilib g++-multilib +``` + Additionally, there is an optional dependency to the [cpptoml](https://github.com/skystrife/cpptoml) library, which is used to parse the RouDi config file containing mempool configuration. ### QNX diff --git a/tools/ci/build-test-ubuntu.sh b/tools/ci/build-test-ubuntu.sh index 443ce3dc4c..20a4ffd595 100755 --- a/tools/ci/build-test-ubuntu.sh +++ b/tools/ci/build-test-ubuntu.sh @@ -19,6 +19,19 @@ set -e +COMPILER=gcc +SANITIZER=asan +BUILD_32BIT="" + +while (( "$#" )); do + case "$1" in + "32-bit-x86") + BUILD_32BIT="32-bit-x86" + shift 1 + ;; + esac +done + msg() { printf "\033[1;32m%s: %s\033[0m\n" ${FUNCNAME[1]} "$1" } @@ -26,9 +39,6 @@ msg() { WORKSPACE=$(git rev-parse --show-toplevel) cd ${WORKSPACE} -msg "installing build dependencies" -sudo apt-get update && sudo apt-get install -y libacl1-dev libncurses5-dev - msg "creating local test users and groups for testing access control" sudo ./tools/scripts/add_test_users.sh @@ -37,10 +47,10 @@ $(gcc --version) $(clang --version)" msg "building sources" -./tools/iceoryx_build_test.sh build-strict build-all out-of-tree build-shared test-add-user +./tools/iceoryx_build_test.sh build-strict build-all out-of-tree build-shared test-add-user ${BUILD_32BIT} msg "building debian package" -./tools/iceoryx_build_test.sh package +./tools/iceoryx_build_test.sh package ${BUILD_32BIT} # there are tests which open quite a lot of file descriptors simultaneously to exhaust the creation of some resources # therefore the limits needs to be increased @@ -53,4 +63,4 @@ cd ./build cd - msg "building roudi examples without toml support" -./tools/iceoryx_build_test.sh relwithdebinfo out-of-tree examples toml-config-off clean +./tools/iceoryx_build_test.sh relwithdebinfo out-of-tree examples toml-config-off clean ${BUILD_32BIT} diff --git a/tools/scripts/ice_env.sh b/tools/scripts/ice_env.sh index a91cd98c82..009a1cb8e8 100755 --- a/tools/scripts/ice_env.sh +++ b/tools/scripts/ice_env.sh @@ -17,7 +17,7 @@ # SPDX-License-Identifier: Apache-2.0 CONTAINER_NAME_PREFIX="ice_env_" -CONTAINER_MEMORY_SIZE="6g" +CONTAINER_MEMORY_SIZE="8g" CONTAINER_SHM_MEMORY_SIZE="2g" DEFAULT_OS_VERSION="ubuntu:22.04" CMAKE_VERSION="cmake-3.23.1-linux-x86_64" @@ -48,8 +48,10 @@ setup_docker_image() { # ubuntu/debian and derivatives if command -v apt &>/dev/null; then + sudo dpkg --add-architecture i386 apt update apt -y install g++ gcc sudo cmake git fish gdb lldb llvm clang clang-format wget libncurses5-dev libacl1-dev wget lsb-release software-properties-common vim + apt -y install libacl1-dev:i386 libc6-dev-i386 libc6-dev-i386-cross libstdc++6-i386-cross gcc-multilib g++-multilib install_cmake # install newest clang