WIP: Fix Windows and macOS CI

This commit is contained in:
Alex Pyrgiotis 2024-03-28 19:46:06 +02:00
parent 288c0715ac
commit 0d80cf1f0c
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA

View file

@ -68,8 +68,28 @@ jobs:
sudo apt-get install -y python3-poetry
python3 ./install/common/build-image.py
download-tessdata:
name: Download and cache Tesseract data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Tessdata
id: cache-tessdata
uses: actions/cache@v4
with:
path: share/tessdata/
key: v1-tessdata-${{ hashFiles('./install/common/download-tessdata.py') }}
enableCrossOsArchive: true
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Download Tessdata
if: steps.cache-tessdata.outputs.cache-hit != 'true'
run: python3 ./install/common/download-tessdata.py
windows:
runs-on: windows-latest
needs: download-tessdata
env:
DUMMY_CONVERSION: 1
steps:
@ -79,6 +99,13 @@ jobs:
python-version: "3.12"
- run: pip install poetry
- run: poetry install
- name: Restore cached tessdata
uses: actions/cache/restore@v4
with:
path: share/tessdata/
enableCrossOsArchive: true
fail-on-cache-miss: true
key: v1-tessdata-${{ hashFiles('./install/common/download-tessdata.py') }}
- name: Run CLI tests
run: poetry run make test
# Taken from: https://github.com/orgs/community/discussions/27149#discussioncomment-3254829
@ -106,6 +133,13 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Restore cached tessdata
uses: actions/cache/restore@v4
with:
path: share/tessdata/
enableCrossOsArchive: true
fail-on-cache-miss: true
key: v1-tessdata-${{ hashFiles('./install/common/download-tessdata.py') }}
- run: pip install poetry
- run: poetry install
- name: Run CLI tests