Skip to content

Commit

Permalink
iox-#2301 Add 32 bit build to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Aug 22, 2024
1 parent da969e2 commit 72fbf3f
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/actions/install-iceoryx-deps-and-clang/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,24 @@ jobs:
runs-on: ubuntu-20.04
needs: pre-flight-check
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/[email protected]
- 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/[email protected]
with:
# gcc 8.3 is compiler used in QNX 7.1
version: 8
platform: x64
- uses: jwlawson/[email protected]
- name: Setup cmake
uses: jwlawson/[email protected]
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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions doc/website/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 16 additions & 6 deletions tools/ci/build-test-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,26 @@

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"
}

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

Expand All @@ -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
Expand All @@ -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}
2 changes: 2 additions & 0 deletions tools/iceoryx_build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ if [ "$OUT_OF_TREE_FLAG" == "ON" ]; then
cmake -DCMAKE_INSTALL_PREFIX="$ICEORYX_INSTALL_PREFIX" \
-DTOML_CONFIG=$TOML_FLAG \
-DBINDING_C=$BINDING_C_FLAG \
-DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" \
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
"$WORKSPACE"/iceoryx_examples/"$ex"
if ! cmake --build . --target install -- -j$NUM_JOBS; then
echo "Out of tree build failed"
Expand Down
5 changes: 4 additions & 1 deletion tools/scripts/ice_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -48,8 +48,10 @@ setup_docker_image() {

# ubuntu/debian and derivatives
if command -v apt &>/dev/null; then
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
Expand All @@ -68,6 +70,7 @@ setup_docker_image() {
# archlinux based ones
elif command -v pacman &>/dev/null; then
pacman -Syu --noconfirm base base-devel clang cmake git fish gdb lldb llvm wget ncurses vim
pacman -Syu --noconfirm lib32-acl lib32-gcc-libs lib32-ncurses
install_cmake
else
echo Please install the following packages to have a working iceoryx environment:
Expand Down

0 comments on commit 72fbf3f

Please sign in to comment.