New test #105
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
# 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.5" | |
LUA_VERSION: "5.2.4" | |
WIRESHARK_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: | |
# Dependency download for all builds | |
dependency_download: | |
runs-on: ubuntu-latest | |
env: | |
LUA_URL: https://www.lua.org/ftp | |
LUA_BITOP_URL: http://bitop.luajit.org/download | |
WIRESHARK_URL: https://2.na.dl.wireshark.org | |
MACPORTS_URL: https://github.com/macports/macports-base/releases/download/ | |
steps: | |
# Get all sources | |
- name: Get Wireshark sources | |
run: wget ${WIRESHARK_URL}/src/wireshark-${WIRESHARK_VERSION}.tar.xz -O wireshark.tar.xz | |
- name: Get Wireshark Windows installer | |
run: wget ${WIRESHARK_URL}/win64/Wireshark-${WIRESHARK_VERSION}-x64.exe -O wireshark.exe | |
- name: Get Lua sources | |
run: wget ${LUA_URL}/lua-${LUA_VERSION}.tar.gz -O lua.tar.gz | |
- name: Get LuaBitOp sources | |
run: wget ${LUA_BITOP_URL}/LuaBitOp-${LUABITOP_VERSION}.zip -O bitop.zip | |
# Store Sources as artifacts for future stages | |
- name: Archive Wireshark sources as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Wireshark-Sources | |
path: wireshark.tar.xz | |
if-no-files-found: error | |
- name: Archive Winreshark Windows installer as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Wireshark-Windows-Installer | |
path: wireshark.exe | |
if-no-files-found: error | |
- name: Archive Lua sources as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Lua-Sources | |
path: lua.tar.gz | |
if-no-files-found: error | |
- name: Archive LuaBitOp sources as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: LuaBitOp-Sources | |
path: bitop.zip | |
if-no-files-found: error | |
# Windows build | |
luabitop_windows_build: | |
runs-on: windows-latest | |
needs: dependency_download | |
steps: | |
# Get all sources | |
- name: Download LuaBitOp sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: LuaBitOp-Sources | |
- name: Download Wireshark installer | |
uses: actions/download-artifact@v4 | |
with: | |
name: Wireshark-Windows-Installer | |
- name: Download Lua sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Lua-Sources | |
# Extract / rename folders and delete downloads | |
- name: Unzip DLL source code | |
run: tar -xf bitop.zip | |
- name: Normalize DLL source code folder | |
run: mv LuaBitOp* dll | |
- name: Delete DLL source code archive | |
run: rm bitop.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 LuaBitOp DLL as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: LuaBitOp-DLL | |
path: bit.dll | |
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_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-Windows-Installer | |
- 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-Windows-Installer | |
- 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_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@v2 | |
with: | |
files: Wireshark_plugin-windows-${{ github.ref_name }}.zip | |
fail_on_unmatched_files: true | |
# Ubuntu and debian derivatives build | |
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 | |
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_debian: | |
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: Run TShark on ARINC429 traffic | |
run: > | |
docker run -v .:/test debian sh -c " | |
apt-get update && | |
apt-get install -y tshark lua-bitop 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_debian: | |
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: Run TShark on ARINC429 traffic | |
run: > | |
docker run -v .:/test debian sh -c " | |
apt-get update && | |
apt-get install -y tshark 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 | |
release_ubuntu_plugin: | |
runs-on: ubuntu-latest | |
needs: [test_a429_ubuntu, test_discrete_ubuntu, test_a429_debian, test_discrete_debian] | |
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@v2 | |
with: | |
files: Wireshark_plugin-ubuntu-${{ github.ref_name }}.zip | |
fail_on_unmatched_files: true | |
# Standard build (alpine, archlinux) | |
package_standard_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-standard | |
path: Wireshark_plugin.zip | |
if-no-files-found: error | |
test_a429_alpine: | |
runs-on: ubuntu-latest | |
needs: package_standard_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-standard | |
- 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_standard_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-standard | |
- 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_archlinux: | |
runs-on: ubuntu-latest | |
needs: package_standard_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-standard | |
- name: Run TShark on ARINC429 traffic | |
run: > | |
docker run -v .:/test archlinux sh -c " | |
pacman -Syu --noconfirm unzip wireshark-cli lua52-bitop diffutils && | |
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_archlinux: | |
runs-on: ubuntu-latest | |
needs: package_standard_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-standard | |
- name: Run TShark on ARINC429 traffic | |
run: > | |
docker run -v .:/test archlinux sh -c " | |
pacman -Syu --noconfirm unzip wireshark-cli diffutils && | |
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 | |
release_standard_plugin: | |
runs-on: ubuntu-latest | |
needs: [test_a429_alpine, test_discrete_alpine, test_a429_archlinux, test_discrete_archlinux] | |
permissions: | |
contents: write | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
steps: | |
- name: Download plugin | |
uses: actions/download-artifact@v4 | |
with: | |
name: Wireshark-plugin-standard | |
- name: Rename archive | |
run: mv Wireshark_plugin.zip Wireshark_plugin-standard-${{ github.ref_name }}.zip | |
- name: Release Standard plugin | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: Wireshark_plugin-standard-${{ github.ref_name }}.zip | |
fail_on_unmatched_files: true | |
# RHEL-like build | |
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 | |
test_a429_centos_amazonlinux: | |
runs-on: ubuntu-latest | |
needs: [package_centos_plugin, dependency_download] | |
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: Download LuaBitOp sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: LuaBitOp-Sources | |
- name: Download Lua sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Lua-Sources | |
- name: Download Wireshark sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Wireshark-Sources | |
- 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 && | |
tar -xvf /test/lua.tar.gz && | |
cd lua-* && | |
make "MYCFLAGS=-fPIC" linux install && | |
cd .. && | |
tar -xvf /test/wireshark.tar.xz && | |
cd wireshark-* && | |
cmake ${WIRESHARK_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 && | |
unzip /test/bitop.zip && | |
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, dependency_download] | |
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: Download Wireshark sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Wireshark-Sources | |
- 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 && | |
tar -xvf test/wireshark.tar.xz && | |
cd wireshark-* && | |
cmake ${WIRESHARK_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, dependency_download] | |
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: Download LuaBitOp sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: LuaBitOp-Sources | |
- name: Download Lua sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Lua-Sources | |
- name: Download Wireshark sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Wireshark-Sources | |
- 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 && | |
tar -xvf /test/lua.tar.gz && | |
cd lua-* && | |
make "MYCFLAGS=-fPIC" linux install && | |
cd .. && | |
tar -xvf /test/wireshark.tar.xz && | |
cd wireshark-* && | |
cmake ${WIRESHARK_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 && | |
unzip /test/bitop.zip && | |
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, dependency_download] | |
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: Download Wireshark sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Wireshark-Sources | |
- 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 && | |
tar -xvf /test/wireshark.tar.xz && | |
cd wireshark-* && | |
cmake ${WIRESHARK_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, dependency_download] | |
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: Download LuaBitOp sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: LuaBitOp-Sources | |
- name: Download Lua sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Lua-Sources | |
- name: Download Wireshark sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Wireshark-Sources | |
- 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 && | |
tar -xvf /test/lua.tar.gz && | |
cd lua-* && | |
make "MYCFLAGS=-fPIC" linux install && | |
cd .. && | |
tar -xvf /test/wireshark.tar.xz && | |
cd wireshark-* && | |
cmake ${WIRESHARK_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 && | |
unzip /test/bitop.zip && | |
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, dependency_download] | |
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: Download Wireshark sources | |
uses: actions/download-artifact@v4 | |
with: | |
name: Wireshark-Sources | |
- 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 && | |
tar -xvf /test/wireshark.tar.xz && | |
cd wireshark-* && | |
cmake ${WIRESHARK_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 | |
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@v2 | |
with: | |
files: Wireshark_plugin-centos-${{ github.ref_name }}.zip | |
fail_on_unmatched_files: true | |
# MacOS build | |
package_macos_plugin: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Plugin | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: . | |
- name: Create directory structure | |
run: mkdir -p PlugIns/wireshark Resources/share/wireshark | |
- name: Move plugin files | |
run: mv cyber_*.lua LICENSE README.md COPYING PlugIns/wireshark | |
- name: Move user_dlts file | |
run: mv user_dlts Resources/share/wireshark | |
- name: Package plugin | |
run: zip -r Wireshark_plugin.zip PlugIns Resources | |
# Store Wireshark plugin as artifact for future usage | |
- name: Archive plugin as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Wireshark-plugin-macos | |
path: Wireshark_plugin.zip | |
if-no-files-found: error | |
test_a429_macos: | |
runs-on: macos-latest | |
needs: [package_macos_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-macos | |
- uses: melusina-org/setup-macports@v1 | |
- name: Install wireshark (with brew) | |
run: brew install --cask wireshark | |
- name: Tshark version | |
run: tshark --version | |
- name: Install lua54-bitop (with macports) | |
run: sudo port install lua54-luabitop | |
# - name: bit.so search | |
# run: sudo find / -name bit.so || true | |
# - name: List app | |
# run: ls -h /Applications/Wireshark.app | |
# - name: bit.so linkage | |
# run: sudo ln -s /opt/local/lib/lua/5.4/bit.so /Applications/Wireshark.app/bit.so | |
- name: Which tshark | |
run: ls /opt/local/lib | |
- name: Which tshark | |
run: which tshark | |
- name: Configure rpath for tshark | |
run: sudo cp /opt/local/lib/lua/5.4/bit.so /opt/homebrew/lib/ | |
- name: Unzip plugin | |
run: sudo unzip Wireshark_plugin.zip -d /Applications/Wireshark.app/Contents/ | |
- name: Run ARINC429 test | |
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_macos: | |
runs-on: macos-latest | |
needs: [package_macos_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-macos | |
- name: Intall wireshark | |
run: brew install --cask wireshark | |
- name: Unzip plugin | |
run: sudo unzip Wireshark_plugin.zip -d /Applications/Wireshark.app/Contents/ | |
- name: Run discrete test | |
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 | |
release_macos_plugin: | |
runs-on: ubuntu-latest | |
needs: [test_a429_macos, test_discrete_macos] | |
permissions: | |
contents: write | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
steps: | |
- name: Download plugin | |
uses: actions/download-artifact@v4 | |
with: | |
name: Wireshark-plugin-standard | |
- name: Rename archive | |
run: mv Wireshark_plugin.zip Wireshark_plugin-macos-${{ github.ref_name }}.zip | |
- name: Release MacOS plugin | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: Wireshark_plugin-macos-${{ github.ref_name }}.zip | |
fail_on_unmatched_files: true |