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

Enable multiple cores in haskell GHA #1006

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

carbolymer
Copy link
Contributor

@carbolymer carbolymer commented Jan 7, 2025

Changelog

- description: |
    Enable multiple cores in haskell GHA
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
   - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Changes from cardano-api PR copied to cardano-cli:

Differences in build times: left before, right after this change:

screenshot-20250107_110734

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@carbolymer carbolymer marked this pull request as ready for review January 7, 2025 10:08
Copy link
Contributor

@palas palas left a comment

Choose a reason for hiding this comment

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

Looks good, and the CI passes, which is the important thing

@@ -112,7 +112,7 @@ jobs:
# this should be a no-op, but if the cache key was not found we need to build stuff so we can
# cache it for the next step.
- name: Install dependencies
run: cabal build all --enable-tests --only-dependencies -j --ghc-option=-j4
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the number in the cabal flag not specified but it is in the --ghc-option? I don't know how many cpus in the GHA runner, but I imagine it is a reasonable setting anyway

Copy link
Contributor Author

@carbolymer carbolymer Jan 7, 2025

Choose a reason for hiding this comment

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

Github runners have 4 cores. I have no idea why it was not specified for cabal.
I vaguely remember we had issues when building too many packages concurrently, but I can't reproduce it anymore and -j4 was already maximum parallelism in GHA so it's kind of redundant.

@carbolymer carbolymer added this pull request to the merge queue Jan 7, 2025
Merged via the queue into master with commit 6822436 Jan 7, 2025
58 of 80 checks passed
@carbolymer carbolymer deleted the mgalazyn/chore/enable-multi-core-gha-build branch January 7, 2025 12:21
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