TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / .github / workflows / msys2.yml
blob573abc934228ee4ef960c5f5c31b22a4dfb9b49d
1 name: Build MSYS2
3 on: [push]
5 jobs:
6   msys2-ucrt64:
7     runs-on: windows-latest
8     defaults:
9       run:
10         shell: msys2 {0}
11     steps:
12       - name: Setup MSYS2
13         uses: msys2/setup-msys2@v2
14         with:
15           msystem: UCRT64
16           update: true
17           install: base-devel
18       - name: Checkout
19         uses: actions/checkout@v4
20       - name: Install dependencies
21         run: tools/msys2-setup.sh --install-all --noconfirm
22       - name: Build
23         run: |
24           mkdir build && cd build
25           cmake -G Ninja ..
26           ninja
27           ninja test
28           ninja wireshark_nsis_prep
29           ninja wireshark_nsis
30       - name: Upload artifacts
31         uses: actions/upload-artifact@v4
32         with:
33           name: nsis-installer
34           path: build/packaging/nsis/wireshark-*-x64.exe
36   install-nsis:
37     runs-on: windows-latest
38     needs: msys2-ucrt64
39     steps:
40       - name: Download installer
41         uses: actions/download-artifact@v4
42         with:
43           name: nsis-installer
44           path: downloads
45       - name: Run installer
46         working-directory: downloads
47         run: |
48           $ErrorActionPreference = 'Stop'
49           $installer = Get-ChildItem -Path . -Filter "wireshark-*-x64.exe" -File | Select-Object -First 1
50           if ($null -eq $installer) {
51             Write-Error "Installer not found in downloads directory."
52             exit 1
53           }
54           Start-Process -FilePath $installer.FullName -ArgumentList '/S', '/D=C:\Wireshark' -Wait -NoNewWindow
55           if (!$?) {
56             Write-Error "Wireshark installation failed."
57             exit 1
58           }
59         shell: pwsh
60       - name: Show version
61         run: |
62           $ErrorActionPreference = 'Stop'
63           if (Test-Path "C:\Wireshark\tshark.exe") {
64             $versionOutput = & "C:\Wireshark\tshark.exe" --version
65             if ($LASTEXITCODE -ne 0) {
66               Write-Error "Failed to retrieve TShark version."
67               exit $LASTEXITCODE
68             }
69             Write-Output $versionOutput
70           } else {
71             Write-Error "TShark executable not found at C:\Wireshark\tshark.exe."
72             exit 1
73           }
74         shell: pwsh