-
-
Notifications
You must be signed in to change notification settings - Fork 214
240 lines (205 loc) · 7.91 KB
/
Build.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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
PC_Application_Ubuntu:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libusb-1.0-0-dev qt6-tools-dev qt6-base-dev
qtchooser -install qt6 $(which qmake6)
- name: Get build timestamp
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Get app version
id: id_version
run: |
cd Software/PC_Application/LibreVNA-GUI
fw_major=`grep -oP '(?<=FW_MAJOR=)[0-9]+' LibreVNA-GUI.pro`
fw_minor=`grep -oP '(?<=FW_MINOR=)[0-9]+' LibreVNA-GUI.pro`
fw_patch=`grep -oP '(?<=FW_PATCH=)[0-9]+' LibreVNA-GUI.pro`
echo "app_version=v$fw_major.$fw_minor.$fw_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build application
run: |
cd Software/PC_Application/LibreVNA-GUI
export QT_SELECT=qt6
qmake LibreVNA-GUI.pro
make -j9
shell: bash
- name: Upload artifact
env:
LIBREVNA_VERSION: "${{steps.id_version.outputs.app_version}}"
uses: actions/upload-artifact@v3
with:
name: LibreVNA-GUI-Ubuntu-${{env.LIBREVNA_VERSION}}
path: Software/PC_Application/LibreVNA-GUI/LibreVNA-GUI
PC_Application_RPi5:
runs-on: RPi-HIL
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libusb-1.0-0-dev qt6-tools-dev qt6-base-dev
- name: Get build timestamp
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Get app version
id: id_version
run: |
cd Software/PC_Application/LibreVNA-GUI
fw_major=`grep -oP '(?<=FW_MAJOR=)[0-9]+' LibreVNA-GUI.pro`
fw_minor=`grep -oP '(?<=FW_MINOR=)[0-9]+' LibreVNA-GUI.pro`
fw_patch=`grep -oP '(?<=FW_PATCH=)[0-9]+' LibreVNA-GUI.pro`
echo "app_version=v$fw_major.$fw_minor.$fw_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build application
run: |
cd Software/PC_Application/LibreVNA-GUI
qmake6 LibreVNA-GUI.pro
make -j9
shell: bash
- name: Upload artifact
env:
LIBREVNA_VERSION: "${{steps.id_version.outputs.app_version}}"
uses: actions/upload-artifact@v3
with:
name: LibreVNA-GUI-RPi5-${{env.LIBREVNA_VERSION}}
path: Software/PC_Application/LibreVNA-GUI/LibreVNA-GUI
PC_Application_Windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v1
- uses: msys2/setup-msys2@v2
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.2.0'
arch: 'win64_mingw81'
- name: Download libusb
run: |
curl -o libusb.7z -L https://github.com/libusb/libusb/releases/download/v1.0.25/libusb-1.0.25.7z
7z x libusb.7z -r -olibusb
Xcopy /E /I /Y libusb\include ..\Qt\6.2.0\mingw81_64\include
Xcopy /E /I /Y libusb\MinGW64\static\libusb-1.0.a Software\PC_Application\LibreVNA-GUI
shell: cmd
- name: Get build timestamp
shell: msys2 {0}
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Get app version
id: id_version
shell: msys2 {0}
run: |
cd Software/PC_Application/LibreVNA-GUI
fw_major=`grep -oP '(?<=FW_MAJOR=)[0-9]+' LibreVNA-GUI.pro`
fw_minor=`grep -oP '(?<=FW_MINOR=)[0-9]+' LibreVNA-GUI.pro`
fw_patch=`grep -oP '(?<=FW_PATCH=)[0-9]+' LibreVNA-GUI.pro`
echo "app_version=v$fw_major.$fw_minor.$fw_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build application
run: |
cd Software/PC_Application/LibreVNA-GUI
qmake LibreVNA-GUI.pro
make -j9
shell: cmd
- name: Deploy application
run: |
cd Software/PC_Application/LibreVNA-GUI/release
del *.o *.cpp
windeployqt.exe .
copy ..\..\..\..\..\Qt\6.2.0\mingw81_64\bin\libwinpthread-1.dll .
copy ..\..\..\..\..\Qt\6.2.0\mingw81_64\bin\libgcc_s_seh-1.dll .
copy "..\..\..\..\..\Qt\6.2.0\mingw81_64\bin\libstdc++-6.dll" .
copy ..\..\..\..\..\Qt\6.2.0\mingw81_64\bin\Qt6OpenGL.dll .
shell: cmd
- name: Upload
uses: actions/upload-artifact@v3
env:
LIBREVNA_VERSION: "${{steps.id_version.outputs.app_version}}"
with:
name: GUI_Windows-${{env.LIBREVNA_VERSION}}
path: Software/PC_Application/LibreVNA-GUI/release
PC_Application_OSX:
runs-on: macos-12
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
brew install qt@6 libusb pcre
- name: Set Environment
run: |
echo "/usr/local/opt/qt@6/bin" >> $GITHUB_PATH
- name: Get build timestamp
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Get app version
id: id_version
run: |
cd Software/PC_Application/LibreVNA-GUI
fw_major=`pcregrep -o '(?<=FW_MAJOR=)[0-9]+' LibreVNA-GUI.pro`
fw_minor=`pcregrep -o '(?<=FW_MINOR=)[0-9]+' LibreVNA-GUI.pro`
fw_patch=`pcregrep -o '(?<=FW_PATCH=)[0-9]+' LibreVNA-GUI.pro`
echo "app_version=v$fw_major.$fw_minor.$fw_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build application
run: |
cd Software/PC_Application/LibreVNA-GUI
qmake LibreVNA-GUI.pro
make -j9
macdeployqt LibreVNA-GUI.app
# Unfortunately, we have to do some hackery to fix the loading path errors
# and missing dylibs from macdeployqt.
./fixMacDylibs.sh
zip -ry LibreVNA-GUI.zip LibreVNA-GUI.app
shell: bash
- name: Upload artifact
env:
LIBREVNA_VERSION: "${{steps.id_version.outputs.app_version}}"
uses: actions/upload-artifact@v3
with:
name: LibreVNA-GUI-OSX-${{env.LIBREVNA_VERSION}}
path: Software/PC_Application/LibreVNA-GUI/LibreVNA-GUI.zip
Embedded_Firmware:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install toolchain
run: |
sudo apt-get install -y gcc-arm-none-eabi binutils-arm-none-eabi
- name: Get build timestamp
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Get app version
id: id_version
run: |
cd Software/VNA_embedded
fw_major=`grep -oP '(?<=FW_MAJOR=)[0-9]+' Makefile`
fw_minor=`grep -oP '(?<=FW_MINOR=)[0-9]+' Makefile`
fw_patch=`grep -oP '(?<=FW_PATCH=)[0-9]+' Makefile`
hw_revision=`grep "DHW_REVISION=" Makefile | sed "s/-DHW_REVISION=\"'//" | sed "sr'\" [\]rr"`
echo "app_version=hw-rev-$hw_revision-v$fw_major.$fw_minor.$fw_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build application
run: |
cd Software/VNA_embedded
make -j9
cp build/VNA_embedded.elf ../../
shell: bash
- name: Combine with FPGA bitstream
run: |
python3 AssembleFirmware.py
shell: bash
- name: Upload
uses: actions/upload-artifact@v3
env:
LIBREVNA_VERSION: "${{steps.id_version.outputs.app_version}}"
with:
name: EmbeddedFirmware-${{env.LIBREVNA_VERSION}}
path: |
VNA_embedded.elf
combined.vnafw