Skip to content

Commit 22fc171

Browse files
authored
Merge pull request #42 from hashblen/master
Feat: Add pktmon version
2 parents b929ab1 + 3739291 commit 22fc171

7 files changed

Lines changed: 611 additions & 240 deletions

File tree

.github/workflows/clippy.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,19 @@ jobs:
2222
curl https://npcap.com/dist/npcap-sdk-1.15.zip -o sdk.zip
2323
unzip sdk.zip
2424
25-
- name: Clippy
25+
- name: Clippy on npcap ver
26+
uses: actions-rs/cargo@v1
27+
with:
28+
command: clippy
29+
args: --no-default-features --features pcap
30+
env:
31+
LIB: ${{ github.workspace }}/Lib/x64/
32+
33+
- name: Clippy on pktmon ver
2634
uses: actions-rs/cargo@v1
2735
with:
2836
command: clippy
37+
args: --no-default-features --features pktmon
2938
env:
3039
LIB: ${{ github.workspace }}/Lib/x64/
3140

.github/workflows/release.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,39 @@ jobs:
2424
curl https://npcap.com/dist/npcap-sdk-1.15.zip -o sdk.zip
2525
unzip sdk.zip
2626
27-
- name: Build
27+
- name: Build npcap version
2828
uses: actions-rs/cargo@v1
2929
with:
3030
command: build
31-
args: --release
31+
args: --release --no-default-features --features pcap
32+
env:
33+
LIB: ${{ github.workspace }}/Lib/x64/
34+
35+
- name: Move pcap exe
36+
run: mv -Force target/release/stardb-exporter.exe target/release/stardb-exporter-pcap.exe
37+
38+
- name: Build pktmon version
39+
uses: actions-rs/cargo@v1
40+
with:
41+
command: build
42+
args: --release --no-default-features --features pktmon
3243
env:
3344
LIB: ${{ github.workspace }}/Lib/x64/
3445

46+
- name: Move pktmon exe
47+
run: mv -Force target/release/stardb-exporter.exe target/release/stardb-exporter-pktmon.exe
48+
49+
- name: Upload Artifact
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: windows-pcap
53+
path: target/release/stardb-exporter-pcap.exe
54+
3555
- name: Upload Artifact
3656
uses: actions/upload-artifact@v4
3757
with:
38-
name: windows
39-
path: target/release/stardb-exporter.exe
58+
name: windows-pktmon
59+
path: target/release/stardb-exporter-pktmon.exe
4060

4161
build-linux:
4262
name: Build Linux
@@ -117,8 +137,10 @@ jobs:
117137

118138
- name: Rename
119139
run: |
120-
cp windows/stardb-exporter.exe stardb-exporter.exe
140+
cp windows-pcap/stardb-exporter-pcap.exe stardb-exporter.exe
121141
zip stardb-exporter-v${{ steps.cargo-get.outputs.metadata }}-x86_64-pc-windows-msvc.zip stardb-exporter.exe
142+
cp windows-pktmon/stardb-exporter-pktmon.exe stardb-exporter-pktmon.exe
143+
zip stardb-exporter-pktmon-v${{ steps.cargo-get.outputs.metadata }}-x86_64-pc-windows-msvc.zip stardb-exporter-pktmon.exe
122144
cp linux/stardb-exporter stardb-exporter
123145
cp stardb-exporter stardb-exporter-linux
124146
zip stardb-exporter-v${{ steps.cargo-get.outputs.metadata }}-x86_64-unknown-linux-gnu.zip stardb-exporter
@@ -135,8 +157,10 @@ jobs:
135157
title: v${{ steps.cargo-get.outputs.metadata }} Release
136158
files: |
137159
stardb-exporter.exe
160+
stardb-exporter-pktmon.exe
138161
stardb-exporter-linux
139162
stardb-exporter-macos
140163
stardb-exporter-v${{ steps.cargo-get.outputs.metadata }}-x86_64-pc-windows-msvc.zip
164+
stardb-exporter-pktmon-v${{ steps.cargo-get.outputs.metadata }}-x86_64-pc-windows-msvc.zip
141165
stardb-exporter-v${{ steps.cargo-get.outputs.metadata }}-x86_64-unknown-linux-gnu.zip
142166
stardb-exporter-v${{ steps.cargo-get.outputs.metadata }}-x86_64-apple-darwin.zip

0 commit comments

Comments
 (0)