-
Notifications
You must be signed in to change notification settings - Fork 8
111 lines (94 loc) · 3.16 KB
/
core-build-checks.yml
File metadata and controls
111 lines (94 loc) · 3.16 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
name: Core Build Checks
on:
pull_request:
branches: [ main, PreReleaseMain ]
push:
branches: [ main, PreReleaseMain ]
jobs:
build-core-components:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rust-src
- name: Install BPF dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
clang \
llvm \
libelf-dev \
libpcap-dev \
build-essential \
libbpf-dev \
linux-tools-generic \
linux-tools-common \
protobuf-compiler
- name: Install bindgen-cli and bpf-linker
run: |
cargo install bindgen-cli
cargo install bpf-linker
- name: Setup bpftool symlink
run: |
sudo ln -sf /usr/lib/linux-tools/*/bpftool /usr/local/bin/bpftool || \
sudo ln -sf /usr/lib/linux-tools-*/bpftool /usr/local/bin/bpftool
- name: Build CortexFlow Agent
run: |
cd core
chmod +x agent-api-build.sh
echo "🚀 Starting CortexFlow Agent build..."
./agent-api-build.sh || { echo "❌ Agent build failed"; exit 1; }
echo "✅ Agent build completed"
- name: Build CortexFlow Identity
run: |
cd core/src/components/identity
chmod +x build-identity.sh
echo "🚀 Starting CortexFlow Identity build..."
./build-identity.sh || { echo "❌ Identity build failed"; exit 1; }
echo "✅ Identity build completed"
- name: Build CortexFlow Metrics
run: |
cd core/src/components/metrics
chmod +x build-metrics.sh
echo "🚀 Starting CortexFlow Metrics build..."
./build-metrics.sh || { echo "❌ Metrics build failed"; exit 1; }
echo "✅ Metrics build completed"
- name: Verify Docker images were built
run: |
echo "Listing all Docker images:"
docker images
echo "Checking for core component images..."
# Check cortexflow-agent
if docker images | grep -q "cortexflow-agent"; then
echo "✅ cortexflow-agent image found"
else
echo "❌ cortexflow-agent image not found"
exit 1
fi
# Check identity
if docker images | grep -q "identity"; then
echo "✅ identity image found"
else
echo "❌ identity image not found"
exit 1
fi
# Check metrics
if docker images | grep -q "metrics"; then
echo "✅ metrics image found"
else
echo "❌ metrics image not found"
exit 1
fi
- name: Verify builds completed successfully
run: |
echo "All Docker builds completed successfully!"
echo "CI pipeline focuses on build verification, not tests"
- name: Cleanup build artifacts
run: |
docker system prune -f