Initial commit #20
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
name: Build | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
sys: | |
- { os: windows, shell: 'msys2 {0}' } | |
- { os: ubuntu, shell: bash } | |
- { os: macos, shell: bash } | |
wireshark: | |
- v4.4.0 | |
runs-on: ${{ matrix.sys.os }}-latest | |
defaults: | |
run: | |
shell: ${{ matrix.sys.shell }} | |
steps: | |
- name: Checkout Wireshark | |
uses: actions/checkout@v4 | |
with: | |
repository: wireshark/wireshark | |
ref: ${{ matrix.wireshark }} | |
path: wireshark | |
fetch-depth: 0 | |
- name: Checkout CatSniffer Plugin | |
uses: actions/checkout@v4 | |
with: | |
path: wireshark/plugins/epan/catsniffer | |
fetch-depth: 0 | |
- name: Install dependencies (Ubuntu) | |
if: matrix.sys.os == 'ubuntu' | |
run: sudo wireshark/tools/debian-setup.sh --install-all python3-pip -y | |
- name: Install dependencies (Mac OS) | |
if: matrix.sys.os == 'macos' | |
run: wireshark/tools/macos-setup-brew.sh --install-optional --install-doc-deps --install-dmg-deps --install-test-deps | |
env: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
- name: Install MSYS2 (Windows) | |
if: matrix.sys.os == 'windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: base-devel | |
- name: Install dependencies (Windows) | |
if: matrix.sys.os == 'windows' | |
run: wireshark/tools/msys2-setup.sh --install-all --noconfirm | |
- name: Configure | |
run: cmake -B build -S wireshark -G Ninja -DCUSTOM_PLUGIN_SRC_DIR=plugins/epan/catsniffer -DCMAKE_INSTALL_PREFIX=/ | |
- name: Build | |
run: cmake --build build --target catsniffer | |
- name: Install | |
env: | |
DESTDIR: ${{ github.workspace }}/dist | |
run: cmake --build build --target plugins/epan/catsniffer/install | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CatSniffer_Wireshark${{ matrix.wireshark }}_${{ matrix.sys.os }} | |
path: dist/ |