# Linux Multiarch testing tips

**URL:** <https://travis-ci.community/t/linux-multiarch-testing-tips/862>\
**Category:** Feature Requests\
**Created:** [November 13, 2018, 1:42pm UTC](https://travis-ci.community/t/linux-multiarch-testing-tips/862 "2018-11-13T13:42:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [November 13, 2018, 1:42pm UTC](https://travis-ci.community/t/linux-multiarch-testing-tips/862/1 "2018-11-13T13:42:38Z")

</div>

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

- [RFE] Supporting big endian Linux environment  
[https://github.com/travis-ci/travis-ci/issues/8869](https://github.com/travis-ci/travis-ci/issues/8869)
- Support Android / Arm  
[https://github.com/travis-ci/travis-ci/issues/3376](https://github.com/travis-ci/travis-ci/issues/3376)

## References

- [1] [https://github.com/multiarch/qemu-user-static](https://github.com/multiarch/qemu-user-static)
- [2] [https://github.com/junaruga/ci-multi-arch-test](https://github.com/junaruga/ci-multi-arch-test)
- [3] ruby .travis.yml: [https://github.com/ruby/ruby/blob/trunk/.travis.yml](https://github.com/ruby/ruby/blob/trunk/.travis.yml)

Anything else?

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [November 27, 2018, 8:46am UTC](https://travis-ci.community/t/linux-multiarch-testing-tips/862/2 "2018-11-27T08:46:30Z")

</div>

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

> **[New – EC2 Instances (A1) Powered by Arm-Based AWS Graviton Processors |...](https://aws.amazon.com/blogs/aws/new-ec2-instances-a1-powered-by-arm-based-aws-graviton-processors/)**
>
> Earlier this year I told you about the AWS Nitro System and promised you that it would allow us to “deliver new instance types more quickly than ever in the months to come.” Since I made that promise we have launched memory-intensive R5 and R5d...

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [November 27, 2018, 9:02am UTC](https://travis-ci.community/t/linux-multiarch-testing-tips/862/3 "2018-11-27T09:02:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [May 3, 2019, 7:35pm UTC](https://travis-ci.community/t/linux-multiarch-testing-tips/862/4 "2019-05-03T19:35:05Z")

</div>

Thanks for the info.

I see that opencv-python is doing something.

> <https://github.com/skvark/opencv-python/blob/25/.travis.yml#L288>

  

> <https://github.com/skvark/opencv-python/blob/25/.travis.yml#L697>

It has multibuild that enables the build of x86\_64 and i686, as a submodule.

> <https://github.com/skvark/opencv-python/blob/25/.gitmodules#L9>

  

> **[matthew-brett/multibuild](https://github.com/matthew-brett/multibuild)**
>
> Machinery for building and testing Python Wheels for Linux, OSX and (less flexibly) Windows. - matthew-brett/multibuild

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [May 3, 2019, 7:44pm UTC](https://travis-ci.community/t/linux-multiarch-testing-tips/862/5 "2019-05-03T19:44:26Z")

</div>

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

> **[Building Multi-Arch Images for Arm and x86 with Docker Desktop - Docker...](https://engineering.docker.com/2019/04/multi-arch-images/)**
>
> Docker is making it easier than ever to develop containers on, and for Arm servers and devices. Using the standard tooling and processes you are already familiar with you can start to build, push, pull, and run images of different architectures....

  

> **[docker/buildx](https://github.com/docker/buildx)**
>
> Docker CLI plugin for extended build capabilities with BuildKit - docker/buildx

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.

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [October 15, 2019, 3:17pm UTC](https://travis-ci.community/t/linux-multiarch-testing-tips/862/6 "2019-10-15T15:17:08Z")

</div>

Finally Travis Ci started supporting a native ARM 64 with “arch: arm64” syntax! Thank you, Travis.

> **[The Travis CI Blog: Multi-CPU architecture support for your builds](https://blog.travis-ci.com/2019-10-07-multi-cpu-architecture-support)**
>
> We’re excited to share that you can now test your open source software on multiple CPU architectures at Travis CI.
> 
> For the past few months, we’ve been working closely with the Travis CI community,...

Now I want to see current syntax “os: linux-ppc64le” for ppc64le has the alias “arch: ppc64le”.

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [October 23, 2019, 7:29pm UTC](https://travis-ci.community/t/linux-multiarch-testing-tips/862/7 "2019-10-23T19:29:00Z")

</div>

> [@junaruga](#):
>
> Now I want to see current syntax “os: linux-ppc64le” for ppc64le has the alias “arch: ppc64le”.

It seems `arch: ppc64le` also works instead of `os: linux-ppc64le`.

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [November 13, 2019, 8:11pm UTC](https://travis-ci.community/t/linux-multiarch-testing-tips/862/8 "2019-11-13T20:11:53Z")

</div>

Yesterday Travis announced supporting ppc64le (IBM Power) and s390x (IBM Z). Thank you Travis!

> **[The Travis CI Blog: Build your open source projects on IBM Power and IBM Z...](https://blog.travis-ci.com/2019-11-12-multi-cpu-architecture-ibm-power-ibm-z)**
>
> Last month, we introduced the capability to build open source software for multiple CPU architectures. Today, we’re excited to extend that capability beyond arm64 and amd64 to using the same Travis...

So, I created the example to run in following “native” environments in Travis. “native” means to run without QEMU emulation.

- amd64 (x86\_64 = Intel, 64-bit, Little-endian)
- arm64 (aarch64 = ARM, 64-bit, Little-endian)
- ppc64le (IBM, PowerPC, Little-endian)
- s390x (IBM, Z / Linux One, Big-endian)
- i686 (Intel, 32-bit, Little-endian)
- arm32 (armv8l = ARM 32-bit, Little-endian)

> **[junaruga/ci-multi-arch-native-test](https://github.com/junaruga/ci-multi-arch-native-test)**
>
> Contribute to junaruga/ci-multi-arch-native-test development by creating an account on GitHub.
