-
Notifications
You must be signed in to change notification settings - Fork 15
164 lines (145 loc) · 6.89 KB
/
build_windows_qt6.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: Build windows Qt6
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
working-directory: .\
# 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: someVan/${{ 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 Qt6
- name: Install Qt6
uses: jurplel/install-qt-action@v3
with:
version: 6.5.0
target: desktop
host: windows
dir: ${{ github.workspace }}\Qt6
cache: true
modules: 'qtserialport'
#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 }}/Qt6/Qt/6.5.0/msvc2019_64" "-DQT_QMAKE_EXECUTABLE:STRING=${{ github.workspace }}/Qt6/Qt/6.5.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_qt6_X86_64
mkdir .\release_win_qt6_X86_64\plugins
mkdir .\release_win_qt6_X86_64\platforms
cp ..\build\bin\dlt-viewer.exe .\release_win_qt6_X86_64\dlt-viewer.exe
cp ..\build\version.txt .\release_win_qt6_X86_64\version.txt
cp ..\build\bin\plugins\DLT-Message-Analyzer.dll .\release_win_qt6_X86_64\plugins\DLT-Message-Analyzer.dll
cp ..\build\bin\plugins\dltdbusplugin.dll .\release_win_qt6_X86_64\plugins\dltdbusplugin.dll
cp ..\build\bin\plugins\dltlogstorageplugin.dll .\release_win_qt6_X86_64\plugins\dltlogstorageplugin.dll
cp ..\build\bin\plugins\dltsegmentationplugin.dll .\release_win_qt6_X86_64\plugins\dltsegmentationplugin.dll
cp ..\build\bin\plugins\dltsystemviewerplugin.dll .\release_win_qt6_X86_64\plugins\dltsystemviewerplugin.dll
cp ..\build\bin\plugins\dlttestrobotplugin.dll .\release_win_qt6_X86_64\plugins\dlttestrobotplugin.dll
cp ..\build\bin\plugins\dltviewerplugin.dll .\release_win_qt6_X86_64\plugins\dltviewerplugin.dll
cp ..\build\bin\plugins\filetransferplugin.dll .\release_win_qt6_X86_64\plugins\filetransferplugin.dll
cp ..\build\bin\plugins\nonverboseplugin.dll .\release_win_qt6_X86_64\plugins\nonverboseplugin.dll
cp ..\build\bin\plugins\plantuml.jar .\release_win_qt6_X86_64\plugins\plantuml.jar
cp ..\build\qdlt\qdlt.dll .\release_win_qt6_X86_64\qdlt.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\plugins\platforms\qdirect2d.dll .\release_win_qt6_X86_64\platforms\qdirect2d.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\plugins\platforms\qdirect2dd.dll .\release_win_qt6_X86_64\platforms\qdirect2dd.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\plugins\platforms\qminimal.dll .\release_win_qt6_X86_64\platforms\qminimal.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\plugins\platforms\qminimald.dll .\release_win_qt6_X86_64\platforms\qminimald.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\plugins\platforms\qoffscreen.dll .\release_win_qt6_X86_64\platforms\qoffscreen.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\plugins\platforms\qoffscreend.dll .\release_win_qt6_X86_64\platforms\qoffscreend.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\plugins\platforms\qwindows.dll .\release_win_qt6_X86_64\platforms\qwindows.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\plugins\platforms\qwindowsd.dll .\release_win_qt6_X86_64\platforms\qwindowsd.dll
cp .\build\output\amd64\Release\bin\qcustomplot.dll .\release_win_qt6_X86_64\qcustomplot.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\bin\Qt6Core.dll .\release_win_qt6_X86_64\Qt6Core.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\bin\Qt6Gui.dll .\release_win_qt6_X86_64\Qt6Gui.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\bin\Qt6Network.dll .\release_win_qt6_X86_64\Qt6Network.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\bin\Qt6PrintSupport.dll .\release_win_qt6_X86_64\Qt6PrintSupport.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\bin\Qt6SerialPort.dll .\release_win_qt6_X86_64\Qt6SerialPort.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\bin\Qt6Sql.dll .\release_win_qt6_X86_64\Qt6Sql.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\bin\Qt6Svg.dll .\release_win_qt6_X86_64\Qt6Svg.dll
cp .\Qt6\Qt\6.5.0\msvc2019_64\bin\Qt6Widgets.dll .\release_win_qt6_X86_64\Qt6Widgets.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_qt6_X86_64
path: |
release_win_qt6_X86_64