ros-tooling / cross_compile

A tool to build ROS and ROS2 workspaces for various targets
Apache License 2.0
188 stars 60 forks source link

Enabling x86 targets #171

Closed emersonknapp closed 4 years ago

emersonknapp commented 4 years ago

Closes https://github.com/ros-tooling/cross_compile/issues/118

Enables e2e test for x86 target. Runs considerably faster than the other e2e tests because it is not actually emulated, because our build hosts are x86

Signed-off-by: Emerson Knapp emerson.b.knapp@gmail.com

codecov[bot] commented 4 years ago

Codecov Report

Merging #171 into master will increase coverage by 0.07%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #171      +/-   ##
==========================================
+ Coverage   93.91%   93.99%   +0.07%     
==========================================
  Files           7        7              
  Lines         230      233       +3     
==========================================
+ Hits          216      219       +3     
  Misses         14       14              
Flag Coverage Δ
#unittests 93.99% <100.00%> (+0.07%) :arrow_up:
Impacted Files Coverage Δ
ros_cross_compile/platform.py 100.00% <100.00%> (ø)
ros_cross_compile/sysroot_creator.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3d6ef0e...48f8e1d. Read the comment docs.

piraka9011 commented 4 years ago

This LGTM, however, do we need to update any of the Docker images for this as well? It looks like it just uses qemu and wanted to make sure that's the intended behavior.

emersonknapp commented 4 years ago

@piraka9011 see this line, where we just use the base docker image name without an architecture-specific prefix https://github.com/ros-tooling/cross_compile/pull/171/files#diff-ca6b705f61f1ed4f6532c66775024c73R95

and this line, where we check "is architecture the current architecture (or are we on mac)? then we don't need to provide the emulator binary to the docker image" https://github.com/ros-tooling/cross_compile/pull/171/files#diff-cf1470c2673e59409986814482c0d681R49

All you saw was consistency of configuration data - and there is a qemu-x86_64-static binary that we could copy, but it would never be used if it's the host architecture