Skip to content

release: update V0.5.8 #139

release: update V0.5.8

release: update V0.5.8 #139

Workflow file for this run

name: windows
on:
push:
branches: [ main,test ]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'README_zh_CN.md'
- 'DEVELOPNOTE.md'
- '.readthedocs.yaml'
tags:
- V**
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@v4
- name: Install Qt
uses: jurplel/[email protected]
with:
arch: win64_mingw
version: '6.5.3'
aqtversion: ==3.1.7
- name: Cache opencv
uses: actions/cache@v4
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 cmake
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install cmake --no-progress
- name: Install innosetup
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install innosetup --no-progress
- name: build opencv
run: |
$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
./tools/sed/sed.exe -i 's/--long --dirty/--long/g' ./tools/generate_info.ps1
./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:\/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
./tools/sed/sed.exe -i "s/build_info.inc/build_info.inc.bak/g" ./YUVviewer.pro
c:/Windows/system32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -File "./tools/generate_info.ps1" > ./build_info.inc.bak
c:/Windows/system32/WindowsPowerShell/v1.0/powershell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -File "./tools/generate_info.ps1" > ./build_info.inc
cat ./build_info.inc
./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