Skip to content

Merge pull request #103 from louis030195/apple-native-ocr #649

Merge pull request #103 from louis030195/apple-native-ocr

Merge pull request #103 from louis030195/apple-native-ocr #649

Workflow file for this run

# testing locally with act cli
# act -W .github/workflows/ci.yml --container-architecture linux/amd64 -env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/ --env ACTIONS_RUNTIME_TOKEN=foo --env ACTIONS_CACHE_URL=http://host.docker.internal:8080/ --artifact-server-path out -j build-ubuntu -P ubuntu-latest=-self-hosted --env-file .env --secret-file .secrets
name: Rust CI
on:
push:
pull_request:
jobs:
test-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y tesseract-ocr libtesseract-dev libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libasound2-dev libgtk-3-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev
- name: Copy test image
run: |
mkdir -p target/debug/deps
cp screenpipe-vision/tests/testing_OCR.png target/debug/deps/
- name: Run tests
run: cargo test
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~\AppData\Local\cargo\
target\
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: setup Bun
uses: oven-sh/setup-bun@v1
- name: Run pre_build.js on
shell: bash
run: bun ./scripts/pre_build.js
working-directory: ./examples/apps/screenpipe-app-tauri
# - name: Run tests
# run: cargo test
- name: Copy test image
shell: bash
run: |
mkdir -p target/debug/deps || true
cp screenpipe-vision/tests/testing_OCR.png target/debug/deps/
- name: Run specific Windows OCR test
run: cargo test test_process_ocr_task_windows