fix(CI/CD): Use the eng language package location to set the TESSDATA_PREFIX envvar

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
This commit is contained in:
Nikos Livathinos 2024-10-07 18:34:50 +02:00
parent be6489bde0
commit 8ec8c38de8

View File

@ -3,8 +3,6 @@ on:
jobs:
run-checks:
env:
TESSDATA_PREFIX: /usr/share/tesseract-ocr/5/tessdata
runs-on: ubuntu-latest
strategy:
matrix:
@ -13,6 +11,9 @@ jobs:
- uses: actions/checkout@v3
- name: Install tesseract
run: sudo apt-get install -y tesseract-ocr tesseract-ocr-eng tesseract-ocr-fra tesseract-ocr-deu tesseract-ocr-spa libleptonica-dev libtesseract-dev pkg-config
- name: Set TESSDATA_PREFIX
run: |
echo "TESSDATA_PREFIX=$(dpkg -L tesseract-ocr-eng | grep tessdata$)" >> "$GITHUB_ENV"
- uses: ./.github/actions/setup-poetry
with:
python-version: ${{ matrix.python-version }}
@ -36,4 +37,4 @@ jobs:
poetry run python "$file" || exit 1
done
- name: Build with poetry
run: poetry build
run: poetry build