-
Notifications
You must be signed in to change notification settings - Fork 285
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
multi-platform tested container build #220
Conversation
podman run -d --pod-id-file=podid --name=listener -u 14:0 "${{ steps.build-image.outputs.image-with-tag }}$1" -s 0.0.0.0:1234 | ||
sleep 3 | ||
podman logs listener | ||
podman run --pod-id-file=podid --rm -i "${{ steps.build-image.outputs.image-with-tag }}$1" ws://127.0.0.1:1234/ <<< "Test Message $1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can smoke test be extended to include TLS? OpenSSL integration is the trickiest thing for portability, some platforms (e.g. 32-bit x86 musl) crash when trying to use TLS.
There is a sample certificate test.pkcs12
in the repository for serving. Client can just use -k
option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to merge this one and maybe add a test script if you like. I can help integrating it into the workflow. Or tell me what commands exactly to use for TLS connections, it should be straightforward to add.
For accessing certificates, probably it would be necessary to mount a volume in podman/docker using the |
Is this pull request the cause of dependabot pull request spam? |
Yes, see |
Why the builder hangs in about half of attempts? Example: https://github.com/vi/websocat/actions/runs/8906583058/job/24458977279 |
I imssed the question. But just noticed the builds fail. I think they hit some timeout at 6h :( Looking at the log last thing I see is
Does it build properly for you locally? If it builds locally, another thing that can be tried is (that I don't have permissions to), maybe try to run the workflow manually and specify a single platform only - once Another thing that comes to mind, in case build uses a lot of memory, that can work locally but overload the gh actions builder. Really not a clear idea what might be the case. |
Within Docker or in usual dev mode? Obviously, when I run |
I mean the container build. Docker or podman. |
Running
I doubt it is multi-arch. Or does that Github builder use some entirely different Dockerfile? |
The build is multi-arch which means a separate image of each selected architecture is built from the same Dockerfile.
And the default archs can be seen here:
When building image manually, there are parameters that can be set to override the default platforms and set a custom tag. |
I see mentions of "QEMU" in that file. Does it build everything within an additional virtual machine instead of directly? Meanwhile removed LTO and other heavyweight compilation options from |
I'm sorry for the delay. I couldn't get around to this. When only x86_64 is built, it works: When arm is built though, it seems to freeze or is extremely slow: I can't say why. You can replicate locally by building the arm target. Should be just having the necessary |
Maybe it is trying to build code within qemu instead of cross-compiling from x86_64 and using qemu only for running tests? |
It is indeed running the container build entirely under qemu. There is no mechanism to split these. So unless compiling can be done less intensive, a short term solution is to only build x86_64. For the time being this can be applied #274 A nicer solution would be to cross compile outside the docker/buildah build. Then have a separate Dockerfile that will just install dependencies and only copy the pre-compiled binaries to the container. Which then will allow to have quick qemu cross-platform builds because the compiling step, which is the issue right now, will not be performed during the container build. I see a guide about cross-compiling https://blog.logrocket.com/guide-cross-compilation-rust/ but have no idea about rust. So if you have steps that will cross compile on ubuntu (what github seems to be using), then I can look at how this can be integrated into the action. |
This one enables arm64 build
adds smoke tests for the built images
adds dependency updates from dependabot
container image badge to the readme