Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: do arm64 builds natively on TravisCI #116

Merged
merged 1 commit into from Oct 15, 2020

Conversation

AWSjswinney
Copy link
Contributor

Fixes #115

Build arm64 wheel on Travis CI in order to build natively, instead of cross compiling from x86_64. This fixes several problems with the Arm wheel. It makes use of arch: arm64-graviton2, which is currently only available on travis-ci.com. It is probably possible to build the project on travis-ci.org with arch: arm64 instead, but it will be significantly slower.

See #115 for more information.

@AWSjswinney
Copy link
Contributor Author

After several iterations with the parts of the CI that are difficult to test locally, I think I have everything working correctly now. The only part left that I don't know how to test is the final deploy step.

The resulting wheel for arm64 bundles the openssl libraries with it. I started out using the openssl library from the container, but switched back to the version 1.1.1h downloaded from openssl.org because the version in the container has a bunch of other dynamic library dependencies that I didn't want to pull in with this wheel.

root@245a92c7a9d4:/# pip3 install /io/dist/cmake-3.18.2.post1.post1.dev0_gd193b7f-py3-none-manylinux2014_aarch64.whl
Processing /io/dist/cmake-3.18.2.post1.post1.dev0_gd193b7f-py3-none-manylinux2014_aarch64.whl
Installing collected packages: cmake
Successfully installed cmake-3.18.2.post1.post1.dev0-gd193b7f
root@245a92c7a9d4:/# cmake --version
cmake version 3.18.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
root@245a92c7a9d4:/# ldd /usr/local/lib/python3.8/dist-packages/cmake/data/bin/cmake
        linux-vdso.so.1 (0x0000ffff871c4000)
        libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffff86fb2000)
        librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000ffff86f9a000)
        libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff86f86000)
        libssl-2da213e1.so.1.1 => /usr/local/lib/python3.8/dist-packages/cmake/data/bin/../../../cmake.libs/libssl-2da213e1.so.1.1 (0x0000ffff86ec1000)
        libcrypto-cee860d4.so.1.1 => /usr/local/lib/python3.8/dist-packages/cmake/data/bin/../../../cmake.libs/libcrypto-cee860d4.so.1.1 (0x0000ffff86be2000)
        libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffff86bb2000)
        libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff86b07000)
        libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffff86ae2000)
        libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff86971000)
        /lib/ld-linux-aarch64.so.1 (0x0000ffff87194000)

@AWSjswinney
Copy link
Contributor Author

@thewtex Can you take a look at this PR or mention someone else who can? Thanks!

@thewtex
Copy link
Member

thewtex commented Oct 15, 2020

@AWSjswinney thanks again!

Looks good.

TravisCI.com was enabled, but now the repository needs to be enabled. @jcfr could you please enable at:

https://travis-ci.com/organizations/scikit-build/migrate

@thewtex thewtex requested a review from jcfr October 15, 2020 02:09
@jcfr
Copy link
Contributor

jcfr commented Oct 15, 2020

Thanks for the note. Doing so now.

@jcfr
Copy link
Contributor

jcfr commented Oct 15, 2020

I migrated all repos from scikit-build org to travis.com, let me know if you need anything else to move forward with this.

scikit-ci.yml Show resolved Hide resolved
scripts/docker-build.sh Outdated Show resolved Hide resolved
@thewtex
Copy link
Member

thewtex commented Oct 15, 2020

I migrated all repos from scikit-build org to travis.com, let me know if you need anything else to move forward with this.

@jcfr thanks! Looks good.

@AWSjswinney could you please address @jcfr's inline comments?

@AWSjswinney
Copy link
Contributor Author

I made the requested changes. Let me know if you see anything else you'd like changed.

@thewtex
Copy link
Member

thewtex commented Oct 15, 2020

@AWSjswinney Thanks for the update.

TravisCI.com is running now -- it seems to have caught an issue:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "/io/scripts/docker-build.sh": stat /io/scripts/docker-build.sh: no such file or directory": unknown.

@AWSjswinney
Copy link
Contributor Author

Ah, yes. That's why automated tests exist! I pushed another update.

@thewtex thewtex merged commit 4c4311d into scikit-build:master Oct 15, 2020
@AWSjswinney
Copy link
Contributor Author

Thanks! I look forward to seeing the published wheel in pypi!

@jcfr
Copy link
Contributor

jcfr commented Oct 15, 2020

Thanks @thewtex and @AWSjswinney for working on this 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aarch64 wheel not working; cmake binary segfault
3 participants