-
Notifications
You must be signed in to change notification settings - Fork 0
697 lines (662 loc) · 27 KB
/
CI.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
# This file is part of Aeronautical Wireshark Plugin.
#
# Copyright (C) 2023 Airbus CyberSecurity SAS
#
# Aeronautical Wireshark Plugin is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# Aeronautical Wireshark Plugin is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Aeronautical Wireshark Plugin. If not, see <https://www.gnu.org/licenses/>.
name: CI
on:
push:
env:
# Variables to update in case of new versions
LUABITOP_VERSION: "1.0.2"
WIRESHARK_VERSION: "4.2.4"
LUA_VERSION: "5.2.4"
WIRESHARK_CENTOS_BUILD_OPTS: "-DBUILD_logray=OFF -DBUILD_tfshark=OFF -DBUILD_rawshark=OFF -DBUILD_dumpcap=OFF -DBUILD_text2pcap=OFF -DBUILD_mergecap=OFF -DBUILD_reordercap=OFF -DBUILD_editcap=OFF -DBUILD_capinfos=OFF -DBUILD_captype=OFF -DBUILD_randpkt=OFF -DBUILD_dftest=OFF -DBUILD_corbaidl2wrs=OFF -DBUILD_dcerpcidl2wrs=OFF -DBUILD_xxx2deb=OFF -DBUILD_androiddump=OFF -DBUILD_sshdump=OFF -DBUILD_ciscodump=OFF -DBUILD_dpauxmon=OFF -DBUILD_randpktdump=OFF -DBUILD_wifidump=OFF -DBUILD_etwdump=OFF -DBUILD_sdjournal=OFF -DBUILD_udpdump=OFF -DBUILD_falcodump=OFF -DBUILD_sharkd=OFF -DBUILD_mmdbresolve=OFF -DBUILD_fuzzshark=OFF -DENABLE_PCAP=OFF -DENABLE_AIRPCAP=OFF -DENABLE_ZLIB=OFF -DENABLE_MINIZIP=OFF -DENABLE_LZ4=OFF -DENABLE_BROTLI=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_NGHTTP2=OFF -DENABLE_NGHTTP3=OFF -DENABLE_LUA=ON -DENABLE_SMI=OFF -DENABLE_GNUTLS=OFF -DENABLE_KERBEROS=OFF -DENABLE_SBC=OFF -DENABLE_SPANDSP=OFF -DENABLE_BCG729=OFF -DENABLE_AMRNB=OFF -DENABLE_ILBC=OFF -DENABLE_LIBXML2=OFF -DENABLE_OPUS=OFF -DENABLE_SINSP=OFF"
jobs:
# LuaBitOp DLL Compilation
luabitop_windows_build:
runs-on: windows-latest
steps:
# Get all sources
- name: Get LuaBitOp
run: Invoke-WebRequest -Uri http://bitop.luajit.org/download/LuaBitOp-${env:LUABITOP_VERSION}.zip -OutFile dll.zip
- name: Get Wireshark
run: Invoke-WebRequest -Uri https://2.na.dl.wireshark.org/win64/Wireshark-${env:WIRESHARK_VERSION}-x64.exe -OutFile wireshark.exe
- name: Get Lua
run: Invoke-WebRequest -Uri https://www.lua.org/ftp/lua-${env:LUA_VERSION}.tar.gz -OutFile lua.tar.gz
# Store Wireshark as artifact for future usage
- name: Archive wireshark.exe as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark
path: wireshark.exe
if-no-files-found: error
# Extract / rename folders and delete downloads
- name: Unzip DLL source code
run: tar -xf dll.zip
- name: Normalize DLL source code folder
run: mv LuaBitOp* dll
- name: Delete DLL source code archive
run: rm dll.zip
- name: Unzip Lua source code
run: tar -xf lua.tar.gz
- name: Normalize Lua source code folder
run: mv lua-* lua
- name: Delete Lua source code archive
run: rm lua.tar.gz
- name: Extract lua52.dll from wireshark.exe
run: 7z e wireshark.exe lua52.dll
- name: Rename Lua DLL with the right name for the build
run: mv lua52.dll lua51.dll
- name: Delete Wireshark executable
run: rm wireshark.exe
# Copy everything in build directory (dll) and compile
- name: Copy Lua Source code to build directory
run: cp lua\src\* dll
- name: Compile
run: cd dll && mingw32-make -f Makefile.mingw
- name: Move DLL to working directory
run: mv dll/bit.dll bit.dll
# Store LuaBitOp DLL as artifact for future usage
- name: Archive DLL as artifact
uses: actions/upload-artifact@v4
with:
name: LuaBitOp-DLL
path: bit.dll
if-no-files-found: error
package_ubuntu_plugin:
runs-on: ubuntu-latest
steps:
- name: Get Plugin
uses: actions/checkout@v4
with:
sparse-checkout: .
- name: Create directory structure
run: mkdir -p lib/x86_64-linux-gnu/wireshark/plugins share/wireshark
- name: Move plugin files
run: mv cyber_*.lua LICENSE README.md COPYING lib/x86_64-linux-gnu/wireshark/plugins
- name: Move user_dlts file
run: mv user_dlts share/wireshark
- name: Package plugin
run: zip -r Wireshark_plugin.zip share lib
# Store Wireshark plugin as artifact for future usage
- name: Archive plugin as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-plugin-ubuntu
path: Wireshark_plugin.zip
if-no-files-found: error
package_alpine_plugin:
runs-on: ubuntu-latest
steps:
- name: Get Plugin
uses: actions/checkout@v4
with:
sparse-checkout: .
- name: Create directory structure
run: mkdir -p lib/wireshark/plugins share/wireshark
- name: Move plugin files
run: mv cyber_*.lua LICENSE README.md COPYING lib/wireshark/plugins
- name: Move user_dlts file
run: mv user_dlts share/wireshark
- name: Package plugin
run: zip -r Wireshark_plugin.zip share lib
# Store Wireshark plugin as artifact for future usage
- name: Archive plugin as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-plugin-alpine
path: Wireshark_plugin.zip
if-no-files-found: error
package_centos_plugin:
runs-on: ubuntu-latest
steps:
- name: Get Plugin
uses: actions/checkout@v4
with:
sparse-checkout: .
- name: Create directory structure
run: mkdir -p lib64/wireshark/plugins share/wireshark
- name: Move plugin files
run: mv cyber_*.lua LICENSE README.md COPYING lib64/wireshark/plugins
- name: Move user_dlts file
run: mv user_dlts share/wireshark
- name: Package plugin
run: zip -r Wireshark_plugin.zip share lib64
# Store Wireshark plugin as artifact for future usage
- name: Archive plugin as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-plugin-centos
path: Wireshark_plugin.zip
if-no-files-found: error
package_windows_plugin:
runs-on: windows-latest
needs: luabitop_windows_build
steps:
- name: Get Plugin
uses: actions/checkout@v4
with:
sparse-checkout: .
- name: Download LuaBitOp DLL
uses: actions/download-artifact@v4
with:
name: LuaBitOp-DLL
- name: Create directory structure
run: mkdir -p Wireshark/plugins
- name: Move plugin files
run: mv cyber_*.lua,LICENSE,README.md,COPYING Wireshark/plugins
- name: Move LuaBitOp DLL and user_dlts
run: mv bit.dll,user_dlts Wireshark
- name: Package plugin
run: Compress-Archive -Path Wireshark -DestinationPath Wireshark_plugin.zip
# Store Wireshark plugin as artifact for future usage
- name: Archive plugin as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-plugin-windows
path: Wireshark_plugin.zip
if-no-files-found: error
test_a429_ubuntu:
runs-on: ubuntu-latest
needs: package_ubuntu_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-ubuntu
- name: Install luabitop
run: sudo apt-get install lua-bitop
- name: Install TShark
run: sudo apt-get install tshark
- name: Test TShark availability
run: tshark --version
- name: Extract Wireshark plugin
run: sudo unzip Wireshark_plugin.zip -d /usr
- name: Run TShark on ARINC429 traffic
run: tshark -e A429.LABEL -e A429.WORD -e A429.SDI -e A429.SSM -e A429.DATA -e A429.PARITY -E header=y -T fields -r pcapng_files/arinc429_broadcast.pcapng | tee a429_broadcast.output
- name: Run diff
run: diff a429_broadcast.output test/a429_broadcast.output
test_discrete_ubuntu:
runs-on: ubuntu-latest
needs: package_ubuntu_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-ubuntu
- name: Install TShark
run: sudo apt-get install tshark
- name: Test TShark availability
run: tshark --version
- name: Extract Wireshark plugin
run: sudo unzip Wireshark_plugin.zip -d /usr
- name: Run TShark on discrete traffic
run: tshark -e DISCRETE.VALUE -E header=y -T fields -r pcapng_files/discrete.pcapng | tee discrete.output
- name: Run diff
run: diff discrete.output test/discrete.output
test_a429_alpine:
runs-on: ubuntu-latest
needs: package_alpine_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-alpine
- name: Run TShark on ARINC429 traffic
run: >
docker run -v .:/test alpine sh -c "
apk add tshark lua5.2-bitop &&
unzip /test/Wireshark_plugin.zip -d /usr &&
tshark -e A429.LABEL -e A429.WORD -e A429.SDI -e A429.SSM -e A429.DATA -e A429.PARITY -E header=y -T fields -r /test/pcapng_files/arinc429_broadcast.pcapng | tee /test/a429_broadcast.output
"
- name: Run diff
run: diff a429_broadcast.output test/a429_broadcast.output
test_discrete_alpine:
runs-on: ubuntu-latest
needs: package_alpine_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-alpine
- name: Run TShark on ARINC429 traffic
run: >
docker run -v .:/test alpine sh -c "
apk add tshark &&
unzip /test/Wireshark_plugin.zip -d /usr &&
tshark -e DISCRETE.VALUE -E header=y -T fields -r /test/pcapng_files/discrete.pcapng | tee /test/discrete.output
"
- name: Run diff
run: diff discrete.output test/discrete.output
test_a429_centos_amazonlinux:
runs-on: ubuntu-latest
needs: package_centos_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Compile and run TShark on ARINC429 traffic
run: >
docker run -v .:/test amazonlinux sh -c "
yum install -y xz cmake g++ glib2-devel libgcrypt-devel c-ares-devel flex patch readline-devel unzip tar gzip &&
curl https://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz -o lua.tar.gz &&
tar -xvf lua.tar.gz &&
cd lua-* &&
make "MYCFLAGS=-fPIC" linux install &&
cd .. &&
curl https://www.wireshark.org/download/src/wireshark-${WIRESHARK_VERSION}.tar.xz -o wireshark.tar.xz &&
tar -xvf wireshark.tar.xz &&
cd wireshark-* &&
cmake ${WIRESHARK_CENTOS_BUILD_OPTS} -DENABLE_LUA=ON -DFETCH_lua=OFF -DBUILD_wireshark=OFF -DBUILD_tshark=ON . &&
make tshark install &&
cd .. &&
unzip /test/Wireshark_plugin.zip -d /usr/local &&
curl http://bitop.luajit.org/download/LuaBitOp-${LUABITOP_VERSION}.tar.gz -o bitop.tar.gz &&
tar -xvf bitop.tar.gz &&
cd LuaBitOp-* &&
make install &&
cd .. &&
tshark -e A429.LABEL -e A429.WORD -e A429.SDI -e A429.SSM -e A429.DATA -e A429.PARITY -E header=y -T fields -r /test/pcapng_files/arinc429_broadcast.pcapng | tee /test/a429_broadcast.output
"
- name: Run diff
run: diff a429_broadcast.output test/a429_broadcast.output
test_discrete_centos_amazonlinux:
runs-on: ubuntu-latest
needs: package_centos_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Compile and run TShark on ARINC429 traffic
run: >
docker run -v .:/test amazonlinux sh -c "
yum install -y xz cmake g++ glib2-devel libgcrypt-devel c-ares-devel flex patch readline-devel unzip tar gzip &&
curl https://www.wireshark.org/download/src/wireshark-${WIRESHARK_VERSION}.tar.xz -o wireshark.tar.xz &&
tar -xvf wireshark.tar.xz &&
cd wireshark-* &&
cmake ${WIRESHARK_CENTOS_BUILD_OPTS} -DENABLE_LUA=ON -DFETCH_lua=ON -DBUILD_wireshark=OFF -DBUILD_tshark=ON . &&
make tshark install &&
cd .. &&
unzip /test/Wireshark_plugin.zip -d /usr/local &&
tshark -e DISCRETE.VALUE -E header=y -T fields -r /test/pcapng_files/discrete.pcapng | tee /test/discrete.output
"
- name: Run diff
run: diff discrete.output test/discrete.output
test_a429_centos_stream9:
runs-on: ubuntu-latest
needs: package_centos_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Compile and run TShark on ARINC429 traffic
run: >
docker run -v .:/test quay.io/centos/centos:stream9 sh -c "
yum install -y xz cmake g++ glib2-devel libgcrypt-devel c-ares-devel flex patch readline-devel unzip &&
curl https://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz -o lua.tar.gz &&
tar -xvf lua.tar.gz &&
cd lua-* &&
make "MYCFLAGS=-fPIC" linux install &&
cd .. &&
curl https://www.wireshark.org/download/src/wireshark-${WIRESHARK_VERSION}.tar.xz -o wireshark.tar.xz &&
tar -xvf wireshark.tar.xz &&
cd wireshark-* &&
cmake ${WIRESHARK_CENTOS_BUILD_OPTS} -DENABLE_LUA=ON -DFETCH_lua=OFF -DBUILD_wireshark=OFF -DBUILD_tshark=ON . &&
make tshark install &&
cd .. &&
unzip /test/Wireshark_plugin.zip -d /usr/local &&
curl http://bitop.luajit.org/download/LuaBitOp-${LUABITOP_VERSION}.tar.gz -o bitop.tar.gz &&
tar -xvf bitop.tar.gz &&
cd LuaBitOp-* &&
make install &&
cd .. &&
tshark -e A429.LABEL -e A429.WORD -e A429.SDI -e A429.SSM -e A429.DATA -e A429.PARITY -E header=y -T fields -r /test/pcapng_files/arinc429_broadcast.pcapng | tee /test/a429_broadcast.output
"
- name: Run diff
run: diff a429_broadcast.output test/a429_broadcast.output
test_discrete_centos_stream9:
runs-on: ubuntu-latest
needs: package_centos_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Compile and run TShark on ARINC429 traffic
run: >
docker run -v .:/test quay.io/centos/centos:stream9 sh -c "
yum install -y xz cmake g++ glib2-devel libgcrypt-devel c-ares-devel flex patch readline-devel unzip &&
curl https://www.wireshark.org/download/src/wireshark-${WIRESHARK_VERSION}.tar.xz -o wireshark.tar.xz &&
tar -xvf wireshark.tar.xz &&
cd wireshark-* &&
cmake ${WIRESHARK_CENTOS_BUILD_OPTS} -DENABLE_LUA=ON -DFETCH_lua=ON -DBUILD_wireshark=OFF -DBUILD_tshark=ON . &&
make tshark install &&
cd .. &&
unzip /test/Wireshark_plugin.zip -d /usr/local &&
tshark -e DISCRETE.VALUE -E header=y -T fields -r /test/pcapng_files/discrete.pcapng | tee /test/discrete.output
"
- name: Run diff
run: diff discrete.output test/discrete.output
test_a429_centos_almalinux:
runs-on: ubuntu-latest
needs: package_centos_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Compile and run TShark on ARINC429 traffic
run: >
docker run -v .:/test almalinux sh -c "
yum install -y xz cmake g++ glib2-devel libgcrypt-devel c-ares-devel flex patch readline-devel unzip &&
curl https://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz -o lua.tar.gz &&
tar -xvf lua.tar.gz &&
cd lua-* &&
make "MYCFLAGS=-fPIC" linux install &&
cd .. &&
curl https://www.wireshark.org/download/src/wireshark-${WIRESHARK_VERSION}.tar.xz -o wireshark.tar.xz &&
tar -xvf wireshark.tar.xz &&
cd wireshark-* &&
cmake ${WIRESHARK_CENTOS_BUILD_OPTS} -DENABLE_LUA=ON -DFETCH_lua=OFF -DBUILD_wireshark=OFF -DBUILD_tshark=ON . &&
make tshark install &&
cd .. &&
unzip /test/Wireshark_plugin.zip -d /usr/local &&
curl http://bitop.luajit.org/download/LuaBitOp-${LUABITOP_VERSION}.tar.gz -o bitop.tar.gz &&
tar -xvf bitop.tar.gz &&
cd LuaBitOp-* &&
make install &&
cd .. &&
tshark -e A429.LABEL -e A429.WORD -e A429.SDI -e A429.SSM -e A429.DATA -e A429.PARITY -E header=y -T fields -r /test/pcapng_files/arinc429_broadcast.pcapng | tee /test/a429_broadcast.output
"
- name: Run diff
run: diff a429_broadcast.output test/a429_broadcast.output
test_discrete_centos_almalinux:
runs-on: ubuntu-latest
needs: package_centos_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Compile and run TShark on ARINC429 traffic
run: >
docker run -v .:/test almalinux sh -c "
yum install -y xz cmake g++ glib2-devel libgcrypt-devel c-ares-devel flex patch readline-devel unzip &&
curl https://www.wireshark.org/download/src/wireshark-${WIRESHARK_VERSION}.tar.xz -o wireshark.tar.xz &&
tar -xvf wireshark.tar.xz &&
cd wireshark-* &&
cmake ${WIRESHARK_CENTOS_BUILD_OPTS} -DENABLE_LUA=ON -DFETCH_lua=ON -DBUILD_wireshark=OFF -DBUILD_tshark=ON . &&
make tshark install &&
cd .. &&
unzip /test/Wireshark_plugin.zip -d /usr/local &&
tshark -e DISCRETE.VALUE -E header=y -T fields -r /test/pcapng_files/discrete.pcapng | tee /test/discrete.output
"
- name: Run diff
run: diff discrete.output test/discrete.output
test_a429_centos_fedora:
runs-on: ubuntu-latest
needs: package_centos_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Run TShark on ARINC429 traffic
run: >
docker run -v .:/test fedora sh -c "
yum install -y wireshark-cli unzip &&
unzip /test/Wireshark_plugin.zip -d /usr &&
tshark -e A429.LABEL -e A429.WORD -e A429.SDI -e A429.SSM -e A429.DATA -e A429.PARITY -E header=y -T fields -r /test/pcapng_files/arinc429_broadcast.pcapng | tee /test/a429_broadcast.output
"
- name: Run diff
run: diff a429_broadcast.output test/a429_broadcast.output
test_discrete_centos_fedora:
runs-on: ubuntu-latest
needs: package_centos_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Run TShark on ARINC429 traffic
run: >
docker run -v .:/test fedora sh -c "
yum install -y wireshark-cli unzip &&
unzip /test/Wireshark_plugin.zip -d /usr &&
tshark -e DISCRETE.VALUE -E header=y -T fields -r /test/pcapng_files/discrete.pcapng | tee /test/discrete.output
"
- name: Run diff
run: diff discrete.output test/discrete.output
test_a429_windows:
runs-on: windows-latest
needs: package_windows_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download Wireshark plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-windows
- name: Download Wireshark
uses: actions/download-artifact@v4
with:
name: Wireshark
- name: Install Wireshark
run: |
.\wireshark.exe /S
Start-Sleep -Seconds 30
- name: Test TShark availability
run: '& "${env:PROGRAMFILES}\Wireshark\tshark.exe" --version'
- name: Install plugin
run: Expand-Archive Wireshark_plugin.zip ${ENV:PROGRAMFILES} -Force
- name: Run TShark on ARINC429 traffic
run: '& "${env:PROGRAMFILES}\Wireshark\tshark.exe" -e A429.LABEL -e A429.WORD -e A429.SDI -e A429.SSM -e A429.DATA -e A429.PARITY -E header=y -T fields -r pcapng_files/arinc429_broadcast.pcapng | tee a429_broadcast.output'
- name: Run diff
run: fc.exe a429_broadcast.output test/a429_broadcast.output
test_discrete_windows:
runs-on: windows-latest
needs: package_windows_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
with:
sparse-checkout: |
test
pcapng_files
sparse-checkout-cone-mode: false
- name: Download Wireshark plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-windows
- name: Download Wireshark
uses: actions/download-artifact@v4
with:
name: Wireshark
- name: Install Wireshark
run: |
.\wireshark.exe /S
Start-Sleep -Seconds 30
- name: Test TShark availability
run: '& "${env:PROGRAMFILES}\Wireshark\tshark.exe" --version'
- name: Install plugin
run: Expand-Archive Wireshark_plugin.zip ${ENV:PROGRAMFILES} -Force
- name: Run TShark on discrete traffic
run: '& "${env:PROGRAMFILES}\Wireshark\tshark.exe" -e DISCRETE.VALUE -E header=y -T fields -r pcapng_files/discrete.pcapng | tee discrete.output'
- name: Run diff
run: fc.exe discrete.output test/discrete.output
release_ubuntu_plugin:
runs-on: ubuntu-latest
needs: [test_a429_ubuntu, test_discrete_ubuntu]
permissions:
contents: write
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-ubuntu
- name: Rename archive
run: mv Wireshark_plugin.zip Wireshark_plugin-ubuntu-${{ github.ref_name }}.zip
- name: Release Ubuntu plugin
uses: softprops/action-gh-release@v1
with:
files: Wireshark_plugin-ubuntu-${{ github.ref_name }}.zip
fail_on_unmatched_files: true
release_alpine_plugin:
runs-on: ubuntu-latest
needs: [test_a429_alpine, test_discrete_alpine]
permissions:
contents: write
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-alpine
- name: Rename archive
run: mv Wireshark_plugin.zip Wireshark_plugin-alpine-${{ github.ref_name }}.zip
- name: Release Alpine plugin
uses: softprops/action-gh-release@v1
with:
files: Wireshark_plugin-alpine-${{ github.ref_name }}.zip
fail_on_unmatched_files: true
release_centos_plugin:
runs-on: ubuntu-latest
needs: [test_a429_centos_amazonlinux, test_discrete_centos_amazonlinux, test_a429_centos_stream9, test_discrete_centos_stream9, test_a429_centos_almalinux, test_discrete_centos_almalinux, test_a429_centos_fedora, test_discrete_centos_fedora]
permissions:
contents: write
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-centos
- name: Rename archive
run: mv Wireshark_plugin.zip Wireshark_plugin-centos-${{ github.ref_name }}.zip
- name: Release CentOS plugin
uses: softprops/action-gh-release@v1
with:
files: Wireshark_plugin-centos-${{ github.ref_name }}.zip
fail_on_unmatched_files: true
release_windows_plugin:
runs-on: ubuntu-latest
needs: [test_a429_windows, test_discrete_windows]
permissions:
contents: write
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-windows
- name: Rename archive
run: mv Wireshark_plugin.zip Wireshark_plugin-windows-${{ github.ref_name }}.zip
- name: Release Windows plugin
uses: softprops/action-gh-release@v1
with:
files: Wireshark_plugin-windows-${{ github.ref_name }}.zip
fail_on_unmatched_files: true