mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
WIP: Fix Windows and macOS CI
This commit is contained in:
parent
288c0715ac
commit
0d80cf1f0c
1 changed files with 34 additions and 0 deletions
34
.github/workflows/ci.yml
vendored
34
.github/workflows/ci.yml
vendored
|
@ -68,8 +68,28 @@ jobs:
|
||||||
sudo apt-get install -y python3-poetry
|
sudo apt-get install -y python3-poetry
|
||||||
python3 ./install/common/build-image.py
|
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:
|
windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
needs: download-tessdata
|
||||||
env:
|
env:
|
||||||
DUMMY_CONVERSION: 1
|
DUMMY_CONVERSION: 1
|
||||||
steps:
|
steps:
|
||||||
|
@ -79,6 +99,13 @@ jobs:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
- run: pip install poetry
|
- run: pip install poetry
|
||||||
- run: poetry install
|
- 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
|
- name: Run CLI tests
|
||||||
run: poetry run make test
|
run: poetry run make test
|
||||||
# Taken from: https://github.com/orgs/community/discussions/27149#discussioncomment-3254829
|
# Taken from: https://github.com/orgs/community/discussions/27149#discussioncomment-3254829
|
||||||
|
@ -106,6 +133,13 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
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: pip install poetry
|
||||||
- run: poetry install
|
- run: poetry install
|
||||||
- name: Run CLI tests
|
- name: Run CLI tests
|
||||||
|
|
Loading…
Reference in a new issue