Skip to content
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

crossdev: Bootstrap the full LLVM toolchain #24

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vadorovsky
Copy link
Contributor

Include llvm-libunwind and libcxx in the LLVM-based cross environments,
so they are fully ready to build any package.

@vadorovsky vadorovsky marked this pull request as draft November 11, 2024 23:26
@@ -0,0 +1,55 @@
name: CI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I think @Arniiiii is interested in doing some work on this as well.

@vadorovsky
Copy link
Contributor Author

Depends on gentoo/gentoo#39280

@thesamesam I added a GitHub Actions workflow which should be able to test crossdev. But it seems like actions need to be enabled for this repo.

@thesamesam
Copy link
Member

I think it'll Just Work once it's merged.

@vadorovsky
Copy link
Contributor Author

Usually when I'm adding workflows to new repos, they start executing already in the PR introducing them. I would double-check if there is any setting to enable.

But if that doesn't work, I can try making an another PR, where I could start with testing GNU targets.

@vadorovsky vadorovsky marked this pull request as ready for review November 11, 2024 23:56
@vadorovsky vadorovsky marked this pull request as draft November 11, 2024 23:56
@thesamesam
Copy link
Member

Checking the settings is awkward because of how we have things setup. But right now, it looks to me the same as every other repo we have in gentoo. Please do make that other PR and I'll merge it.

@Arniiiii
Copy link

Depends on gentoo/gentoo#39280

@thesamesam I added a GitHub Actions workflow which should be able to test crossdev. But it seems like actions need to be enabled for this repo.

AFAIK you can enable GitHub actions for your fork somewhere in settings of your fork.

Nice! I think @Arniiiii is interested in doing some work on this as well.

Definitely ! Thanks for mentioning!

In current upstream we see checking next setups:
- aarch64-unknown-linux-gnu on openrc+gcc+glibc
- aarch64-unknown-linux-gnu on openrc+gcc+musl
- aarch64-unknown-linux-musl on openrc+gcc+glibc
- aarch64-unknown-linux-musl on openrc+gcc+musl

I think this is small amount of setups. Even your work on enabling cross-compiling with llvm via the crossdev script is not checked.

I guess there's a small problem with automatic testing of the project: checking valuable amount of targets requires a lot of time. I wrote a bash script for all of this, you can check at my fork: https://github.com/Arniiiii/crossdev/blob/master/test.bash . It took on a laptop with Intel's i7-13700HX at 4-5 GHz around 600 mins IIRC.

Now there's a problem: GitHub allows only 2000 mins of Linux CI/CD per month per user.

So only 1,2 or maybe 3 such checks can be done per month per user. That's not good.

AFAIK there's a relatively newly added feature in GitHub called self-hosted runners. Gitea, Forgejo, Gitlab have this feature and I can confirm it works there, but I haven't setup it on GitHub yet.

In a week or in a month I can provide a laptop with znver2 CPU with 12 threads and 16GB as a self-hosted runner. It can solve the problem at least partially. I guess after this it would be logically to consider what targets going to be checked and when ( at push or at merge or whenever).

@vadorovsky
Copy link
Contributor Author

@Arniiiii check out this PR #28 - I'm adding more architectures there. And we could discuss the details about CI there. 🙂

I don't think there is a limit of 2000 hours per month for free repos, or at least I wasn't able to find any information about that. According to https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration#usage-limits, the only limitation relevant to us is 6h limit per job - which we are not exceeding in any case so far.

@Arniiiii
Copy link

Arniiiii commented Nov 20, 2024

I don't think there is a limit of 2000 hours per month for free repos, or at least I wasn't able to find any information about that. According to https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration#usage-limits, the only limitation relevant to us is 6h limit per job - which we are not exceeding in any case so far.

Indeed. I was misled by their documentation at a github's CI/CD documentation page.

It seems for public repositories there's no such limit.

Then it seems that the only problem is to write a good enough CI script

@Arniiiii check out this PR #28 - I'm adding more architectures there. And we could discuss the details about CI there. 🙂

Indeed. I see you did a good job. I'm currently busy, maybe next weekends I can take a better look at what else can be done.

Include llvm-libunwind and libcxx in the LLVM-based cross environments,
so they are fully ready to build any package.

Signed-off-by: Michal Rostecki <[email protected]>
That's what sys-apps/baselayout does for all systems, with and without
multilib.

Not doing so breaks behavior of several packages, including
sys-libs/libcxx.

Signed-off-by: Michal Rostecki <[email protected]>
@vadorovsky vadorovsky force-pushed the full-llvm-toolchain branch 2 times, most recently from c444801 to f8aefc3 Compare November 26, 2024 09:52
@vadorovsky vadorovsky force-pushed the full-llvm-toolchain branch 2 times, most recently from cec06b1 to 7d8717f Compare November 26, 2024 12:23
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.

3 participants