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

fix: crate build issues with stream feature #711

Merged
merged 10 commits into from
Oct 15, 2024

Conversation

benpueschel
Copy link
Contributor

Fix a build issue introduced by #690 when building octocrab with the stream feature, which the pr checks didn't catch.

Closes: #707

Fix a build issue introduced by XAMPPRocky#690 when building octocrab with the
`stream` feature.

Closes: XAMPPRocky#707
@XAMPPRocky
Copy link
Owner

Thank you for your PR! Would you mind adding a step in CI to check the stream feature?

@XAMPPRocky
Copy link
Owner

Congrats, seems like you broke LLVM 😄

@benpueschel
Copy link
Contributor Author

= note: /usr/bin/ld: final link failed: No space left on device
collect2: error: ld returned 1 exit status

Are the logs taking up too much space? Could that be the reason ld panics?

@maflcko
Copy link
Contributor

maflcko commented Oct 8, 2024

GHA runners don't have too much free storage capacity. You could try to free some with something like https://github.com/google/oss-fuzz/blob/7c3fe25727d36308fc32d34b1bd83895e52e1d44/.github/workflows/project_tests.yml#L65-L74

@benpueschel
Copy link
Contributor Author

This PR might genuinely be cursed...

@benpueschel
Copy link
Contributor Author

Okay, so there are two more solutions to this problem I can think of.

  1. We could add an entire new job which is entirely responsible for checking the stream feature, meaning we (hopefully) don't pollute each runner with two different versions of every single target (one with the default, one with the stream features)
  2. run cargo clean after successfully building the default feature-set. I really don't like this approach because it'd dramatically increase workflow run time.

Both of these approaches are compromises, and it'd be great if we could somehow universally extract more space - or tell cargo to delete any targets we don't need, without clearing the entire build cache, but that seems to be harder than anticipated.

Does anyone have a better idea?

@Caellian
Copy link

Something like:

jobs:
  build:
    runs-on: ${{ matrix.os }}-latest
    strategy:
      matrix:
        channel: [stable, beta, nightly]
        os: [ubuntu, macos, windows]
        features:
          - ""
          - "-F stream"
    steps:
    - uses: actions/checkout@v2
    - run: rustup default ${{ matrix.channel }}
    - run: cargo build --verbose --all-targets ${{ matrix.features }}
    - run: cargo test ${{ matrix.features }}

should work™?

@benpueschel
Copy link
Contributor Author

That would definitely queue-up some jobs (GitHub only allows for 20 total concurrent jobs, a maximum of 5 of which can be MacOS runners: https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration#usage-limits), but I think that's the most simple solution.

I'll try it out when I have the time to.

@benpueschel
Copy link
Contributor Author

Looks like we're finally passing all tests :)

@XAMPPRocky
Copy link
Owner

Thank you for your PR!

@XAMPPRocky XAMPPRocky merged commit 227716f into XAMPPRocky:main Oct 15, 2024
20 checks passed
@github-actions github-actions bot mentioned this pull request Oct 15, 2024
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.

Version 0.41.0 doesn't compile
4 participants