Linux Multiarch testing tips

#1

The topic is intended to share and discuss about the multi arch testing tips on Travis CI.

Motivation

Want to run and test a software not only on intel x86_64, but also on mobile, IoT device (ARM 64-bit, 32-bit) and HPC (super computer, PowerPC).

  • What we want to condier wit low level language programming such as C, C++, Golang.
    • Intel, ARM, PowerPC, and etc.
    • 64-bit or 32-bit
    • Little-endian or Big-endian

Current solution

  • x86_64: (Intel, 64-bit, Little-endian): Use os: linux
  • ppc64le (Power PC, 64-bit, Little-endian): Use os: linux-ppc64le
  • Other solutions:
    • Use multiarch project (QEMU) and the docker container image. [1][2]
    • Use setarch command with Ubuntu arch packages. [3]

The other solutions can test most arches covering 32-bit, big-endian. But can improve the user experience on Travis CI.

Related issues on travis-ci/travis-ci

References

Anything else?

#2

If Travis CI is using AWS internally, here is a good news to support ARM like os: linux-aarch64

New – EC2 Instances (A1) Powered by Arm-Based AWS Graviton Processors

1 Like
#3

See https://github.com/skvark/opencv-python/issues/13 . It’s currently possible to cross-compile things and run tests on an emulator.

#4

Thanks for the info.

I see that opencv-python is doing something.


It has multibuild that enables the build of x86_64 and i686, as a submodule.


#5

I found that recently Docker announced “docker buildx” to build multi arch images.


While qemu-user-static needs the compatible multi arch container images, “docker buildx” might build the general multi-arch container images.
As users do not have to be conscious about using qemu (it seems “moby/qemu” is used internally), they might be able to use it casually.