Skip to content

ci:fix macos ci action #71

ci:fix macos ci action

ci:fix macos ci action #71

Workflow file for this run

name: windows
on:
push:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_zh_CN.md'
- 'DEVELOPNOTE.md'
- '.readthedocs.yaml'
pull_request:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_zh_CN.md'
- 'DEVELOPNOTE.md'
- '.readthedocs.yaml'
workflow_dispatch:
jobs:
windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/[email protected]
with:
arch: win64_mingw81
version: '6.2.0'
- name: Cache opencv
uses: actions/cache@v3
env:
cache-name: cache-opencv
with:
path: |
C:/opencv4.0.0
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install prerequisites
run: |
Choco-Install -PackageName innosetup --force
Choco-Install -PackageName cmake --force
$c="C:\opencv4.0.0"
if(-not (Test-Path $c))
{
git clone https://github.com/opencv/opencv.git --branch 4.0.0 --depth 1
cmake -G "MinGW Makefiles" -S opencv -B opencv/build -D CMAKE_INSTALL_PREFIX=C:/opencv4.0.0 -D ENABLE_PRECOMPILED_HEADERS=OFF -D WITH_MSMF=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D BUILD_WITH_DEBUG_INFO=OFF -D BUILD_DOCS=OFF -D CMAKE_BUILD_TYPE=RELEASE
cd ./opencv/build
mingw32-make
mingw32-make install
}
- name: Build all
run: |
git fetch --tags --force
git describe --always --long --dirty --abbrev=10 --tags | ./tools/awk/awk.exe '{print \"\\\"\"$0\"\\\"\"}' > git_tag.inc
./tools/sed/sed.exe -i "s/git_tag.inc/git_tag.ci.inc/g" YUVviewer.pro
./tools/sed/sed.exe -i "s/QT_DIR=C:\/Qt\/Qt6.2.0\/6.2.0\/mingw81_32\/bin/QT_DIR=%Qt5_Dir%/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/QT_TOOLS_DIR=C:\/Qt\/Qt6.2.0\/Tools\/mingw810_32\/bin/QT_TOOLS_DIR=C:\/ProgramData\/Chocolatey\/lib\/mingw\/tools\/install\/mingw64\/bin/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/OPENCV_DIR=D:\/Qt\/opencv4.2.0\/x64\/mingw\/bin/OPENCV_DIR=C:\/opencv4.0.0\/x64\/mingw\/bin/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/libopencv_imgproc420/libopencv_imgproc400/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/libopencv_imgcodecs420/libopencv_imgcodecs400/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/libopencv_core420/libopencv_core400/g" ./build_setup.bat
./tools/sed/sed.exe -i "s/OPENCV_DIR=D:\\Qt\\opencv4.2.0/OPENCV_DIR=C:\\opencv4.0.0/g" ./partform_win32.pri
./build_setup.bat
- name: Upload build asserts
uses: actions/[email protected]
with:
name: YUVviewer_windows
path: |
./InnoSetup/YUVviewer_setup.exe
- name: Run tests
run: |
./InnoSetup/build/YUVviewer.exe --version