-
Notifications
You must be signed in to change notification settings - Fork 6
77 lines (66 loc) · 2.38 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
name: Build Ubuntu
on:
workflow_call:
inputs:
MAJOR_VERSION:
description: "Version string for wireshark tag needed to build can be v#.#.# or v#.#.#-rc#"
type: string
required: true
default: '4'
MINOR_VERSION:
description: "Minor version of the wireshark tag"
type: string
required: true
default: '4'
PATCH_VERSION:
description: "Patch version of the wireshark tag"
type: string
required: true
default: '0'
env:
# This is the name for the file in releases
PLUGIN_NAME: wireshark-smf-linux-x86_64.tar.gz
jobs:
ubuntu:
name: Build on Linux
runs-on: ubuntu-22.04
steps:
#- name: Checkout with Submodule
# if: ${{ inputs.MAJOR_VERSION == '' }}
# uses: actions/checkout@v4
# with:
# submodules: recursive
- name: Checkout
uses: actions/checkout@v3
- name: Checkout Wireshark
uses: actions/checkout@v4
with:
repository: wireshark/wireshark
path: "./wireshark"
ref: v${{ inputs.MAJOR_VERSION }}.${{ inputs.MINOR_VERSION }}.${{ inputs.PATCH_VERSION }}
- name: Install deps
run: sudo ./wireshark/tools/debian-setup.sh --install-optional --install-test-deps --install-deb-deps python3-pip -y
- name: Link SMF plugin
shell: bash
run: |
ln -s ${{ github.workspace }}/src/CMakeListsCustom.txt ${{ github.workspace }}/wireshark/CMakeListsCustom.txt
ln -s ${{ github.workspace }}/src/smf ${{ github.workspace }}/wireshark/plugins/epan/smf
- name: Mkdir
run: mkdir build
- name: Cmake
working-directory: build
run: cmake -GNinja ${{ github.workspace }}/wireshark
- name: Build
run: ninja
working-directory: build
# A compressed tarball is created for release
# This means that the artifact is compressed and zipped as a result.
- name: Create Compressed Tarball
working-directory: ${{ github.workspace }}/build/run/plugins
run: tar -czvf ${{ github.workspace }}/${{ env.PLUGIN_NAME }} **/epan/smf.so
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.PLUGIN_NAME }}
path: "${{ github.workspace }}/${{ env.PLUGIN_NAME }}"
overwrite: true