-
Notifications
You must be signed in to change notification settings - Fork 33
add github action for building image #161
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
Conversation
|
Great work to learn about CI from! Thanks!! |
|
This is really awesome, great work @austin987! |
|
None of the questions here will keep me from merging this, just wondering for the future: General CI question (sorry, I'm a noob to this stuff), Where does this docker run? |
Yes. ubuntu-latest is just the docker image in github actions, but it should be quite easy to host that on your own. Though github actions may be easier, the resulting image is quite big for the free plan (500MB). Edit: That's only limited for private reps. I have spare hosting and may give it a try using the template. |
|
To clarify, this runs a debian:buster docker container inside of a ubuntu VM, hosted by github (in Azure, again, see https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources). I'm not sure what you mean by a hypothetical PrawnOS CI/build server, so I can't really comment without knowing the details. That said, the build script should be relatively easy to move away from github, if needed (really just needs a vm that runs docker, which then runs the script to build the image). If there are more concrete details about this future setup, I could comment further (and can help move later, if needed). @rk-zero, I'm not sure what 500MB limit you're referring to? Github actions don't have any 500MB limit that I can see. If it's a public repo, limits are: Supported runners and hardware resources Each virtual machine has the same hardware resources available. I've already built and downloaded a PrawnOS image (i.e., roughly 2GB), no complaints from github. See for yourself at https://github.com/austin987/PrawnOS/actions/runs/106910960 (download 'image', unzip, dd as usual). |
|
Ah, I see debian isn't a supported runner. That is too bad. |
|
@SolidHal IMO yes. The only thing that may be worth changing would be to add the extra dependencies that are here: to README.md (they're not present in a default debian container, but are needed for the build. I'm not sure if they're in a standard debian vm/iso install). But the CI/CD itself works and is good to go, afaik. Like I said, I've already reimaged my chromebook and it works. Later, I'd like to try to get it tested in qemu, but I have no experience with qemu on arm, so that may be a while. |
|
@austin987 Great! I added those dependencies to the README. I'll add you to AUTHORS as well after the merge. Thanks again for your work! |
|
Now that it's merged, here's the first image built for upstream: \o/ |
This is an initial step towards fixing #150.
Note that this only builds the image, it doesn't (yet) test it. I haven't used qemu with arm before, so I've got some learning to do before attempting that. Still, this is useful to show to:
A) show that a PR won't break the build
B) allow downloading a snapshot image without having to setup a build environment
an example build/image can be seen here:
https://github.com/austin987/PrawnOS/actions/runs/106910960
note that this depends on #156 and #158 being merged so that the build will actually work.
Some minor notes: some more packages that weren't listed in the README dependencies are needed (at least, for building in a container, they may be in a base debian install, didn't verify). Perhaps instead we should add those packages to the README list instead of keeping it separate.
If this approach is acceptable, it may also be worth expanding it a bit to try building against different debian suites (i.e., run multiple pipelines against stretch/buster/etc.) to catch potential problems before they happen. Anyway, wanted to get the initial work in before expanding on it ;).
FYI, the image created does work, I just reimaged my C201P and the kernels is 5.4.29, not 5.4.23 which is what's in the last official release :)