chore(CI): msvc build also build with exiv2
This commit is contained in:
parent
0436dfab39
commit
edb1a84601
45
.github/workflows/windows.yml
vendored
45
.github/workflows/windows.yml
vendored
|
@ -9,16 +9,18 @@ jobs:
|
|||
matrix:
|
||||
vs: ['2022']
|
||||
msvc_arch: ['x64']
|
||||
qt_ver: ['6.7.2']
|
||||
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
arch: 'win64_msvc2019_64'
|
||||
version: '6.7.2'
|
||||
version: ${{ matrix.qt_ver }}
|
||||
modules: 'qtimageformats'
|
||||
- name: Build
|
||||
shell: cmd
|
||||
run: |
|
||||
|
@ -29,10 +31,10 @@ jobs:
|
|||
qmake pineapple-pictures.pro
|
||||
nmake
|
||||
nmake clean
|
||||
windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --skip-plugin-types tls,networkinformation release\ppic.exe
|
||||
windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types tls,networkinformation release\ppic.exe
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-msvc2022-qt6.7.2-qmake-package
|
||||
name: "windows-msvc${{ matrix.vs }}-qt${{ matrix.qt_ver }}-qmake-package"
|
||||
path: release/*
|
||||
|
||||
msvc-cmake-build:
|
||||
|
@ -41,29 +43,54 @@ jobs:
|
|||
matrix:
|
||||
vs: ['2022']
|
||||
msvc_arch: ['x64']
|
||||
qt_ver: ['6.7.2']
|
||||
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
arch: 'win64_msvc2019_64'
|
||||
version: '6.5.3'
|
||||
version: ${{ matrix.qt_ver }}
|
||||
modules: 'qtimageformats'
|
||||
- name: Build
|
||||
shell: cmd
|
||||
run: |
|
||||
:: ------ env ------
|
||||
set PWD=%cd%
|
||||
set VS=${{ matrix.vs }}
|
||||
set VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
call %VCVARS% ${{ matrix.msvc_arch }}
|
||||
cmake -Bbuild . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%PWD%\build\"
|
||||
:: ------ dep ------
|
||||
set CMAKE_PREFIX_PATH=%PWD%/dependencies_bin
|
||||
mkdir dependencies_src
|
||||
curl -fsSL -o exiv2_bin.zip https://github.com/Exiv2/exiv2/releases/download/v0.28.3/exiv2-0.28.3-2019msvc64.zip
|
||||
7z x exiv2_bin.zip -y
|
||||
ren .\exiv2-0.28.3-2019msvc64 dependencies_bin
|
||||
curl -fsSL -o zlib_src.zip https://zlib.net/zlib131.zip
|
||||
7z x zlib_src.zip -y -o"dependencies_src"
|
||||
ren .\dependencies_src\zlib-1.3.1 zlib || goto :error
|
||||
cmake ./dependencies_src/zlib -Bbuild_dependencies/zlib -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
|
||||
cmake --build build_dependencies/zlib --config Release --target=install || goto :error
|
||||
curl -fsSL -o expat_src.zip https://github.com/libexpat/libexpat/archive/R_2_6_2.zip
|
||||
7z x expat_src.zip -y -o"dependencies_src"
|
||||
ren .\dependencies_src\libexpat-R_2_6_2 expat || goto :error
|
||||
cmake ./dependencies_src/expat/expat -Bbuild_dependencies/expat -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
|
||||
cmake --build build_dependencies/expat --config Release --target=install || goto :error
|
||||
:: ------ app ------
|
||||
cmake -Bbuild . -DCMAKE_INSTALL_PREFIX="%PWD%\build\"
|
||||
cmake --build build --config Release
|
||||
cmake --build build --config Release --target=install
|
||||
windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --skip-plugin-types tls,networkinformation build\bin\ppic.exe
|
||||
:: ------ pkg ------
|
||||
windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types tls,networkinformation build\bin\ppic.exe
|
||||
robocopy ./dependencies_bin/bin build/bin *.dll
|
||||
if ErrorLevel 8 (exit /B 1)
|
||||
copy LICENSE build/bin/
|
||||
exit /B 0
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-msvc2022-qt6.5.3-cmake-package
|
||||
name: "windows-msvc${{ matrix.vs }}-qt${{ matrix.qt_ver }}-cmake-package"
|
||||
path: build/bin/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user