From 9bfdaa8dc53f52b74052035c90f7edac43b5bf4e Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Thu, 22 Aug 2024 21:19:34 +0200 Subject: [PATCH] iox-#2301 Add 32 bit build to CI --- .../install-iceoryx-deps-and-clang/action.yml | 2 ++ .github/workflows/build-test.yml | 12 ++++++++++++ doc/website/getting-started/installation.md | 7 +++++++ tools/ci/build-test-ubuntu.sh | 18 ++++++++++++++---- 4 files changed, 35 insertions(+), 4 deletions(-) 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..1fb61587f4 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -172,6 +172,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..5163d2dcde 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,7 +47,7 @@ $(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