Skip to content

Conversation

@austin987
Copy link
Contributor

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 :)

@ghost
Copy link

ghost commented May 18, 2020

Great work to learn about CI from! Thanks!!

@SolidEva
Copy link
Owner

This is really awesome, great work @austin987!
Just a couple questions that I'll do as separate code reviews

@SolidEva
Copy link
Owner

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?
Will it be straightforward to point this at a PrawnOS build server/CI server in the future?

@ghost
Copy link

ghost commented May 18, 2020

Will it be straightforward to point this at a PrawnOS build server/CI server in the future?

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.

@austin987
Copy link
Contributor Author

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.

    2-core CPU
    7 GB of RAM memory
    14 GB of SSD disk space

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).

@SolidEva
Copy link
Owner

Ah, I see debian isn't a supported runner. That is too bad.
@austin987 is this all ready to get merged?

@austin987
Copy link
Contributor Author

@SolidHal IMO yes. The only thing that may be worth changing would be to add the extra dependencies that are here:
https://github.com/SolidHal/PrawnOS/pull/161/files#diff-6f578e2d7164db0da450183a4553a856R29

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.

@SolidEva
Copy link
Owner

@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!
Looking forward to the qemu testing.

@SolidEva SolidEva merged commit 680e699 into SolidEva:master May 19, 2020
@austin987 austin987 deleted the github-action branch May 19, 2020 23:12
@austin987
Copy link
Contributor Author

Now that it's merged, here's the first image built for upstream:
https://github.com/SolidHal/PrawnOS/actions/runs/109809156

\o/

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.

2 participants