1010 inputs :
1111 version_major :
1212 description : " Major version of the wireshark tag to use when building the plugin"
13- type : string
13+ type : number
1414 required : true
15- default : ' 4 '
15+ default : 4
1616 version_minor :
1717 description : " Minor version of the wireshark tag to use when building the plugin"
18- type : string
18+ type : number
1919 required : true
20- default : ' 6 '
20+ default : 6
2121 version_patch :
22- description : " Patch version of the wireshark tag to use when building the plugin"
23- type : string
24- required : true
25- default : ' 1'
26- version_extra :
27- description : " Extra version for the SMF plugin"
28- type : string
29- required : true
30- default : ' 0'
22+ description : " Patch version for the SMF plugin"
23+ type : number
24+ required : false
3125 build_linux :
3226 description : ' Build for Linux'
3327 type : boolean
4438 workflow_call :
4539 inputs :
4640 version_major :
47- type : string
41+ type : number
4842 required : true
4943 version_minor :
50- type : string
44+ type : number
5145 required : true
5246 version_patch :
53- type : string
54- required : true
55- version_extra :
56- type : string
47+ type : number
5748 required : true
5849 build_linux :
5950 type : boolean
7364 version_major : ${{ steps.defaults.outputs.version_major }}
7465 version_minor : ${{ steps.defaults.outputs.version_minor }}
7566 version_patch : ${{ steps.defaults.outputs.version_patch }}
76- version_extra : ${{ steps.defaults.outputs.version_extra }}
7767 build_linux : ${{ steps.defaults.outputs.build_linux }}
7868 build_windows : ${{ steps.defaults.outputs.build_windows }}
7969 build_macos : ${{ steps.defaults.outputs.build_macos }}
@@ -82,13 +72,13 @@ jobs:
8272 - name : Set defaults
8373 id : defaults
8474 run : |
85- echo "version_major=${{ inputs.version_major || '4' }}" >> $GITHUB_OUTPUT
86- echo "version_minor=${{ inputs.version_minor || '6' }}" >> $GITHUB_OUTPUT
87- echo "version_patch=${{ inputs.version_patch || '1' }}" >> $GITHUB_OUTPUT
88- echo "version_extra=${{ inputs.version_extra || '0' }}" >> $GITHUB_OUTPUT
89- echo "build_linux=${{ inputs.build_linux || 'true' }}" >> $GITHUB_OUTPUT
90- echo "build_windows=${{ inputs.build_windows || 'true' }}" >> $GITHUB_OUTPUT
91- echo "build_macos=${{ inputs.build_macos || 'true' }}" >> $GITHUB_OUTPUT
75+ echo "version_major=${{ inputs.version_major || 4 }}" >> $GITHUB_OUTPUT
76+ echo "version_minor=${{ inputs.version_minor || 6 }}" >> $GITHUB_OUTPUT
77+ echo "version_patch=${{ inputs.version_patch || -1 }}" >> $GITHUB_OUTPUT
78+
79+ echo "build_linux=${{ !contains( inputs.build_linux, 'false') }}" >> $GITHUB_OUTPUT
80+ echo "build_windows=${{ !contains( inputs.build_windows, 'false') }}" >> $GITHUB_OUTPUT
81+ echo "build_macos=${{ !contains( inputs.build_macos, 'false') }}" >> $GITHUB_OUTPUT
9282
9383 - name : Set OS Matrix
9484 id : set-matrix
@@ -130,10 +120,11 @@ jobs:
130120 needs : setup
131121 strategy :
132122 matrix :
133- os : ${{ fromJson (needs.setup.outputs.matrix) }}
123+ os : ${{ fromJSON (needs.setup.outputs.matrix) }}
134124 name : Build on ${{ matrix.os.pretty-name }}
135125 env :
136126 WIRESHARK_BASE_DIR : ${{ github.workspace }}/wireshark-libs
127+ WIRESHARK_PATCH_VERSION : 0
137128 runs-on : ${{ matrix.os.runner }}
138129 steps :
139130 - name : Checkout
@@ -157,14 +148,14 @@ jobs:
157148 uses : actions/cache@v4
158149 with :
159150 path : ${{ env.WIRESHARK_BASE_DIR }}
160- key : wireshark-libs-v${{ needs.setup.outputs.version_major }}.${{ needs.setup.outputs.version_minor }}.${{ needs.setup.outputs.version_patch }}-${{ matrix.os.name }}
151+ key : wireshark-libs-v${{ needs.setup.outputs.version_major }}.${{ needs.setup.outputs.version_minor }}.${{ env.WIRESHARK_PATCH_VERSION }}-${{ matrix.os.name }}
161152
162153 - name : Cache Wireshark Install
163154 id : cache-wireshark-install
164155 uses : actions/cache@v4
165156 with :
166157 path : wireshark-install
167- key : wireshark-v${{ needs.setup.outputs.version_major }}.${{ needs.setup.outputs.version_minor }}.${{ needs.setup.outputs.version_patch }}${{ matrix.os.name == 'macos' && format('-glib{0}', steps.macos-deps-hash.outputs.GLIB_VER) || '' }}-${{ matrix.os.name }}
158+ key : wireshark-v${{ needs.setup.outputs.version_major }}.${{ needs.setup.outputs.version_minor }}.${{ env.WIRESHARK_PATCH_VERSION }}${{ matrix.os.name == 'macos' && format('-glib{0}', steps.macos-deps-hash.outputs.GLIB_VER) || '' }}-${{ matrix.os.name }}
168159
169160 - name : Create Wireshark Install Directory
170161 if : steps.cache-wireshark-install.outputs.cache-hit != 'true'
@@ -176,7 +167,7 @@ jobs:
176167 with :
177168 repository : wireshark/wireshark
178169 path : wireshark-src
179- ref : v${{ needs.setup.outputs.version_major }}.${{ needs.setup.outputs.version_minor }}.${{ needs.setup.outputs.version_patch }}
170+ ref : v${{ needs.setup.outputs.version_major }}.${{ needs.setup.outputs.version_minor }}.${{ env.WIRESHARK_PATCH_VERSION }}
180171
181172 - name : Install Wireshark Dependencies
182173 if : steps.cache-wireshark-install.outputs.cache-hit != 'true' && matrix.os.deps
@@ -249,12 +240,11 @@ jobs:
249240 cmake -G Ninja -S . -B build
250241 -DCMAKE_PREFIX_PATH="${{ github.workspace }}/wireshark-install;${{ env.WS_DEP_PATH }}"
251242 -DCMAKE_BUILD_TYPE="RelWithDebInfo"
252- -DWireshark_VERSION="${{ needs.setup.outputs.version_major }}.${{ needs.setup.outputs.version_minor }}.${{ needs.setup.outputs.version_patch }}"
243+ -DWireshark_VERSION="${{ needs.setup.outputs.version_major }}.${{ needs.setup.outputs.version_minor }}.${{ env.WIRESHARK_PATCH_VERSION }}"
253244 -DCMAKE_C_FLAGS="${{ matrix.os.c-flags }}"
254245 -DPLUGIN_VERSION_MAJOR=${{ needs.setup.outputs.version_major }}
255246 -DPLUGIN_VERSION_MINOR=${{ needs.setup.outputs.version_minor }}
256247 -DPLUGIN_VERSION_PATCH=${{ needs.setup.outputs.version_patch }}
257- -DPLUGIN_VERSION_EXTRA=${{ needs.setup.outputs.version_extra }}
258248
259249 - name : Build Plugin
260250 run : cmake --build build
0 commit comments