-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 2.35 KB
/
cmake-macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Wirego plugin build on macos
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
macos:
name: Build
runs-on: macos-latest
strategy:
matrix:
wireshark_version: ["4.2", "4.4"]
steps:
- name: Set output folder
env:
VERSION: ${{ matrix.wireshark_version }}
run: echo "OUTPUT_PATH=${VERSION//./-}" >> $GITHUB_ENV
- name: Install deps
run: brew install c-ares glib libgcrypt pcre2 speexdsp zeromq
- name: Clone Wirego plugin
uses: actions/checkout@v3
with:
path: ${{ github.workspace }}/wirego
- name: Clone Wireshark
uses: actions/checkout@v3
with:
repository: wireshark/wireshark
path: ${{ github.workspace }}/wireshark
ref: release-${{ matrix.wireshark_version }}
- name: Create plugin link
run: ln -s ${{ github.workspace }}/wirego/wirego_bridge ${{ github.workspace }}/wireshark/plugins/epan/wirego
- name: Create output dir
run: mkdir ${{ github.workspace }}/build
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ github.workspace }}/build
-DBUILD_wireshark=OFF
-DCUSTOM_PLUGIN_SRC_DIR=${{ github.workspace }}/wireshark/plugins/epan/wirego
-S ${{ github.workspace }}/wireshark
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ github.workspace }}/build --config Release -- wirego
- name: Debug ls
run: ls -R ${{ github.workspace }}/build
- name: Export plugin
uses: actions/upload-artifact@v4
env:
VERSION: ${{ matrix.wireshark_version }}
run: echo "OUTPUT_PATH=${VERSION//./-}" >> $GITHUB_ENV
with:
name: WiregoPlugin-macOS-for-Wireshark-${{ matrix.wireshark_version }}
path: ${{ github.workspace }}/build/run/Wireshark.app/Contents/PlugIns/wireshark/${{ env.OUTPUT_PATH }}/epan/wirego.so