Skip to content

Commit 43e8b97

Browse files
nbrodbecnbrodbec
andauthored
32-bit tests (#311)
# Purpose Compile our OBC tests for a 32-bit architecture to match the hardware it will be running on # New Changes - Added `-m32` compiler args for `Test` CMake target # Tests Unit tests still pass: ![image](https://github.com/user-attachments/assets/a6bee41c-9a6e-46bd-8d44-2b63fbe37bd9) And unit test binaries are now 32 bits: ![image](https://github.com/user-attachments/assets/c9762e55-a601-40ef-8aa1-3b9ddcb19c8e) --------- Co-authored-by: nbrodbec <contact@nbrodbeck.com>
1 parent 3133e4d commit 43e8b97

File tree

4 files changed

+133
-81
lines changed

4 files changed

+133
-81
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v3
14+
- name: Install GNU cross compilation
15+
run: |
16+
sudo apt-get update
17+
sudo apt-get install gcc-multilib g++-multilib
1418
- name: Configure CMake
1519
run: |
1620
mkdir build

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ elseif(${CMAKE_BUILD_TYPE} MATCHES HIL)
1313
include(${CMAKE_SOURCE_DIR}/cmake/fetch_googletest.cmake)
1414
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchain_hil_gcc.cmake)
1515
elseif(${CMAKE_BUILD_TYPE} MATCHES Test)
16+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
17+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
1618
include(${CMAKE_SOURCE_DIR}/cmake/fetch_googletest.cmake)
1719
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchain_linux_gcc.cmake)
1820
elseif(${CMAKE_BUILD_TYPE} MATCHES Examples)

0 commit comments

Comments
 (0)