Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows CI workflow #1695

Merged
merged 12 commits into from
Aug 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 30 additions & 14 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,27 @@ jobs:
# restore-keys: |
# ${{ runner.os }}-nuget-

- name: NuGet restore
shell: cmd
run: |
nuget restore

- name: Install Server-Media-Foundation
shell: powershell
run: |
Install-WindowsFeature Server-Media-Foundation

- name: Cache OpenCV binaries
id: cache_opencv
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/opencv_files
key: opencv-${{ env.OPENCV_VERSION }}-rev2

- name: Download OpenCV binaries
- name: Download OpenCV binaries
if: steps.cache_opencv.outputs.cache-hit != 'true'
shell: powershell
env:
GH_TOKEN: ${{ github.token }}
run: |
. ".\download_opencv_windows.ps1"
$OPENCV_FILES_TAG = "4.10.0.20240612"
$OPENCV_VERSION = "4100"
gh release download --repo shimat/opencv_files $OPENCV_FILES_TAG --pattern "opencv${OPENCV_VERSION}_win_x64.zip"
gh release download --repo shimat/opencv_files $OPENCV_FILES_TAG --pattern "opencv${OPENCV_VERSION}_win_x86.zip"
Expand-Archive -Path opencv${OPENCV_VERSION}_win_x64.zip -DestinationPath opencv_files/opencv4100_win_x64 -Force -ErrorAction Stop
Expand-Archive -Path opencv${OPENCV_VERSION}_win_x86.zip -DestinationPath opencv_files/opencv4100_win_x86 -Force -ErrorAction Stop
ls opencv_files
ls opencv_files/opencv${OPENCV_VERSION}_win_x64

- name: Cache Tesseract binaries
id: cache_tesseract
Expand All @@ -60,11 +59,28 @@ jobs:
path: ${{ github.workspace }}/tesseract_files
key: tesseract-41-rev1

- name: Download Tesseract binaries
- name: Download Tesseract binaries
if: steps.cache_tesseract.outputs.cache-hit != 'true'
shell: powershell
env:
GH_TOKEN: ${{ github.token }}
run: |
. ".\download_tesseract_windows.ps1"
gh release download --repo shimat/tesseract_vcpkg 2023.07.06 --pattern "*.zip" --output tesseract.zip
Expand-Archive -Path tesseract.zip -DestinationPath tesseract_files -Force -ErrorAction Stop
ls tesseract_files
New-Item tesseract_files/tesseract_vcpkg -ItemType Directory -Force
Move-Item tesseract_files/tesseract_vcpkg/installed/* tesseract_files/tesseract_vcpkg/
ls tesseract_files/tesseract_vcpkg

- name: NuGet restore
shell: cmd
run: |
nuget restore

- name: Install Server-Media-Foundation
shell: powershell
run: |
Install-WindowsFeature Server-Media-Foundation

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
Expand Down
Loading