-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Create linux-musl.yml #2548
base: master
Are you sure you want to change the base?
Create linux-musl.yml #2548
Conversation
518386a
to
24b2705
Compare
Update linux-musl.yml Update linux-musl.yml Create linux-musl.yml static musl crossbuild binaries Update linux-musl.yml Update linux-musl.yml Update linux-musl.yml Update linux-musl.yml
sorry about the job spam. I was trying to add the tests to the builds from the existing Linux workflow but I guess I'm missing something as can't seem to reproduce the python ones in full. So now it does the python and cmake builds with some cmake failures in testing https://github.com/userdocs/ninja/actions/runs/12604320560 |
Why though? |
Ah I remember now. Can you simplify this? I think one job is more than enough. As Ninja is C++ I would suspect musl fans are already crying their eyes out anyway and will prefer https://github.com/michaelforney/samurai. |
I think the simplest way to do this is just using an alpine container on x86_64. No external requirements. If you added more arch in the future it would be via emulation which is not that fast but if you don't mind the time taken, it does the job ( similar to this job aarch64 linux So if you want just one arch on x86_64 i'll do it via alpine container and it should also work fine with the cmake lto thing, which appears to be a crossbuild bug on their side. |
So, since this happened https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/ I changed it to build on https://hub.docker.com/r/amd64/alpine/ |
Pretty fast as well. note: I don't install gtest so it uses this Lines 255 to 264 in 6b5d7a7
I also tested it with googletest-1.15.2.tar.gz in the CMakeLists.txt and it worked find_package(GTest)
if(NOT GTest_FOUND)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/releases/download/v1.15.2/googletest-1.15.2.tar.gz
URL_HASH SHA256=7b42b4d6ed48810c5362c265a17faebe90dc2373c885e5216439d37927f02926
)
FetchContent_MakeAvailable(googletest)
endif() |
So the action can't run in a pr workflow - actions/attest-build-provenance#99 I pushed on tag only Do you have a preference? |
Actually I don't want any artifacts for musl. |
@jhasse done: removed artifacts/attestation and updated permissions |
A static musl crossbuild binaries workflow to test building against musl cc across a range of arch targets,
A continuation of this; #2426
It uses a variation of this https://github.com/richfelker/musl-cross-make via https://github.com/userdocs/qbt-musl-cross-make which provides the crossbuild toolchains on demand, here using the docker images.
They are using alpine linux settings from here https://git.alpinelinux.org/aports/tree/main/gcc/APKBUILD#n287
You could also release the static binaries using this.
Take about 3 minutes per build https://github.com/userdocs/ninja/actions/runs/12575349270