-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (85 loc) · 2.72 KB
/
ci.yml
File metadata and controls
106 lines (85 loc) · 2.72 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
name: AetherLens CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build-rust:
name: Build Rust Core
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
core-engine/target
key: ${{ runner.os }}-cargo-${{ hashFiles('core-engine/Cargo.lock') }}
- name: Download Npcap SDK
shell: powershell
run: |
Invoke-WebRequest -Uri https://nmap.org/npcap/dist/npcap-sdk-1.13.zip -OutFile npcap-sdk.zip
Expand-Archive npcap-sdk.zip -DestinationPath npcap-sdk-extract
if (Test-Path "npcap-sdk-extract/Lib") {
Rename-Item -Path "npcap-sdk-extract" -NewName "npcap-sdk"
} else {
$sdkDir = Get-ChildItem -Path "npcap-sdk-extract" -Directory | Where-Object { Test-Path "$($_.FullName)/Lib" } | Select-Object -First 1
if ($sdkDir) {
Move-Item -Path $sdkDir.FullName -Destination "npcap-sdk"
} else {
Write-Error "Could not find Npcap SDK Lib directory"
exit 1
}
}
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check Formatting
run: cd core-engine && cargo fmt -- --check
- name: Clippy Lint
run: cd core-engine && cargo clippy -- -D warnings
- name: Run Tests
run: cd core-engine && cargo test --verbose
- name: Build Release
run: cd core-engine && cargo build --release --verbose
build-dotnet:
name: Build .NET Backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore Dependencies
run: cd api-server && dotnet restore
- name: Build
run: cd api-server && dotnet build --no-restore --configuration Release
build-nextjs:
name: Build Next.js Dashboard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: web-dashboard/package-lock.json
- name: Install Dependencies
run: cd web-dashboard && npm ci
- name: Lint
run: cd web-dashboard && npm run lint
- name: Build
run: cd web-dashboard && npm run build