matrix-org / matrix-hookshot

A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA.
https://matrix-org.github.io/matrix-hookshot/
Apache License 2.0
283 stars 68 forks source link

Make the Dockerfile cross-compile without qemu #801

Open sandhose opened 1 year ago

sandhose commented 1 year ago

This changes the Dockerfile so that it can be fully cross-compiled to arm64 & x86_64 without any qemu emulation. This should mean way less time spent building the arm64 image in CI. This also means better caching between the two architectures.

I had to bump the NAPI CLI to a 3.0 alpha version, because the new version has a handy --cross-compile flag, which automatically invokes cargo-zigbuild if needed.

sandhose commented 1 year ago

Thanks @AndrewFerr for the crypto SDK bindings release! I was able to remove the manual SDK download workaround 🎉

I had to upgrade via the package.json's resolutions field to override the sub-dependency, and it would require a new release of @vector-im/matrix-bot-sdk.

Also note that the upgrade does deprecate the sled store, and I have not updated the docs accordingly. What I would suggest we do is: