build: update the wireshark base to release-4.2 #229
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
# GitHub Action workflows to build and test the plug-in on Windows | |
# | |
# Adapted from Wireshark's repository https://gitlab.com/wireshark/wireshark/-/tree/master/.github/workflows | |
name: Build Windows plug-in | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_call: | |
env: | |
PLATFORM: x64 | |
WIRESHARK_BRANCH: release-4.2 | |
WIRESHARK_BASE_DIR: C:\Development | |
CMAKE_PREFIX_PATH: D:\a\wireshark\Qt\6.2.3\msvc2019_64 | |
WIRESHARK_VERSION_EXTRA: -GithubActionBuild | |
jobs: | |
intree: | |
name: Build in-tree plugin | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout Wireshark | |
run: | | |
git init | |
git remote add -t "${{ env.WIRESHARK_BRANCH }}" -f origin https://gitlab.com/wireshark/wireshark.git | |
git checkout ${{ env.WIRESHARK_BRANCH }} | |
- name: Checkout plug-in | |
uses: actions/checkout@v3 | |
with: | |
path: plugins/epan/v2g | |
- name: Apply patch | |
run: | | |
git apply plugins/epan/v2g/extern/wireshark-${{ env.WIRESHARK_BRANCH }}.patch | |
- name: Choco install | |
run: choco install -y --force --no-progress 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/[email protected] | |
with: | |
vs-version: 16.8 | |
- name: Set MSVC command prompt | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Mkdir | |
run: mkdir build | |
- name: Cmake | |
run: cmake -DUSE_qt6=ON -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: build | |
- name: Build | |
run: cmake --build . --config RelWithDebInfo | |
working-directory: build | |
- name: Build Windows pkg | |
run: | | |
msbuild /m /p:Configuration=RelWithDebInfo wireshark_nsis_prep.vcxproj | |
msbuild /m /p:Configuration=RelWithDebInfo wireshark_nsis.vcxproj | |
working-directory: build | |
- name: Move Windows artifacts | |
run: | | |
mkdir v2g-artifact | |
mv build/packaging/nsis/*exe v2g-artifact/ | |
- name: Move plugin dll | |
run: | | |
mv build/run/RelWithDebInfo/plugins/4.2/epan/v2gexi.dll v2g-artifact/v2gexi.dll | |
- name: Copy dissector lua | |
run: | | |
cp plugins/epan/v2g/dissector/v2g.lua v2g-artifact/v2g.lua | |
- name: Upload Windows artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-packages | |
path: v2g-artifact |