-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
Automated ARM builds #418
Comments
We build all binaries on travis (for linux and mac) and appveyor (for windows). What would be very useful is a travis job that used @coolaj86 - interested in providing a pull request adding rpi build support to travis.yml? /cc @mojodna who may also be interested in this effort. |
Hmm. Interested I am, yet not yet needing it. Thanks. |
My work on embedded systems has lead me to believe that emulation is no substitution for compiling on the real deal, so I wait the 15+ minutes out when I need it. I'm open to trying something like Qemu, but it would probably be easier for me to set up a Pi as a build server than to learn Qemu and what special compile options I'd need to pass and such. What are the advantages of Qemu that make you prefer that solution? |
@coolaj86 does it not come down to automation, automation, automation and repeatability? If I were to take a binary for sqlite3 instead of source, then I'd definitely want it to have been built through the 'trusted' channels - not a third party. Having said that something really needs to be done #597 |
Scaleway baremetals ARMv7 servers, might help here. Each build, assuming it would last less than 59 minutes, would cost €0.006. Moreover, with their CLI, create, start and SSH into a server is as easy as:
Note I am not affiliated to them in any way, that's just how I handle my personal Docker builds. 😉 |
Note that we don't have build on ARMv7; instead we could also cross-compile. |
The build takes a ridiculous amount of time to complete especially on the Pi Zero - that I'd give up on sqllite or use python. Please provide a binary through npm to support continued use. |
I've automated an ARM build with Vagrant, Docker (as opposed to chroot in @bander9289's approach) and QEMU which is one option for an overall
I was not able to get a full QEMU ARM VM running but I did have success with the QEMU User Mode emulation as above. So it runs only the docker process under ARM emulation rather than providing a full virtual machine. One major drawback of either QEMU approach is that is only supports a single thread, so for example I could not install Git LFS within the ARM docker container as Go binaries cannot be run through QEMU due to the concurrency aspects of the language. So my advice is do as much as you can within the "host VM" then delegate the ARM portions to the container. Maybe some of the above could help for the Travis build? Cross-compilation would be ideal but it didn't seem straight forward to me, that's why I went the QEMU route instead as it also covers other npm modules at the same time. |
@skl What about using Travis or at least using the steps described here: https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/ |
Thanks for the article, uses the same principal and applies it to Travis. Just in my case I need private builds for work. |
Anyone want to try getting qemu running on travis (within docker as a bonus) so we can start building and publishing binaries for ARM/rasp? |
Cross-post from #996: this comment looks like it has a workable path for an ARM environment on Travis: travis-ci/travis-ci#3376 (comment) similar to @skl's solution, except it looks like a "docker in docker." Have not tested myself. |
An other option would be to submit a deb package of node-sqlite3 to debian then use if on raspbian... Well I can try to hack to Docker file to build package. Edit: https://tracker.debian.org/pkg/node-sqlite3 while not in Raspbian yet ? |
Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
It was build on Raspbian using docker and binfmt+qemu Usage: curl -sL https://rawgit.com/$org/$project/$branch/run.sh | bash -x - ls tmp/out/node-sqlite3/sqlite3-*.tgz Or run.sh can be run insources Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
It was build on Raspbian using docker and binfmt+qemu Usage: curl -sL https://rawgit.com/$org/$project/$branch/run.sh | bash -x - ls tmp/out/node-sqlite3/sqlite3-*.tgz Or run.sh can be run insources Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
It was built on Raspbian using docker and binfmt+qemu Usage: curl -sL https://rawgit.com/$org/$project/$branch/run.sh | bash -x - ls tmp/out/node-sqlite3/sqlite3-*.tgz Or run.sh can be run insources Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
@springmeyer would that help ? then we can tune travis for it mentoring welcome |
Do you then want to do continuous delivery ? if yes can you recommend a service to host built packages ? |
It was built on Raspbian using docker and binfmt+qemu Usage: curl -sL https://rawgit.com/$org/$project/$branch/run.sh | bash -x - ls tmp/out/node-sqlite3/sqlite3-*.tgz Or run.sh can be run insources Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
There are build scripts that will automatically detect the architecture, version and upload to the S3 bucket. |
This can be then declined for several arch Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1112 TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Just shared as demo May be changed Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1112 TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Usage: curl -sL https://rawgit.com/$org/$project/$branch/run.sh | bash -x - ls tmp/out/node-sqlite3/stage/sqlite3/*/node-*-*-* Or run.sh can be run in sources Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Usage: ``` docker build . ``` This can be then declined for several arch, elsewhere. Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1112 TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Usage: ``` docker build . ``` This can be then declined for several arch, elsewhere. Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: #418 Forwarded: #1112 #1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Today, I had a look at this but I am currently blocked by: |
Hmm. Isn't this actually a lot simpler? You don't have to build a Docker container, if you have a prebuilt Node container for the target architecture. For example on a Docker host that has bin_fmt support for ARM (like my Macbook) you can build & publish node-sqlite3 with a single command:
I don't have the credentials for the s3 upload, so naturally publish fails for me, so this is not tested end to end. So: if we add something like
as Look, ma', no Dockerfile needed. |
See #1149 for a working example of the idea in the previous message. |
Raspbian is used as base It took less than 20 min to build on Ubuntu 18.04 x86_64 If merged other arch will come next, and then automated by CI. Relate-to: TryGhost#418 Change-Id: Ic92baf3e019e28862a24d84728835a641a6838c1 Signed-off-by: Philippe Coval <[email protected]>
Raspbian is used as base It took less than 20 min to build on Ubuntu 18.04 x86_64 If merged other arch will come next, and then automated by CI. Relate-to: TryGhost#418 Change-Id: Ic92baf3e019e28862a24d84728835a641a6838c1 Forwarded: TryGhost#1169 Signed-off-by: Philippe Coval <[email protected]>
Raspbian is used as base It took less than 20 min to build on Ubuntu 18.04 x86_64 If merged other arch will come next, and then automated by CI. Relate-to: #418 Change-Id: Ic92baf3e019e28862a24d84728835a641a6838c1 Forwarded: #1169 Signed-off-by: Philippe Coval <[email protected]>
Just shared as demo May be changed Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1112 TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Usage: curl -sL https://rawgit.com/$org/$project/$branch/run.sh | bash -x - ls tmp/out/node-sqlite3/stage/sqlite3/*/node-*-*-* Or run.sh can be run in sources Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
#1147 was merged, is there any blocker on hooking that up to the CI? |
Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Relate-to: TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Just shared as demo May be changed Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1112 TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Usage: curl -sL https://rawgit.com/$org/$project/$branch/run.sh | bash -x - ls tmp/out/node-sqlite3/stage/sqlite3/*/node-*-*-* Or run.sh can be run in sources Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Usage: curl -sL https://rawgit.com/$org/$project/$branch/run.sh | bash -x - ls tmp/out/node-sqlite3/stage/sqlite3/*/node-*-*-* Or run.sh can be run in sources Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Just shared as demo May be changed Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1112 TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Usage: curl -sL https://rawgit.com/$org/$project/$branch/run.sh | bash -x - ls tmp/out/node-sqlite3/stage/sqlite3/*/node-*-*-* Or run.sh can be run in sources Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: TryGhost#418 Forwarded: TryGhost#1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
Change-Id: I79000463955d16eec8809c870f7d02c60da53432 Bug: #418 Relate-to: #1028 Origin: https://github.com/tizenteam/node-sqlite3 Signed-off-by: Philippe Coval <[email protected]>
I created #1362 which seems a bit less complicated and also provides alpine binaries. The only thing missing is anyone reviewing it and a repo maintainer setting S3 bucket credentials. |
This is done, pending release - please see my comment here: #1362 (comment) 🙂 |
I would be happy to build arm6 and arm7 bins for both sqlite3 and sqlcipher.
v0.10 and v1.2 work
v0.11 and <= v1.1 fail
v0.12 I haven't tested.
I have internet-accessible PIs connected to a few routers that I can offer for such a task.
The text was updated successfully, but these errors were encountered: