Skip to content

fix: tests not working on CI#9

Merged
louis030195 merged 3 commits intoscreenpipe:mainfrom
divanshu-go:fix-ci
Oct 18, 2025
Merged

fix: tests not working on CI#9
louis030195 merged 3 commits intoscreenpipe:mainfrom
divanshu-go:fix-ci

Conversation

@divanshu-go
Copy link
Contributor

image

@divanshu-go
Copy link
Contributor Author

@louis030195 Green build.

Comment on lines -21 to +23
tesseract-install: winget install --id=UB-Mannheim.TesseractOCR -e --accept-package-agreements --accept-source-agreements
tesseract-install: |
winget install --id=UB-Mannheim.TesseractOCR -e --accept-package-agreements --accept-source-agreements
echo "C:\Program Files\Tesseract-OCR" >> $env:GITHUB_PATH
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, tesseract.exe was installed but not on the PATH, causing command-not-found errors in tests.
The new multi-line run step ensures both installation and path exposure are handled consistently on Windows runners.

Comment on lines +43 to +46
- name: Install additional dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y pkg-config libdbus-1-dev libssl-dev libclang-dev libxcb1-dev libxrandr-dev libpipewire-0.3-dev libwayland-dev libegl-dev

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some crates (e.g. libxcap, wayshot, pipewire) link against system libraries unavailable in a clean Ubuntu runner.
Adding these packages prevents linker errors and ensures parity with local development environments.

Comment on lines -72 to +83
#[cfg(target_os = "macos")]
OcrProvider::MacOS => Ok(perform_ocr_apple(image, &self.options.languages)),
OcrProvider::MacOS => {
#[cfg(target_os = "macos")]
{
Ok(perform_ocr_apple(image, &self.options.languages))
}
#[cfg(not(target_os = "macos"))]
{
Err(anyhow::anyhow!(
"macOS OCR is not available on this platform"
))
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original implementation conditionally compiled the match arm, which caused missing-variant errors on non-macOS builds.
The updated approach keeps the variant present in all builds while using runtime cfg checks to control execution.
This prevents compilation issues and provides a clear runtime error if the macOS engine is selected on unsupported platforms.

@louis030195 louis030195 merged commit 3eae182 into screenpipe:main Oct 18, 2025
3 checks passed
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.

2 participants