corrected qt version #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Qt Project | |
on: | |
push: | |
branches: | |
- cpp | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup MSVC | |
uses: microsoft/setup-msbuild@v1 | |
with: | |
vs-version: 'latest' | |
- name: Set up Visual Studio shell | |
uses: egor-tensin/vs-shell@v2 | |
with: | |
arch: x64 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: '6.7.2' | |
add-tools-to-path: true | |
tools: 'tools_qtcreator,qt.tools.qtcreator' | |
- name: Build with qmake and jom | |
shell: pwsh | |
run: | | |
mkdir build | |
cd build | |
qmake ..\BigPictureTV-CPP.pro | |
D:\a\BigPictureTV\Qt\Tools\QtCreator\bin\jom\jom.exe | |
- name: Search for windeployqt executables | |
shell: pwsh | |
run: | | |
# Define the Qt root directory from the environment variable | |
$qtRootDir = $env:QT_ROOT_DIR | |
# Search for windeployqt6.exe and windeployqt.exe within the Qt directory | |
$searchResults = Get-ChildItem -Path $qtRootDir -Recurse -Filter "windeployqt*.exe" -ErrorAction SilentlyContinue | |
# Check if the files were found and print their paths | |
if ($searchResults) { | |
foreach ($file in $searchResults) { | |
Write-Output "Found $($file.Name) at: $($file.FullName)" | |
} | |
} else { | |
Write-Output "No windeployqt executable found in $qtRootDir" | |
} | |
- name: Search for BigPictureTV-CPP.exe | |
shell: pwsh | |
run: | | |
# Search for the BigPictureTV-CPP.exe in the build directory | |
$executablePath = Get-ChildItem -Path "build" -Recurse -Filter "BigPictureTV-CPP.exe" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName | |
# Check if the executable was found and set an environment variable | |
if ($executablePath) { | |
Write-Output "Executable found at: $executablePath" | |
echo "EXECUTABLE_PATH=$executablePath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
} else { | |
Write-Error "BigPictureTV-CPP.exe not found in the build directory!" | |
exit 1 | |
} | |
- name: Run windeployqt | |
shell: pwsh | |
run: | | |
# Navigate to the directory containing the executable | |
cd build | |
# Use the found path to windeployqt | |
$windeployqtPath = "D:\a\BigPictureTV\Qt\6.7.2\msvc2019_64\bin\windeployqt6.exe" | |
# Check if the executable exists | |
if (Test-Path $windeployqtPath) { | |
# Run windeployqt to deploy the executable with the specified options | |
& $windeployqtPath ` | |
--no-translations ` | |
--no-opengl-sw ` | |
--no-system-d3d-compiler ` | |
--no-compiler-runtime ` | |
D:\a\BigPictureTV\BigPictureTV\build\release\BigPictureTV-CPP.exe | |
} else { | |
Write-Error "windeployqt not found at the expected path!" | |
exit 1 | |
} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: qt-build-artifacts | |
path: build/ |