Skip to content

Commit

Permalink
[eclipse-iceoryx#264] Fix 32 bit cross compilation on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Jul 3, 2024
1 parent ec98785 commit 0e67e92
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 5 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ jobs:
cmake -S . \
-B target/ffi/build \
-DCMAKE_INSTALL_PREFIX=target/ffi/install \
-DBUILD_CXX_BINDING=OFF \
-DBUILD_EXAMPLES=ON \
-DBUILD_TESTING=ON \
-DRUST_TARGET_TRIPLET="i686-unknown-linux-gnu" \
Expand All @@ -156,17 +157,28 @@ jobs:
- name: Run language binding tests
run: target/ffi/build/tests/iceoryx2-c-tests

- name: Build language binding examples in out-of-tree configuration
if: false # out-of-tree cross-compilation is currently not supported
- name: Build C language binding examples in out-of-tree configuration
if: false # TODO: [#262] out-of-tree cross-compilation is currently not supported
run: |
rm -rf target/ffi/build
cmake -S examples/c \
-B target/ffi/out-of-tree \
-B target/ffi/out-of-tree-c \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/target/ffi/install \
-DCMAKE_C_FLAGS="-m32" \
-DCMAKE_CXX_FLAGS="-m32" \
-${{ matrix.mode.cmake-build-type }}
cmake --build target/ffi/out-of-tree
cmake --build target/ffi/out-of-tree-c
- name: Build C++ language binding examples in out-of-tree configuration
if: false # TODO: [#262] out-of-tree cross-compilation is currently not supported
run: |
cmake -S examples/cxx \
-B target/ffi/out-of-tree-cxx \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/target/ffi/install \
-DCMAKE_C_FLAGS="-m32" \
-DCMAKE_CXX_FLAGS="-m32" \
-${{ matrix.mode.cmake-build-type }}
cmake --build target/ffi/out-of-tree-cxx
x86_64:
needs: [preflight-check, static-code-analysis, cargo-nextest]
Expand Down
2 changes: 2 additions & 0 deletions internal/scripts/ci_prepare_archlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#!/bin/bash

set -e

pacman -Syu --noconfirm clang cmake gcc git rustup
pacman -Scc --noconfirm
rustup toolchain add beta nightly stable 1.75.0
Expand Down
2 changes: 2 additions & 0 deletions internal/scripts/ci_prepare_freebsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#!/bin/sh

set -e

export ASSUME_ALWAYS_YES=yes

pkg update
Expand Down
22 changes: 21 additions & 1 deletion internal/scripts/ci_prepare_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,28 @@

#!/bin/bash

set -e

sudo apt-get update
sudo apt-get install -y clang cmake curl gcc g++ git libacl1-dev build-essential flex libelf-dev binutils-dev libdwarf-dev libc6-dev libc6-dev-i386 gcc-multilib-i686-linux-gnu libc6-dev-i386-cross libstdc++6:i386
sudo apt-get install -y \
binutils-dev \
build-essential \
clang \
cmake \
curl \
flex \
gcc \
gcc-multilib \
g++ \
g++-multilib \
git \
libacl1-dev \
libc6-dev \
libc6-dev-i386 \
libc6-dev-i386-cross \
libstdc++6-i386-cross \
libdwarf-dev \
libelf-dev
sudo useradd testuser1
sudo useradd testuser2
sudo groupadd testgroup1
Expand Down
2 changes: 2 additions & 0 deletions internal/scripts/ci_test_commit_msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#!/bin/bash

set -e

RET_VAL=0
IFS=$'\n'
for LINE in $(git shortlog | sed -n "s/ \(.*\)/\1/p" | grep -v "Merge pull request" | grep -v "Merge branch" | grep -v "Merge remote-tracking branch" )
Expand Down
2 changes: 2 additions & 0 deletions internal/scripts/ci_test_only_use_assert_that_macro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#!/bin/bash

set -e

cd $(git rev-parse --show-toplevel)

RETVAL=0
Expand Down
2 changes: 2 additions & 0 deletions internal/scripts/ci_test_spdx_license_header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#!/bin/bash

set -e

COLOR_RESET='\033[0m'
COLOR_GREEN='\033[1;32m'
COLOR_YELLOW='\033[1;33m'
Expand Down
2 changes: 2 additions & 0 deletions internal/scripts/generate-cov-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#!/bin/bash

set -e

COLOR_OFF='\033[0m'
COLOR_RED='\033[1;31m'
COLOR_GREEN='\033[1;32m'
Expand Down
2 changes: 2 additions & 0 deletions internal/scripts/iceoryx2_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#
# SPDX-License-Identifier: Apache-2.0

set -e

CONTAINER_NAME_PREFIX="iceoryx2_env_"
CONTAINER_MEMORY_SIZE="8g"
CONTAINER_SHM_MEMORY_SIZE="4g"
Expand Down
2 changes: 2 additions & 0 deletions internal/scripts/set_license_header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#!/bin/bash

set -e

cd $(git rev-parse --show-toplevel)

set_license_header() {
Expand Down

0 comments on commit 0e67e92

Please sign in to comment.