Skip to content

build(homebrew): reduce test duplication and add test coverage for macOS#5331

Open
ReenigneArcher wants to merge 5 commits into
masterfrom
build/homebrew/reduce-test-duplication
Open

build(homebrew): reduce test duplication and add test coverage for macOS#5331
ReenigneArcher wants to merge 5 commits into
masterfrom
build/homebrew/reduce-test-duplication

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

Try to reduce duplication in homebrew builds.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@ReenigneArcher ReenigneArcher marked this pull request as draft June 24, 2026 20:43
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@ReenigneArcher ReenigneArcher force-pushed the build/homebrew/reduce-test-duplication branch from 9e04b25 to c2ebdde Compare June 24, 2026 21:20
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 27.55%. Comparing base (0731729) to head (edb4d1f).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5331      +/-   ##
==========================================
+ Coverage   18.02%   27.55%   +9.53%     
==========================================
  Files         111      113       +2     
  Lines       24623    25557     +934     
  Branches    10903    11232     +329     
==========================================
+ Hits         4438     7042    +2604     
+ Misses      18542    16573    -1969     
- Partials     1643     1942     +299     
Flag Coverage Δ
Archlinux 11.50% <ø> (ø)
FreeBSD-amd64 13.31% <ø> (+<0.01%) ⬆️
Homebrew-macos-14 21.07% <ø> (?)
Homebrew-macos-26 21.37% <ø> (?)
Homebrew-ubuntu-24.04 13.53% <ø> (ø)
Linux-AppImage 12.40% <ø> (ø)
Windows-AMD64 15.27% <ø> (ø)
Windows-ARM64 13.29% <ø> (+<0.01%) ⬆️
macOS-arm64 19.23% <ø> (ø)
macOS-x86_64 18.73% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 69 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0731729...edb4d1f. Read the comment docs.

@ReenigneArcher ReenigneArcher force-pushed the build/homebrew/reduce-test-duplication branch 3 times, most recently from c199f9e to adf38fc Compare June 24, 2026 23:38
@ReenigneArcher ReenigneArcher force-pushed the build/homebrew/reduce-test-duplication branch from adf38fc to 7facca4 Compare June 25, 2026 00:08
Pin LizardByte/actions/actions/release_homebrew to commit a46850981292c4bbc0c41715f286ad95adaaaf4a (v2026.625.20301) in CI workflows. Replaces previous refs (200eaeb897a2b065a65cb6f16b41077432007490 and fix/release_homebrew/reduce-test-duplication) used by the Validate Homebrew Formula and Upload Homebrew Beta Formula jobs.
@ReenigneArcher ReenigneArcher changed the title build(homebrew): reduce test duplication build(homebrew): reduce test duplication and add test coverage for macOS Jun 25, 2026
@ReenigneArcher ReenigneArcher marked this pull request as ready for review June 25, 2026 02:24
@ReenigneArcher ReenigneArcher force-pushed the build/homebrew/reduce-test-duplication branch 2 times, most recently from 5d4ca31 to cb895b6 Compare June 25, 2026 02:45
Enable coverage reporting for Homebrew macOS CI jobs and consolidate gcovr usage in the Homebrew formula. Move gcovr to a top-level dependency, remove the duplicated on_linux entry, and add coverage_gcov_executable to pick llvm-cov's gcov on macOS or the GCC gcov on Linux. generate_coverage_report now uses the selected gcov executable and no longer skips macOS; the test harness also always asserts the presence of coverage.xml. Changes affect .github/workflows/ci.yml and packaging/sunshine.rb.
@ReenigneArcher ReenigneArcher force-pushed the build/homebrew/reduce-test-duplication branch from cb895b6 to 7188c6d Compare June 25, 2026 02:47
Enable source-based LLVM coverage on macOS and unify test binary handling. Adds SUNSHINE_LLVM_COVERAGE CMake option and LLVM compile/link flags, introduces LLVM_PROFILE_FILE handling, llvm-profdata discovery, and gcovr invocation path for macOS (.profraw -> llvm-profdata flow). Factors out TEST_BINARY constant, updates test invocation and install to use it, and adds checks to ensure profile data and coverage lines exist. Removes the previous macOS llvm formula dependency and replaces gcov-specific options with separate LLVM vs GCC coverage code paths.
@ReenigneArcher ReenigneArcher force-pushed the build/homebrew/reduce-test-duplication branch from 2e4fbc5 to 2ae3d9d Compare June 25, 2026 03:22
Update CI to upload and consume lcov coverage output and make coverage file configurable per matrix. The workflows now include coverage.lcov in artifacts and expose a matrix coverage_file used by the Codecov step.

Refactor packaging/sunshine.rb to support generating LLVM-based lcov on macOS and keep gcov/xml generation on Linux: add constants, new helpers to merge profraw into profdata, export llvm-cov lcov, rewrite source paths to be relative to src/, and validate lcov output. Adjust artifact handling to expect coverage.lcov on macOS and coverage.xml on Linux and update assertions accordingly.
@ReenigneArcher ReenigneArcher force-pushed the build/homebrew/reduce-test-duplication branch from 4e9f57b to edb4d1f Compare June 25, 2026 03:50
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Bugs (required ≤ 0)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant