-
Notifications
You must be signed in to change notification settings - Fork 19
78 lines (71 loc) · 2.43 KB
/
ubuntu.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
67
68
69
70
71
72
73
74
75
76
77
78
# GitHub Action workflows to build and test the plug-in on Ubuntu
#
# Adapted from Wireshark's repository https://gitlab.com/wireshark/wireshark/-/tree/master/.github/workflows
name: Build Ubuntu plug-in
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
env:
WIRESHARK_BRANCH: release-4.2
jobs:
standalone:
name: Build standalone plugin
runs-on: ubuntu-22.04
steps:
- name: Checkout plug-in
uses: actions/checkout@v3
- name: Install dependencies for a standalone build
run: |
sudo add-apt-repository ppa:wireshark-dev/stable -y
sudo apt-get update -qq
export DEBIAN_FRONTEND=noninteractive
echo "wireshark-common wireshark-common/install-setuid boolean true" | sudo debconf-set-selections
sudo apt-get install -yqq cmake wireshark wireshark-dev tshark
- name: Build standalone
run: |
mkdir build
cd build
cmake ..
make
sudo make install
intree:
name: Build in-tree plugin
runs-on: ubuntu-22.04
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: Install dependencies for a in-tree build
run: |
sudo apt-get update -qq
sudo tools/debian-setup.sh --install-all python3-pip -y
- name: Build in-tree
run: |
mkdir build
cd build
cmake ..
make -j$(nproc) v2gexi tshark
- name: Copy plugin artifact
run: |
mkdir v2g-artifact
cp plugins/epan/v2g/dissector/v2g.lua v2g-artifact/v2g.lua
cp build/run/plugins/4.2/epan/v2gexi.so v2g-artifact/v2gexi.so
- name: Upload Ubuntu artifacts
uses: actions/upload-artifact@v3
with:
name: ubuntu-packages
path: v2g-artifact