Skip to content

Commit 2ceae6c

Browse files
committed
added build.yml for github actions
1 parent e83f418 commit 2ceae6c

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: build
2+
3+
# Build both components on every push and pull request so we catch
4+
# compile/type errors before they land.
5+
on:
6+
push:
7+
pull_request:
8+
9+
jobs:
10+
cpp_engine:
11+
name: Build cpp_engine (C++20 + ZeroMQ)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
# cppzmq, cpp-httplib and nlohmann/json are header-only and pulled in by
17+
# CMake FetchContent. We only need the native libraries here: libzmq (the
18+
# ZeroMQ core), OpenSSL (HTTPS for --live mode), and pkg-config so cppzmq
19+
# can locate libzmq.
20+
- name: Install native dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y --no-install-recommends \
24+
cmake \
25+
build-essential \
26+
pkg-config \
27+
libzmq3-dev \
28+
libssl-dev
29+
30+
# FetchContent clones the header-only deps at configure time; cache them
31+
# keyed on the CMakeLists so we don't re-clone on every run.
32+
- name: Cache FetchContent dependencies
33+
uses: actions/cache@v4
34+
with:
35+
path: cpp_engine/build/_deps
36+
key: ${{ runner.os }}-fetchcontent-${{ hashFiles('cpp_engine/CMakeLists.txt') }}
37+
38+
- name: Configure
39+
run: cmake -S cpp_engine -B cpp_engine/build -DCMAKE_BUILD_TYPE=Release
40+
41+
- name: Build
42+
run: cmake --build cpp_engine/build
43+
44+
ts_agent:
45+
name: Build ts_agent (Node.js + TypeScript)
46+
runs-on: ubuntu-latest
47+
defaults:
48+
run:
49+
working-directory: ts_agent
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- uses: actions/setup-node@v4
54+
with:
55+
node-version: 20
56+
cache: npm
57+
cache-dependency-path: ts_agent/package-lock.json
58+
59+
- name: Install dependencies
60+
run: npm ci
61+
62+
- name: Build
63+
run: npm run build

0 commit comments

Comments
 (0)