From 5309f12d301e211868faf3603608478dc143d67c Mon Sep 17 00:00:00 2001 From: Junrou Nishida Date: Wed, 18 Oct 2023 01:08:46 +0900 Subject: [PATCH] ci: build for Windows --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cf54b618..172b702ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,3 +41,41 @@ jobs: with: name: mediapipe_android.aar path: Assets/MediaPipe/SDK/Plugins/Android/mediapipe_android.aar + + windows-build: + runs-on: windows-2019 + steps: + - uses: actions/checkout@v4 + + # Setup build tools + - uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: git patch unzip zip + + # Setup Python + - uses: actions/setup-python@v4 + id: setup-python + with: + python-version: '3.10' + + - name: Install NumPy + run: pip install --no-cache-dir --user numpy + + - name: Install OpenCV + run: | + curl -L --retry 4 --connect-timeout 10 https://github.com/opencv/opencv/releases/download/3.4.10/opencv-3.4.10-vc14_vc15.exe -o opencv-installer.exe + start /wait opencv-installer.exe -gm2 -y -oC:\ + del opencv-installer.exe + shell: cmd + + - name: Build + run: | + set ANDROID_NDK_HOME= + + make cpu + make install + env: + PYTHON_BIN_PATH: ${{ steps.setup-python.outputs.python-path }} + shell: cmd