Merge pull request #229 from svlad-90/dev/vladyslav-goncharuk/ISSUE-227 #141
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 windows Qt5 | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Target branch' | |
required: true | |
default: 'master' | |
collect_artifacts: | |
description: 'Collect build artifacts' | |
required: false | |
default: 'false' | |
type: boolean | |
jobs: | |
build_windows: | |
runs-on: windows-latest | |
steps: | |
- uses: ilammy/msvc-dev-cmd@v1 | |
# Creation of the "..\downloads", "..\build", "..\tools" directories | |
- name: Creation of the "..\downloads", "..\build", "..\tools" directories | |
run: | | |
mkdir ..\build | |
mkdir ..\downloads | |
mkdir ..\tools | |
shell: cmd | |
# Installation of jom | |
- name: Installation of the jom | |
run: | | |
Invoke-WebRequest http://download.qt.io/official_releases/jom/jom.zip -OutFile ..\downloads\jom.zip | |
Expand-Archive '..\downloads\jom.zip' '..\tools\jom' | |
shell: powershell | |
# Add jom to path | |
- name: Add jom to path | |
run: | | |
echo "D:/a/${{ github.event.repository.name }}/tools/jom/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
shell: powershell | |
# Install Java 11 | |
- name: Install Java 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
# Install cmake version v3.24.x | |
- name: Setup cmake | |
uses: jwlawson/actions-setup-cmake@v1.14 | |
with: | |
cmake-version: 'v3.24.x' | |
# Checkout dlt-viewer's revision 2.27.0 | |
- name: Checkout of the dlt-viewer | |
uses: actions/checkout@v3 | |
with: | |
repository: GENIVI/dlt-viewer | |
ref: 2.27.0 | |
# Checkout project's revision, which is pushed | |
- name: Checkout of the project | |
uses: actions/checkout@v3 | |
with: | |
repository: svlad-90/${{ github.event.repository.name }} | |
path: .\plugin\${{ github.event.repository.name }} | |
ref: ${{ github.ref }} | |
# Adjust dlt-viewer's plugin CMakeLists.txt file to sub-include the plugin | |
- name: Patch dlt-viewer's plugin CMakeLists.txt | |
run: Add-Content .\CMakeLists.txt "`nadd_subdirectory(${{ github.event.repository.name }}/dltmessageanalyzerplugin/src)" | |
shell: powershell | |
working-directory: .\plugin | |
# Install Qt5 | |
- name: Install Qt5 | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 5.15.0 | |
target: desktop | |
host: windows | |
dir: ${{ github.workspace }}\Qt5 | |
cache: true | |
#CMake for dlt-viewer, including the DLT-Message_analyzer plugin | |
- name: CMake | |
run: | | |
cmake ..\${{ github.event.repository.name }}\ "-GCodeBlocks - NMake Makefiles JOM" "-DCMAKE_BUILD_TYPE:STRING=Release" "-DCMAKE_PREFIX_PATH:STRING=${{ github.workspace }}/Qt5/Qt/5.15.0/msvc2019_64" "-DQT_QMAKE_EXECUTABLE:STRING=${{ github.workspace }}/Qt5/Qt/5.15.0/msvc2019_64/bin/qmake.exe" | |
shell: cmd | |
working-directory: ..\build | |
#List files in build folder | |
- name: List files in build folder | |
run: | | |
dir ..\build | |
dir .\ | |
shell: cmd | |
working-directory: .\ | |
# Build of the project | |
- name: Jom | |
run: | | |
jom.exe -j8 | |
shell: cmd | |
working-directory: ..\build | |
# Collect required artifacts | |
- name: Collect required artifacts | |
if: ${{ github.event.inputs.collect_artifacts == 'true' }} | |
run: | | |
mkdir .\release_win_qt5_X86_64 | |
mkdir .\release_win_qt5_X86_64\plugins | |
mkdir .\release_win_qt5_X86_64\platforms | |
cp ..\build\bin\dlt-viewer.exe .\release_win_qt5_X86_64\dlt-viewer.exe | |
cp ..\build\version.txt .\release_win_qt5_X86_64\version.txt | |
cp ..\build\bin\plugins\DLT-Message-Analyzer.dll .\release_win_qt5_X86_64\plugins\DLT-Message-Analyzer.dll | |
cp ..\build\bin\plugins\dltdbusplugin.dll .\release_win_qt5_X86_64\plugins\dltdbusplugin.dll | |
cp ..\build\bin\plugins\dltlogstorageplugin.dll .\release_win_qt5_X86_64\plugins\dltlogstorageplugin.dll | |
cp ..\build\bin\plugins\dltsegmentationplugin.dll .\release_win_qt5_X86_64\plugins\dltsegmentationplugin.dll | |
cp ..\build\bin\plugins\dltsystemviewerplugin.dll .\release_win_qt5_X86_64\plugins\dltsystemviewerplugin.dll | |
cp ..\build\bin\plugins\dlttestrobotplugin.dll .\release_win_qt5_X86_64\plugins\dlttestrobotplugin.dll | |
cp ..\build\bin\plugins\dltviewerplugin.dll .\release_win_qt5_X86_64\plugins\dltviewerplugin.dll | |
cp ..\build\bin\plugins\filetransferplugin.dll .\release_win_qt5_X86_64\plugins\filetransferplugin.dll | |
cp ..\build\bin\plugins\nonverboseplugin.dll .\release_win_qt5_X86_64\plugins\nonverboseplugin.dll | |
cp ..\build\bin\plugins\plantuml.jar .\release_win_qt5_X86_64\plugins\plantuml.jar | |
cp ..\build\qdlt\qdlt.dll .\release_win_qt5_X86_64\qdlt.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\plugins\platforms\qdirect2d.dll .\release_win_qt5_X86_64\platforms\qdirect2d.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\plugins\platforms\qdirect2dd.dll .\release_win_qt5_X86_64\platforms\qdirect2dd.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\plugins\platforms\qminimal.dll .\release_win_qt5_X86_64\platforms\qminimal.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\plugins\platforms\qminimald.dll .\release_win_qt5_X86_64\platforms\qminimald.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\plugins\platforms\qoffscreen.dll .\release_win_qt5_X86_64\platforms\qoffscreen.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\plugins\platforms\qoffscreend.dll .\release_win_qt5_X86_64\platforms\qoffscreend.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\plugins\platforms\qwindows.dll .\release_win_qt5_X86_64\platforms\qwindows.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\plugins\platforms\qwindowsd.dll .\release_win_qt5_X86_64\platforms\qwindowsd.dll | |
cp .\build\output\amd64\Release\bin\qcustomplot.dll .\release_win_qt5_X86_64\qcustomplot.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\bin\Qt5Core.dll .\release_win_qt5_X86_64\Qt5Core.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\bin\Qt5Gui.dll .\release_win_qt5_X86_64\Qt5Gui.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\bin\Qt5Network.dll .\release_win_qt5_X86_64\Qt5Network.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\bin\Qt5PrintSupport.dll .\release_win_qt5_X86_64\Qt5PrintSupport.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\bin\Qt5SerialPort.dll .\release_win_qt5_X86_64\Qt5SerialPort.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\bin\Qt5Sql.dll .\release_win_qt5_X86_64\Qt5Sql.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\bin\Qt5Svg.dll .\release_win_qt5_X86_64\Qt5Svg.dll | |
cp .\Qt5\Qt\5.15.0\msvc2019_64\bin\Qt5Widgets.dll .\release_win_qt5_X86_64\Qt5Widgets.dll | |
shell: cmd | |
working-directory: .\ | |
- name: Upload artifacts | |
if: ${{ success() && github.event.inputs.collect_artifacts == 'true' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release_win_qt5_X86_64 | |
path: | | |
release_win_qt5_X86_64 |