1+ name : Core Build Checks
2+
3+ on :
4+ pull_request :
5+ branches : [ main, PreReleaseMain ]
6+ push :
7+ branches : [ main, PreReleaseMain ]
8+
9+ jobs :
10+ build-core-components :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Docker Buildx
18+ uses : docker/setup-buildx-action@v3
19+
20+ - name : Install Rust toolchain
21+ uses : dtolnay/rust-toolchain@master
22+ with :
23+ toolchain : nightly
24+ components : rust-src
25+
26+ - name : Install BPF dependencies
27+ run : |
28+ sudo apt-get update
29+ sudo apt-get install -y \
30+ clang \
31+ llvm \
32+ libelf-dev \
33+ libpcap-dev \
34+ build-essential \
35+ libbpf-dev \
36+ linux-tools-generic \
37+ linux-tools-common \
38+ protobuf-compiler
39+
40+ - name : Install bindgen-cli and bpf-linker
41+ run : |
42+ cargo install bindgen-cli
43+ cargo install bpf-linker
44+
45+ - name : Setup bpftool symlink
46+ run : |
47+ sudo ln -sf /usr/lib/linux-tools/*/bpftool /usr/local/bin/bpftool || \
48+ sudo ln -sf /usr/lib/linux-tools-*/bpftool /usr/local/bin/bpftool
49+
50+ - name : Build CortexFlow Agent
51+ run : |
52+ cd core
53+ chmod +x agent-api-build.sh
54+ echo "🚀 Starting CortexFlow Agent build..."
55+ ./agent-api-build.sh || { echo "❌ Agent build failed"; exit 1; }
56+ echo "✅ Agent build completed"
57+
58+ - name : Build CortexFlow Identity
59+ run : |
60+ cd core/src/components/identity
61+ chmod +x build-identity.sh
62+ echo "🚀 Starting CortexFlow Identity build..."
63+ ./build-identity.sh || { echo "❌ Identity build failed"; exit 1; }
64+ echo "✅ Identity build completed"
65+
66+ - name : Build CortexFlow Metrics
67+ run : |
68+ cd core/src/components/metrics
69+ chmod +x build-metrics.sh
70+ echo "🚀 Starting CortexFlow Metrics build..."
71+ ./build-metrics.sh || { echo "❌ Metrics build failed"; exit 1; }
72+ echo "✅ Metrics build completed"
73+
74+ - name : Verify Docker images were built
75+ run : |
76+ echo "Listing all Docker images:"
77+ docker images
78+ echo "Checking for core component images..."
79+
80+ # Check cortexflow-agent
81+ if docker images | grep -q "cortexflow-agent"; then
82+ echo "✅ cortexflow-agent image found"
83+ else
84+ echo "❌ cortexflow-agent image not found"
85+ exit 1
86+ fi
87+
88+ # Check identity
89+ if docker images | grep -q "identity"; then
90+ echo "✅ identity image found"
91+ else
92+ echo "❌ identity image not found"
93+ exit 1
94+ fi
95+
96+ # Check metrics
97+ if docker images | grep -q "metrics"; then
98+ echo "✅ metrics image found"
99+ else
100+ echo "❌ metrics image not found"
101+ exit 1
102+ fi
103+
104+ - name : Verify builds completed successfully
105+ run : |
106+ echo "All Docker builds completed successfully!"
107+ echo "CI pipeline focuses on build verification, not tests"
108+
109+ - name : Cleanup build artifacts
110+ run : |
111+ docker system prune -f
0 commit comments