-
Notifications
You must be signed in to change notification settings - Fork 8
90 lines (77 loc) · 2.54 KB
/
build.yml
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
name: Build
on:
pull_request:
push:
branches:
- main
jobs:
build:
if: ${{ github.repository == 'Netflix-Skunkworks/atlas-system-agent' }}
runs-on: ubuntu-latest
env:
BUILD_DIR: "cmake-build"
BUILD_TYPE: "Debug"
CC: "gcc-11"
CXX: "g++-11"
LANG: "en_US.UTF-8"
strategy:
matrix:
agent: [system, titus]
steps:
- uses: actions/checkout@v3
- name: Conan+Cmake Cache
uses: actions/cache@v3
with:
path: |
~/.conan
~/work/atlas-system-agent/atlas-system-agent/cmake-build
key: ${{ runner.os }}-conan-cmake
- name: Install System Dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update && sudo apt-get install -y binutils-dev g++-11 libcap-dev libiberty-dev
echo "==== cmake ===="
cmake -version
echo "==== python ===="
python3 -V
echo "==== conan ===="
pip install -r requirements.txt
conan --version
if [[ ! -f ~/.conan/profiles/default ]]; then conan profile new default --detect; fi
conan profile update settings.compiler.libcxx=libstdc++11 default
- name: Install Project Dependencies
run: |
if [[ "$BUILD_TYPE" == "Debug" ]]; then
conan install . --build --install-folder $BUILD_DIR --profile ./sanitized
else
conan install . --build=missing --install-folder $BUILD_DIR
fi
- name: Install Source Dependencies
run: |
conan source .
- name: Build atlas-system-agent
if: ${{ startsWith(matrix.agent, 'system') }}
run: |
cd $BUILD_DIR
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DTITUS_SYSTEM_SERVICE=OFF ..
cmake --build .
echo "==== ldd ===="
ldd bin/atlas_system_agent || true
- name: Test atlas-system-agent
if: ${{ startsWith(matrix.agent, 'system') }}
run: |
cd $BUILD_DIR
GTEST_COLOR=1 ctest --verbose
- name: Build atlas-titus-agent
if: ${{ startsWith(matrix.agent, 'titus') }}
run: |
cd $BUILD_DIR
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DTITUS_SYSTEM_SERVICE=ON ..
cmake --build .
echo "==== ldd ===="
ldd bin/atlas_system_agent || true
- name: Test atlas-titus-agent
if: ${{ startsWith(matrix.agent, 'titus') }}
run: |
cd $BUILD_DIR
GTEST_COLOR=1 ctest --verbose