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

build/ci: attempt to fix failing cross compile step #9347

Merged
merged 2 commits into from
Dec 12, 2024
Merged

Conversation

guggero
Copy link
Collaborator

@guggero guggero commented Dec 10, 2024

With this PR we fix the previously failing cross compilation CI step.
The step currently fails due to insufficient disk space available on the GitHub runners.
This is mainly due to the fact that we cache the whole Go module and build cache, which sums up for all the different architectures we build for.

This PR does two things:

  • Make it possible to only cache the Go module cache, excluding the build cache. This will still prevent all modules from needing to be downloaded each time. But it will cause the cross compilation step to always start compilation from scratch.
  • Split the cross compilation into 3 parts (one for i386, amd64 and arm each), parallelizing the whole process (now a single part takes 16 minutes compared to over 30 minutes before). This means two more GitHub Action runner slots will be occupied per PR though.

Copy link
Contributor

coderabbitai bot commented Dec 10, 2024

Important

Review skipped

Auto reviews are limited to specific labels.

🏷️ Labels to auto review (1)
  • llm-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Pull reviewers stats

Stats of the last 30 days for lnd:

User Total reviews Time to review Total comments
guggero
🥇
36
▀▀▀
19h 10m
43
▀▀
ellemouton
🥈
13
20h 7m
29
yyforyongyu
🥉
12
2d 5h 41m
10
ziggie1984
12
7d 5h 38m
▀▀
62
▀▀▀
Roasbeef
9
3d 18h 55m
39
▀▀
bhandras
6
6h 50m
5
starius
3
16h 4m
5
bitromortac
3
7d 44m
▀▀
26
Abdulkbk
3
13h 37m
2
alexbosworth
1
4d 11h 58m
1
djkazic
1
1d 11h 22m
1
ProofOfKeags
1
9m
0
ViktorTigerstrom
1
1d 5h 6m
1
GeorgeTsagk
1
23h 29m
2
saubyk
1
6h 36m
0

@guggero guggero force-pushed the cross-compile-fix branch 2 times, most recently from 6774c1d to 745371d Compare December 10, 2024 19:15
This is a tradeoff of disk space (and with that cache size) and
compilation speed. Because we're still running into disk full errors
with the full build cache, we remove it for the cross compile step.
Which means we'll do more work each time.
This is just a test, perhaps this doesn't make any sense at all as it
will clog up too many build runners.
@guggero guggero marked this pull request as ready for review December 12, 2024 09:53
@guggero guggero added no-itest no-changelog golang/build system Related to the go language and compiler labels Dec 12, 2024
Copy link
Member

@yyforyongyu yyforyongyu left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Copy link
Collaborator

@bhandras bhandras left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

- name: amd64
sys: darwin-amd64 freebsd-amd64 linux-amd64 netbsd-amd64 openbsd-amd64 windows-amd64
- name: arm
sys: darwin-arm64 freebsd-arm linux-armv6 linux-armv7 linux-arm64 windows-arm
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tbh I like it this way better as it's more visible what is failing.

@guggero guggero merged commit 55b685d into master Dec 12, 2024
26 of 35 checks passed
@guggero guggero deleted the cross-compile-fix branch December 12, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
golang/build system Related to the go language and compiler no-changelog no-itest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants