Workflow: Remove mingw due to not support webengine.
This commit is contained in:
parent
f3e045e554
commit
7b1f2db94c
|
@ -1,93 +0,0 @@
|
||||||
name: Windows MinGW (Shared Library)
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'app_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '.github/workflows/windows-mingw-shared.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'app_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '.github/workflows/windows-mingw-shared.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- qt_arch: win64_mingw
|
|
||||||
qt_ver: 6.5.3
|
|
||||||
qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900"
|
|
||||||
qt_tools_mingw_install: mingw900_64
|
|
||||||
env:
|
|
||||||
targetName: ProtocolParser.exe
|
|
||||||
fileName: ProtocolParser
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@master
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats qtserialport qtwebview qtwebengine'
|
|
||||||
|
|
||||||
- name: Qt6 environment configuration
|
|
||||||
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
|
|
||||||
- name: where is cmake & where is mingw32-make
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Get-Command -Name 'cmake' | Format-List
|
|
||||||
Get-Command -Name 'mingw32-make' | Format-List
|
|
||||||
|
|
||||||
- name: mingw-build
|
|
||||||
id: build
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\ProtocolParser\Qt\6.5.3\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
id: package
|
|
||||||
env:
|
|
||||||
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}-${{ matrix.qt_ver }}-shared
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
|
|
||||||
$name = ${env:archiveName}
|
|
||||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: ${{ steps.package.outputs.packageName }}
|
|
||||||
path: ${{ steps.package.outputs.packageName }}
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ steps.package.outputs.packageName }}.zip
|
|
||||||
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}_shared.zip
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,93 +0,0 @@
|
||||||
name: Windows MinGW (Static Library)
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'app_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '.github/workflows/windows-mingw-static.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '*.txt'
|
|
||||||
- 'app_source/**'
|
|
||||||
- 'scripts/**'
|
|
||||||
- '.github/workflows/windows-mingw-static.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- qt_arch: win64_mingw
|
|
||||||
qt_ver: 6.5.3
|
|
||||||
qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900"
|
|
||||||
qt_tools_mingw_install: mingw900_64
|
|
||||||
env:
|
|
||||||
targetName: ProtocolParser.exe
|
|
||||||
fileName: ProtocolParser
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup ninja
|
|
||||||
uses: seanmiddleditch/gha-setup-ninja@master
|
|
||||||
with:
|
|
||||||
version: 1.10.2
|
|
||||||
|
|
||||||
- name: Install Qt
|
|
||||||
uses: jurplel/install-qt-action@v3
|
|
||||||
with:
|
|
||||||
version: ${{ matrix.qt_ver }}
|
|
||||||
arch: ${{ matrix.qt_arch }}
|
|
||||||
modules: 'qt5compat qtmultimedia qtshadertools qtimageformats qtserialport qtwebview qtwebengine'
|
|
||||||
|
|
||||||
- name: Qt6 environment configuration
|
|
||||||
if: ${{ startsWith( matrix.qt_ver, 6 ) }}
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
Write-Output "${{ env.Qt6_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
||||||
|
|
||||||
- name: where is cmake & where is mingw32-make
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
Get-Command -Name 'cmake' | Format-List
|
|
||||||
Get-Command -Name 'mingw32-make' | Format-List
|
|
||||||
|
|
||||||
- name: mingw-build
|
|
||||||
id: build
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\ProtocolParser\Qt\6.5.3\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DRIBBONUI_BUILD_STATIC_LIB=ON -GNinja ..
|
|
||||||
cmake --build . --target all --config Release --parallel
|
|
||||||
|
|
||||||
- name: package
|
|
||||||
id: package
|
|
||||||
env:
|
|
||||||
archiveName: ${{ env.fileName }}-${{ matrix.qt_arch }}-${{ matrix.qt_ver }}-static
|
|
||||||
shell: pwsh
|
|
||||||
run: |
|
|
||||||
& scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName}
|
|
||||||
$name = ${env:archiveName}
|
|
||||||
echo "packageName=$name" >> $env:GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: ${{ steps.package.outputs.packageName }}
|
|
||||||
path: ${{ steps.package.outputs.packageName }}
|
|
||||||
|
|
||||||
- name: uploadRelease
|
|
||||||
if: startsWith(github.event.ref, 'refs/tags/')
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: ${{ steps.package.outputs.packageName }}.zip
|
|
||||||
asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}_static.zip
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
overwrite: true
|
|
|
@ -1,34 +0,0 @@
|
||||||
[CmdletBinding()]
|
|
||||||
param (
|
|
||||||
[string] $archiveName, [string] $targetName
|
|
||||||
)
|
|
||||||
# 外部环境变量包括:
|
|
||||||
# archiveName: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }}
|
|
||||||
|
|
||||||
|
|
||||||
# archiveName: 5.15.2-win64_mingw81
|
|
||||||
|
|
||||||
$scriptDir = $PSScriptRoot
|
|
||||||
$currentDir = Get-Location
|
|
||||||
Write-Host "currentDir" $currentDir
|
|
||||||
Write-Host "scriptDir" $scriptDir
|
|
||||||
|
|
||||||
function Main() {
|
|
||||||
|
|
||||||
New-Item -ItemType Directory $archiveName
|
|
||||||
# 拷贝exe
|
|
||||||
Copy-Item D:\a\ProtocolParser\ProtocolParser\build\app\release\* $archiveName\ -Force -Recurse | Out-Null
|
|
||||||
# 拷贝依赖
|
|
||||||
windeployqt --qmldir . --plugindir $archiveName\plugins --compiler-runtime $archiveName\$targetName
|
|
||||||
# 删除不必要的文件
|
|
||||||
$excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb")
|
|
||||||
Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force
|
|
||||||
# 打包zip
|
|
||||||
Compress-Archive -Path $archiveName $archiveName'.zip'
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($null -eq $archiveName || $null -eq $targetName) {
|
|
||||||
Write-Host "args missing, archiveName is" $archiveName ", targetName is" $targetName
|
|
||||||
return
|
|
||||||
}
|
|
||||||
Main
|
|
Loading…
Reference in New Issue