Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CICD to build wireshark plugin releases for linux and mac #168

Closed
wants to merge 84 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
d157517
Create main.yml
noeltimothy Sep 17, 2024
0afdedf
Update main.yml
noeltimothy Sep 17, 2024
ace15c5
Update macos_build.sh
noeltimothy Sep 17, 2024
6606371
Update main.yml
noeltimothy Sep 17, 2024
db4a903
Update main.yml
noeltimothy Sep 17, 2024
babe257
Update main.yml
noeltimothy Sep 17, 2024
7ffb261
Update main.yml
noeltimothy Sep 17, 2024
3019ee1
Update main.yml
noeltimothy Sep 17, 2024
e072dc7
Update main.yml
noeltimothy Sep 17, 2024
3c4af57
Update main.yml
noeltimothy Sep 17, 2024
871a2b9
Update main.yml
noeltimothy Sep 17, 2024
6677dfc
Update main.yml
noeltimothy Sep 17, 2024
86c8ae0
Update main.yml
noeltimothy Sep 17, 2024
601d0af
Update main.yml
noeltimothy Sep 18, 2024
59a2cf9
Update main.yml
noeltimothy Sep 18, 2024
f57d7ac
Update main.yml
noeltimothy Sep 18, 2024
610ada4
Update main.yml
noeltimothy Sep 18, 2024
700f16e
Update macos_build.sh
noeltimothy Sep 18, 2024
061ab32
Update main.yml
noeltimothy Sep 18, 2024
d263816
Update macos_build.sh
noeltimothy Sep 18, 2024
2c9418f
Update macos_build.sh
noeltimothy Sep 18, 2024
cbe9779
Update main.yml
noeltimothy Sep 18, 2024
c58229b
Update macos_build.sh
noeltimothy Sep 18, 2024
6335c42
Update main.yml
noeltimothy Sep 18, 2024
670ec06
Update main.yml
noeltimothy Sep 18, 2024
370411d
added windows build
noeltimothy Sep 18, 2024
b26e2c1
updates
noeltimothy Sep 18, 2024
7628e9f
choco test
noeltimothy Sep 18, 2024
4e0e3d1
choco test
noeltimothy Sep 18, 2024
877ae7c
choco test
noeltimothy Sep 18, 2024
f1a9976
updates
noeltimothy Sep 18, 2024
177d5e7
updates
noeltimothy Sep 18, 2024
4ed2585
updates
noeltimothy Sep 18, 2024
8af5347
updates
noeltimothy Sep 18, 2024
1b6973b
updates
noeltimothy Sep 18, 2024
ff2b461
updates
noeltimothy Sep 18, 2024
3dc87b2
updates
noeltimothy Sep 18, 2024
a211543
updates
noeltimothy Sep 18, 2024
1c5f1e4
updates
noeltimothy Sep 18, 2024
dd5ffe2
updates
noeltimothy Sep 18, 2024
d72e970
updates
noeltimothy Sep 18, 2024
5477774
updates
noeltimothy Sep 18, 2024
16e5a6f
updates
noeltimothy Sep 18, 2024
b3f23e7
updates
noeltimothy Sep 18, 2024
efe1cc0
updates
noeltimothy Sep 18, 2024
3e6d92d
updates
noeltimothy Sep 18, 2024
85bcb65
updates
noeltimothy Sep 18, 2024
c05d6c9
updates
noeltimothy Sep 18, 2024
47be74a
test
noeltimothy Sep 18, 2024
7644a57
test
noeltimothy Sep 18, 2024
921e64b
test
noeltimothy Sep 18, 2024
94d7de4
updates
noeltimothy Sep 18, 2024
7c2beac
updates
noeltimothy Sep 18, 2024
c327ee4
updates
noeltimothy Sep 18, 2024
7e389e4
updates
noeltimothy Sep 18, 2024
219158f
updates
noeltimothy Sep 18, 2024
a1c8c5c
updates
noeltimothy Sep 18, 2024
033b92a
updates
noeltimothy Sep 18, 2024
935c925
updates
noeltimothy Sep 18, 2024
e16c7e0
updates
noeltimothy Sep 18, 2024
9aeacae
updates
noeltimothy Sep 18, 2024
3038240
updates
noeltimothy Sep 18, 2024
273d67a
updates
noeltimothy Sep 18, 2024
1574a1f
updates
noeltimothy Sep 18, 2024
45f6e06
updates
noeltimothy Sep 18, 2024
95bd77c
updates
noeltimothy Sep 18, 2024
d0cda8d
updates
noeltimothy Sep 18, 2024
1d439b2
updates
noeltimothy Sep 18, 2024
9e646ce
updates
noeltimothy Sep 18, 2024
8084993
updates
noeltimothy Sep 18, 2024
505e01a
updates
noeltimothy Sep 18, 2024
2598ebb
updates
noeltimothy Sep 18, 2024
aea850b
Update main.yml
noeltimothy Sep 19, 2024
869cd90
testing build
noeltimothy Sep 19, 2024
1aeeead
wrong test
noeltimothy Sep 19, 2024
eb003be
Update README.md
noeltimothy Sep 19, 2024
1c44e00
Create test
noeltimothy Sep 19, 2024
0f39f4c
Create temp.yml
noeltimothy Sep 19, 2024
b7e3b6e
Update temp.yml
noeltimothy Sep 19, 2024
c861eb8
Update temp.yml
noeltimothy Sep 19, 2024
197a723
Update temp.yml
noeltimothy Sep 19, 2024
0fa4df8
Update main.yml
noeltimothy Sep 19, 2024
cb06ad0
Update main.yml
noeltimothy Sep 19, 2024
7e57513
Update main.yml
noeltimothy Sep 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: ja4-wireshark-release
on:
push:
branches: [main]
paths: [wireshark/*, wireshark/source/*, wireshark/build-scripts/*]
workflow_dispatch:

jobs:
wireshark-linux:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: build
run: cd wireshark/build-scripts && sudo apt update -y && sudo apt install ninja-build -y && sudo ./linux_build.sh 4.4.0
- name: rename artifact
run: cp ./wireshark/build-scripts/wireshark-4.4.0/build/run/plugins/4.4/epan/ja4.so linux-ja4.so
- name: upload-linux-ja4
uses: actions/upload-artifact@v4
with:
name: linux-ja4
path: linux-ja4.so

wireshark-macos:
runs-on: macOS-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: build
run: cd wireshark/build-scripts && ./macos_build.sh 4.4.0
- name: rename artifact
run: cp ./wireshark/build-scripts/wireshark-4.4.0/build/run/Wireshark.app/Contents/PlugIns/wireshark/4-4/epan/ja4.so macos-ja4.so
- name: upload-macos-ja4
uses: actions/upload-artifact@v4
with:
name: macos-ja4
path: macos-ja4.so

wireshark-windows:
runs-on: windows-2022
env:
PLATFORM: x64
WIRESHARK_BASE_DIR: C:\Development
CMAKE_PREFIX_PATH: D:\a\ja4\Qt\6.2.3\msvc2019_64
WIRESHARK_VERSION_EXTRA: -GithubActionBuild
steps:
- name: checkout
uses: actions/checkout@v4
- name: create wireshark directory
run: mkdir wireshark/build-scripts/wireshark
- name: checkout wireshark
uses: actions/checkout@v4
with:
repository: wireshark/wireshark
ref: release-4.4
path: wireshark/build-scripts/wireshark
- name: add ja4 plugin
run: copy -r wireshark/source wireshark/build-scripts/wireshark/plugins/epan/ja4
- name: Choco install dependencies
run: choco install -y asciidoctorj xsltproc docbook-bundle nsis winflexbison3 cmake
- name: Install strawberryperl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.30'
distribution: strawberry
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
arch: win64_msvc2019_64
version: 6.2.3
modules: 'qt5compat'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
vs-version: 16.8
- name: Set MSVC command prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Mkdir build directory and copy sources
run: mkdir wireshark/build-scripts/wireshark/build
- name: Cmake
run: cd wireshark/build-scripts/wireshark/build && cmake -DCUSTOM_PLUGIN_SRC_DIR=plugins/epan/ja4 -DCMAKE_SYSTEM_VERSION="10.0.20348.0" -A x64 ..
env:
PLATFORM: x64
WIRESHARK_BASE_DIR: C:/wireshark-libs
QT5_BASE_DIR: C:/Qt/5.12.3/msvc2017_64
working-directory: wireshark/build-scripts/wireshark/build
- name: Build
run: cmake --build . --config RelWithDebInfo
working-directory: wireshark/build-scripts/wireshark/build
- name: rename artifact
run: cp wireshark/build-scripts/wireshark/build/run/RelWithDebInfo/plugins/4.4/epan/ja4.dll ja4.dll
- name: upload-windows-ja4
uses: actions/upload-artifact@v4
with:
name: windows-ja4
path: ja4.dll

release-artifacts:
runs-on: ubuntu-latest
needs: [ wireshark-linux, wireshark-macos, wireshark-windows ]
steps:
- name: set env
run: echo "NOW=$(date +'%Y.%m.%d.%M')" >> $GITHUB_ENV
- name: download-artifacts
uses: actions/download-artifact@v4
- name: list files
run: ls -al
- name: release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh release create ${{ env.NOW }} linux-ja4.so macos-ja4.so ja4.dll
52 changes: 52 additions & 0 deletions .github/workflows/temp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: temp
on:
push:
branches: [main]
paths: [wireshark/*, wireshark/source/*, wireshark/build-scripts/*]
workflow_dispatch:

jobs:
upload-one:
runs-on: ubuntu-latest
steps:
- name: touch one
run: echo "one" > one.txt
- name: upload-one
uses: actions/upload-artifact@v4
with:
name: upload-one
path: one.txt

upload-two:
runs-on: ubuntu-latest
steps:
- name: touch two
run: echo "two" > one.txt
- name: upload-two
uses: actions/upload-artifact@v4
with:
name: upload-two
path: one.txt

upload-all:
runs-on: ubuntu-latest
needs: [ upload-one, upload-two ]
steps:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: upload-one
- name: release1
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh release create "test" one.txt#Linux
- name: Download a second artifact
uses: actions/download-artifact@v4
with:
name: upload-two
- name: release2
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh release upload "test" one.txt#Mac
71 changes: 71 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: windows-build
on:
push:
branches: [main]
paths: [wireshark/*, wireshark/source/*, wireshark/build-scripts/*, .github/workflows/*]
workflow_dispatch:

jobs:
wireshark-windows:
name: build
runs-on: windows-2022
env:
PLATFORM: x64
WIRESHARK_BASE_DIR: C:\Development
CMAKE_PREFIX_PATH: D:\a\ja4\Qt\6.2.3\msvc2019_64
WIRESHARK_VERSION_EXTRA: -GithubActionBuild
steps:
- name: checkout this repo
uses: actions/checkout@v4

- name: create wireshark directory
run: mkdir wireshark/build-scripts/wireshark

- name: checkout wireshark
uses: actions/checkout@v4
with:
repository: wireshark/wireshark
ref: release-4.4
path: wireshark/build-scripts/wireshark

- name: add ja4 plugin
run: copy -r wireshark/source wireshark/build-scripts/wireshark/plugins/epan/ja4

- name: Choco install dependencies
run: choco install -y asciidoctorj xsltproc docbook-bundle nsis winflexbison3 cmake
- name: Install strawberryperl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.30'
distribution: strawberry

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
arch: win64_msvc2019_64
version: 6.2.3
modules: 'qt5compat'

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
vs-version: 16.8

- name: Set MSVC command prompt
uses: ilammy/msvc-dev-cmd@v1

- name: Mkdir build directory and copy sources
run: mkdir wireshark/build-scripts/wireshark/build

- name: Cmake
run: cd wireshark/build-scripts/wireshark/build && cmake -DCUSTOM_PLUGIN_SRC_DIR=plugins/epan/ja4 -DCMAKE_SYSTEM_VERSION="10.0.20348.0" -A x64 ..
env:
PLATFORM: x64
WIRESHARK_BASE_DIR: C:/wireshark-libs
QT5_BASE_DIR: C:/Qt/5.12.3/msvc2017_64
working-directory: wireshark/build-scripts/wireshark/build

- name: Build
run: cmake --build . --config RelWithDebInfo
working-directory: wireshark/build-scripts/wireshark/build

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,4 @@ And engineers working at GreyNoise, Hunt, Google, ExtraHop, F5, Driftnet and oth
Contact John Althouse at john@foxio.io for licensing and questions.

<sub><sup>Copyright (c) 2024, FoxIO</sup></sub>

3 changes: 3 additions & 0 deletions wireshark/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Test
# JA4+ Plugin for Wireshark

![JA4](https://github.com/FoxIO-LLC/ja4/blob/main/wireshark/screenshot.png)
Expand Down Expand Up @@ -61,3 +62,5 @@ The preference file is located in the following locations:

## Licensing
See [Licensing](https://github.com/FoxIO-LLC/ja4/tree/main#licensing) under repo root.

test
1 change: 1 addition & 0 deletions wireshark/binaries/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
7 changes: 4 additions & 3 deletions wireshark/build-scripts/macos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ if [ ! -d wireshark-$VER ]
cd wireshark-$VER
fi


rm -rf ./plugins/epan/ja4
cp -r ../../source ./plugins/epan/ja4

if [ ! -d build ]; then
mkdir build
fi

cd build && cmake -DCUSTOM_PLUGIN_SRC_DIR=plugins/epan/ja4 ../
cd build && cmake -DCUSTOM_PLUGIN_SRC_DIR=plugins/epan/ja4 -DBUILD_wireshark=off ../
echo 'building using make...'
make -j8

Expand All @@ -42,5 +42,6 @@ if [ ! -d ../../../../ja4-plugin ]; then
fi

cp `find . -name ja4.so` ../../../../ja4-plugin/
echo "Your JA4 Plugin is ready at `pwd`/../../../../ja4-plugin/ja4.so"
echo "Your JA4 Plugin is ready at" `find . -name ja4.so`


Loading