Github/workflows: update actions using node
[wireshark-sm.git] / .github / workflows / windows.yml
blob70ccccb2f6f83de26e37b53df6c9d28c04f46c73
1 name: Build Windows
3 on: [push]
5 jobs:
6   windows:
7     name: Build & Test
8     runs-on: windows-2022
9     env:
10       PLATFORM: x64
11       WIRESHARK_BASE_DIR: C:\Development
12       CMAKE_PREFIX_PATH: D:\a\wireshark\Qt\6.2.3\msvc2019_64
13       WIRESHARK_VERSION_EXTRA: -GithubActionBuild
14     steps:
15       - name: Checkout
16         uses: actions/checkout@v4
17       - name: Choco install
18         run: choco install -y --force --no-progress asciidoctorj xsltproc docbook-bundle nsis winflexbison3 cmake
19       - name: Install strawberryperl
20         uses: shogo82148/actions-setup-perl@v1
21         with:
22           perl-version: '5.30'
23           distribution: strawberry
24       - name: Install Qt
25         uses: jurplel/install-qt-action@v3
26         with:
27           arch: win64_msvc2019_64
28           version: 6.2.3
29           modules: 'qt5compat'
30       - name: Add msbuild to PATH
31         uses: microsoft/setup-msbuild@v2
32         with:
33           vs-version: 16.8
34       - name: Set MSVC command prompt
35         uses: ilammy/msvc-dev-cmd@v1
36       - name: Mkdir
37         run: mkdir build
38       - name: Cmake
39         run: cmake -DCMAKE_SYSTEM_VERSION="10.0.20348.0" -A x64 ..
40         env:
41           PLATFORM: x64
42           WIRESHARK_BASE_DIR: C:/wireshark-libs
43           QT5_BASE_DIR: C:/Qt/5.12.3/msvc2017_64
44         working-directory: build
45       - name: Build
46         run: cmake --build . --config RelWithDebInfo
47         working-directory: build
48       - name: Build guides
49         run: cmake --build . --config RelWithDebInfo --target user_guide_html
50         working-directory: build
51       - name: Build test-programs
52         run: cmake --build . --config RelWithDebInfo --target test-programs
53         working-directory: build
54       - name: Set up Python 3.8
55         uses: actions/setup-python@v5
56         with:
57           python-version: 3.8
58       - name: Install pytest
59         run: pip install pytest pytest-xdist
60       - name: Run tests
61         env:
62           PYTEST_ADDOPTS: --skip-missing-programs=rawshark
63         run: pytest
64         working-directory: build
65       - name: Build Windows pkg
66         run: |
67           msbuild /m /p:Configuration=RelWithDebInfo wireshark_nsis_prep.vcxproj
68           msbuild /m /p:Configuration=RelWithDebInfo wireshark_nsis.vcxproj
69         working-directory: build
70       - name: Upload Windows packages
71         uses: actions/upload-artifact@v4
72         with:
73           name: package
74           path: build/packaging/nsis/*exe