Bump to 24.5 #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows build | |
on: push | |
jobs: | |
build-windows-bindings: | |
name: Build Windows bindings | |
runs-on: windows-2019-16-core | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Step 2: Install Visual Studio Build Tools (only needed on windows-latest or runners without VS2019) | |
# - name: Install Visual Studio Build Tools | |
# run: | | |
# choco install visualstudio2019buildtools -y | |
# choco install visualstudio2019-workload-vctools -y | |
# shell: cmd | |
# Step 3: Install Python 3.13 | |
- name: Install Python 3.13 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: Add Python to PATH | |
run: | | |
setx PATH "%PATH%;C:\hostedtoolcache\windows\Python\3.13.0\x64" | |
shell: cmd | |
# Step 4: Add Python to PATH | |
- name: Install numpy | |
run: | | |
C:/hostedtoolcache/windows/Python/3.13.0/x64/python.exe -m pip install numpy | |
shell: cmd | |
# Step 5: Install MSYS2 | |
- name: Install MSYS2 | |
run: | | |
choco install msys2 -y | |
setx PATH "%PATH%;C:\tools\msys64\usr\bin" | |
shell: cmd | |
- name: Initialize MSYS2 | |
run: | | |
C:/tools/msys64/msys2_shell.cmd -defterm -no-start -c "pacman -Syuu --noconfirm" | |
C:/tools/msys64/msys2_shell.cmd -defterm -no-start -c "pacman -Sy --noconfirm" | |
shell: cmd | |
# Step 6: Install Bazelisk | |
- name: Install Bazelisk | |
run: | | |
choco install bazelisk -y | |
shell: cmd | |
# Step 7: Set up Bazel environment variables | |
- name: Set up Bazel environment variables | |
env: | |
BAZEL_VC: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC | |
BAZEL_VS: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools | |
BAZEL_VC_FULL_VERSION: 14.29.30133 | |
BAZEL_SH: C:\msys64\usr\bin\bash.exe | |
run: echo "Bazel environment variables set." | |
# Step 8: Download and Install OpenCV | |
- name: Download OpenCV | |
run: | | |
curl -L -o opencv.exe https://github.com/opencv/opencv/releases/download/4.9.0/opencv-4.9.0-windows.exe | |
start /wait opencv.exe -suppresslaunch -y -gm2 -o"C:\" | |
shell: cmd | |
# Step 9: Install vcpkg and ffmpeg | |
- name: Install vcpkg and ffmpeg | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg | |
C:\vcpkg\bootstrap-vcpkg.bat | |
C:\vcpkg\vcpkg install ffmpeg | |
shell: cmd | |
# Step 10: Download and Install OpenVINO Runtime | |
- name: Download and Install OpenVINO Runtime 24.5.0 | |
shell: powershell | |
run: | | |
Invoke-WebRequest -Uri https://storage.openvinotoolkit.org/repositories/openvino_genai/packages/nightly/2025.0.0.0.dev20241105/openvino_genai_windows_2025.0.0.0.dev20241105_x86_64.zip -OutFile openvino_runtime.zip | |
Expand-Archive -Path openvino_runtime.zip -DestinationPath C:/Intel/ | |
Rename-Item -Path "C:/Intel/openvino_genai_windows_2025.0.0.0.dev20241105_x86_64" -NewName "openvino_2024.5.0" | |
dir C:/Intel/openvino_2024.5.0/ | |
# Step 11: Install Mediapipe Requirements | |
- name: Install Mediapipe Requirements | |
run: | | |
C:/tools/msys64/msys2_shell.cmd -defterm -no-start -c "pacman -Sy --noconfirm git patch unzip" | |
shell: bash | |
# Step 12: Build with Bazel | |
- name: Build Windows Bindings with Bazel | |
env: | |
PYTHON_BIN_PATH: "C:/hostedtoolcache/windows/Python/3.13.0/x64/python.exe" | |
run: | | |
cd openvino_bindings | |
bazel build -c opt :windows_bindings --action_env PYTHON_BIN_PATH="C:/hostedtoolcache/windows/Python/3.13.0/x64/python.exe" | |
shell: bash | |
# Step 13: Verify the DLLs | |
- name: Verify DLLs in Bazel Output | |
run: | | |
dir openvino_bindings/bazel-out/x64_windows-opt/bin/windows_bindings.tar | |
# Step 14: Upload release artifact | |
- name: Upload Release Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows_bindings.tar | |
path: openvino_bindings/bazel-out/x64_windows-opt/bin/windows_bindings.tar | |
build-windows-ui: | |
name: Build Windows UI | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: '3.24.0' | |
- name: Install project dependencies | |
run: flutter pub get | |
- name: Generate intermediates | |
run: flutter pub run build_runner build --delete-conflicting-outputs | |
- name: Enable windows build | |
run: flutter config --enable-windows-desktop | |
- name: Copy bindings # Todo | |
run: | | |
mkdir bindings | |
New-Item -ItemType File -Path "bindings\\fake.dll" -Force | |
- name: Build artifacts | |
run: flutter build windows --release | |
- name: Archive Release artifact | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'zip' | |
filename: "OpenVINO-TestDrive-no-bindings-windows.zip" | |
path: build/windows/x64/runner/Release | |
- name: Upload Release Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "OpenVINO-TestDrive-no-bindings-windows.zip" | |
path: build\\windows\\x64\\runner\\Release | |
package: | |
name: Package combined Windows release | |
runs-on: ubuntu-22.04 | |
needs: [ build-windows-bindings, build-windows-ui ] # Waits for both jobs to succeed | |
steps: | |
# Step 1: Check out the repository | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Step 2: Set filename for release | |
- name: Set safe filename | |
id: set_filename | |
run: | | |
SAFE_REF_NAME=${GITHUB_REF_NAME//\//_} | |
echo "SANITIZED_FILENAME=OpenVINO-TestDrive-${SAFE_REF_NAME}-windows.zip" >> $GITHUB_ENV | |
# Step 3: Download artifact from build-windows-ui | |
- name: Download bindings build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: "windows_bindings.tar" # Matches the artifact name from build-windows-ui | |
path: ./bindings # Directory to store the downloaded artifact | |
# Step 4: Download artifact from build-windows-ui | |
- name: Download flutter build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: "OpenVINO-TestDrive-no-bindings-windows.zip" # Matches the artifact name from build-windows-ui | |
path: ./flutter # Directory to store the downloaded artifact | |
# Step 5: Combine artifacts | |
- name: Combine artifacts | |
run: | | |
ls -la ./ | |
ls -la ./bindings | |
ls -la ./flutter | |
rm -rf ./flutter/fake.dll | |
tar -xvf ./bindings/windows_bindings.tar -C ./bindings | |
rm ./bindings/windows_bindings.tar | |
ls -la ./bindings | |
mv ./bindings/* ./flutter/ | |
# Step 5: Archive combined folder | |
- name: Archive Release artifact | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'zip' | |
filename: ${{ env.SANITIZED_FILENAME }} | |
path: ./flutter/ | |
# Step 5: Upload new artifact | |
- name: Upload Release Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.SANITIZED_FILENAME }} | |
path: ./flutter/ | |
# Step 6: Update release | |
- name: Windows Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: ${{ env.SANITIZED_FILENAME }} |