Skip to content

Commit

Permalink
Test with dependency retrieval + archlinux addition
Browse files Browse the repository at this point in the history
  • Loading branch information
juadde committed May 17, 2024
1 parent f52d6b5 commit 886fbc6
Showing 1 changed file with 107 additions and 13 deletions.
120 changes: 107 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,59 @@ on:
env:
# Variables to update in case of new versions
LUABITOP_VERSION: "1.0.2"
WIRESHARK_VERSION: "4.2.4"
WIRESHARK_VERSION: "4.2.5"
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:

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
steps:
# Get all sources
- name: Get LuaBitOp
run: wget ${LUA_BITOP_URL}/LuaBitOp-${LUABITOP_VERSION}.zip -O bitop.zip
- name: Get Wireshark
run: wget ${WIRESHARK_URL}/win64/Wireshark-${WIRESHARK_VERSION}-x64.exe -O wireshark.exe
- name: Get Wireshark Sources
run: wget ${WIRESHARK_URL}/src/wireshark-${WIRESHARK_VERSION}.tar.xz -O wireshark.tar.xz
- name: Get Lua
run: wget ${LUA_URL}/lua-${LUA_VERSION}.tar.gz -O lua.tar.gz

# Store Sources as artifacts for future stages
- name: Archive DLL as artifact
uses: actions/upload-artifact@v4
with:
name: LuaBitOp-Sources
path: bitop.zip
if-no-files-found: error
- name: Archive DLL as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-Sources
path: wireshark.tar.xz
if-no-files-found: error
- name: Archive DLL as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-Windows-Executable
path: wireshark.exe
if-no-files-found: error
- name: Archive DLL as artifact
uses: actions/upload-artifact@v4
with:
name: Lua-Sources
path: lua.tar.gz
if-no-files-found: error

# LuaBitOp DLL Compilation
luabitop_windows_build:
runs-on: windows-latest
needs: dependency_download
steps:
# Get all sources
- name: Get LuaBitOp
Expand Down Expand Up @@ -109,7 +153,7 @@ jobs:
path: Wireshark_plugin.zip
if-no-files-found: error

package_alpine_plugin:
package_standard_plugin:
runs-on: ubuntu-latest
steps:
- name: Get Plugin
Expand All @@ -129,7 +173,7 @@ jobs:
- name: Archive plugin as artifact
uses: actions/upload-artifact@v4
with:
name: Wireshark-plugin-alpine
name: Wireshark-plugin-standard
path: Wireshark_plugin.zip
if-no-files-found: error

Expand Down Expand Up @@ -242,7 +286,7 @@ jobs:

test_a429_alpine:
runs-on: ubuntu-latest
needs: package_alpine_plugin
needs: package_standard_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
Expand All @@ -254,7 +298,7 @@ jobs:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-alpine
name: Wireshark-plugin-standard
- name: Run TShark on ARINC429 traffic
run: >
docker run -v .:/test alpine sh -c "
Expand All @@ -267,7 +311,7 @@ jobs:

test_discrete_alpine:
runs-on: ubuntu-latest
needs: package_alpine_plugin
needs: package_standard_plugin
steps:
- name: Get test files
uses: actions/checkout@v4
Expand All @@ -279,7 +323,7 @@ jobs:
- name: Download plugin
uses: actions/download-artifact@v4
with:
name: Wireshark-plugin-alpine
name: Wireshark-plugin-standard
- name: Run TShark on ARINC429 traffic
run: >
docker run -v .:/test alpine sh -c "
Expand All @@ -290,6 +334,56 @@ jobs:
- 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

test_a429_centos_amazonlinux:
runs-on: ubuntu-latest
needs: package_centos_plugin
Expand Down Expand Up @@ -639,23 +733,23 @@ jobs:
files: Wireshark_plugin-ubuntu-${{ github.ref_name }}.zip
fail_on_unmatched_files: true

release_alpine_plugin:
release_standard_plugin:
runs-on: ubuntu-latest
needs: [test_a429_alpine, test_discrete_alpine]
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-alpine
name: Wireshark-plugin-standard
- name: Rename archive
run: mv Wireshark_plugin.zip Wireshark_plugin-alpine-${{ github.ref_name }}.zip
- name: Release Alpine plugin
run: mv Wireshark_plugin.zip Wireshark_plugin-standard-${{ github.ref_name }}.zip
- name: Release Standard plugin
uses: softprops/action-gh-release@v1
with:
files: Wireshark_plugin-alpine-${{ github.ref_name }}.zip
files: Wireshark_plugin-standard-${{ github.ref_name }}.zip
fail_on_unmatched_files: true

release_centos_plugin:
Expand Down

0 comments on commit 886fbc6

Please sign in to comment.