Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Fix arm64 CI Travis #349

Closed
wants to merge 2 commits into from
Closed

Conversation

dennisameling
Copy link
Contributor

@dennisameling dennisameling commented Jan 27, 2021

Identify the Bug

See #347

Fixes #347

Description of the Change

After merging this PR, arm64 Linux Electron prebuilds will be created on a native arm64 host in Travis. This seems to be the only viable option for now, because apparently node-gyp doesn't support cross-compilation for other platforms than Windows (it builds without errors, but the final keytar.node is i686).

Alternate Designs

Possible Drawbacks

GitHub Actions doesn't support native arm64 hosted CI (yet), so the move from Travis to GH Actions might be a bit more painful after this change. Running a Docker container with QEMU emulation will work on GitHub Actions, but is much slower than a native arm64 host.

Verification Process

Release Notes

Repair arm64 Linux Electron prebuilds

@dennisameling
Copy link
Contributor Author

dennisameling commented Jan 27, 2021

@shiftkey any chance you could migrate this repo from travis-ci.org to travis-ci.com for the time being? They've migrated almost all capacity to .com now, resulting in incredibly long delays starting CI runs on .org. It's been 45+ mins and the run still hasn't started 😅

@shiftkey
Copy link
Contributor

@dennisameling I've made the request but I'm not sure how long it'll take to migrate 🤷🏻

@joaomoreno
Copy link

joaomoreno commented Jan 28, 2021

This seems to be the only viable option for now, because apparently node-gyp doesn't support cross-compilation for other platforms than Windows (it builds without errors, but the final keytar.node is i686).

That doesn't sound right. We are compiling Electron-based native node modules for both arm64 and armhf in our VS Code pipelines. There must be some other issue here.

We use a simple crossbuild debian container image to cross compile directly, instead of rebuilding to the right arch after building to the wrong one. Given the right disturl, target, runtime and arch, the right .node will be compiled from the get go.

@dennisameling
Copy link
Contributor Author

dennisameling commented Jan 28, 2021

Woah @joaomoreno, didn't know that was possible! Thanks for sharing! Created a new PR that cross-compiles arm64 from an x64 host: #352 - just had to add STRIP=/usr/bin/aarch64-linux-gnu-strip as node-keytar also strips the binaries.

Closing this PR in favor of the newer one 👍🏼

@joaomoreno
Copy link

joaomoreno commented Jan 28, 2021

@dennisameling My reaction as well, the first time I saw that solution. 👀 Glad I could share some love.

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

Successfully merging this pull request may close these issues.

Wrong prebuild architecture published for electron linux arm64
3 participants