-
-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (126 loc) · 4 KB
/
Copy pathgui.yml
File metadata and controls
147 lines (126 loc) · 4 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: GUI CI
on:
push:
branches: [main, develop]
paths:
- 'crates/spectre-gui/**'
- '.github/workflows/gui.yml'
pull_request:
branches: [main, develop]
paths:
- 'crates/spectre-gui/**'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
frontend-check:
name: Frontend Type Check & Tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v6
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: crates/spectre-gui/frontend/pnpm-lock.yaml
- name: Install frontend dependencies
run: |
cd crates/spectre-gui/frontend
pnpm install --frozen-lockfile
- name: TypeScript type check
run: |
cd crates/spectre-gui/frontend
pnpm typecheck
- name: Run frontend tests
run: |
cd crates/spectre-gui/frontend
pnpm test
gui-build-matrix:
name: Build GUI (${{ matrix.platform.name }})
strategy:
fail-fast: false
matrix:
platform:
- name: Linux x86_64
os: ubuntu-22.04
rust: stable
target: x86_64-unknown-linux-gnu
# DISABLED: macOS builds removed
# - name: macOS x86_64
# os: macos-15-intel
# rust: stable
# target: x86_64-apple-darwin
# - name: macOS ARM64
# os: macos-14
# rust: stable
# target: aarch64-apple-darwin
- name: Windows x86_64
os: windows-2022
rust: stable
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v6
with:
submodules: false
- name: Initialize submodules
run: git submodule update --init --depth 1 components/prtip components/wraith-protocol components/cyberchef-mcp
- name: Install system dependencies (Linux)
if: matrix.platform.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
libpcap-dev
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install libpcap
- name: Install system dependencies (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
# Download Npcap SDK for ProRT-IP
Invoke-WebRequest -Uri "https://npcap.com/dist/npcap-sdk-1.13.zip" -OutFile "npcap-sdk.zip"
Expand-Archive -Path "npcap-sdk.zip" -DestinationPath "npcap-sdk"
echo "LIB=${{ github.workspace }}\npcap-sdk\Lib\x64" >> $env:GITHUB_ENV
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.platform.rust }}
targets: ${{ matrix.platform.target }}
- uses: Swatinem/rust-cache@v2
with:
workspaces: "crates/spectre-gui -> target"
key: ${{ matrix.platform.target }}
prefix-key: "v2"
- uses: pnpm/action-setup@v6
with:
version: 11
- uses: actions/setup-node@v6
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: crates/spectre-gui/frontend/pnpm-lock.yaml
- name: Install frontend dependencies
run: |
cd crates/spectre-gui/frontend
pnpm install --frozen-lockfile
- name: Build frontend
run: |
cd crates/spectre-gui/frontend
pnpm build
- name: Build GUI
run: cargo build --release -p spectre-gui --target ${{ matrix.platform.target }}
- name: Run GUI tests
run: cargo test -p spectre-gui --target ${{ matrix.platform.target }} --verbose