aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build-msbuild.yml
blob: 323662c53dd974708a54bba5fa82f6348e21dbfa (plain)
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
name: MSBuild
on:
  push:
    branches:
      - dev
  pull_request:
    branches:
      - dev
    types: [opened, synchronize, reopened]
  release:
    types: [created]
jobs:
  test:
    name: MSBuild
    runs-on: windows-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Add msbuild to PATH
        uses: microsoft/setup-msbuild@v2

      - name: Download NuGet packages
        run: msbuild windows/nDPI.sln -t:restore -p:RestorePackagesConfig=true

      - name: Build libnDPI only (debug)
        run: msbuild windows/nDPI.sln -t:rebuild -property:Configuration=Debug

      - name: Download Npcap
        run: Invoke-WebRequest -Uri 'https://npcap.com/dist/npcap-1.71.exe' -OutFile 'C:\npcap-1.71.exe'

      - name: Install Npcap
        run: C:\npcap-1.71.exe /S /winpcap_mode=yes

      - name: Build ndpiReader (debug)
        run: msbuild windows/nDPI.sln -t:rebuild -property:Configuration=Debug-ndpiReader

      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: build-artifacts
          path: windows/bin
          retention-days: 14