-
Notifications
You must be signed in to change notification settings - Fork 55
115 lines (102 loc) · 3.2 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Build Clio
on:
push:
branches: [master, release/*, develop]
pull_request:
branches: [master, release/*, develop]
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Run clang-format
uses: ./.github/actions/lint
build_mac:
name: Build macOS
needs: lint
continue-on-error: true
runs-on: [self-hosted, macOS]
steps:
- uses: actions/checkout@v3
with:
path: clio
- name: List conan artifactory
run: |
conan search
conan remote list
if [[ $(conan remote list |grep conan-non-prod| wc -c) -ne 0 ]]; then
echo "conan-non-prod is available"
else
echo "adding conan-non-prod"
conan remote add conan-non-prod http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
fi
- name: Install dependencies
run: |
brew install llvm@14 pkg-config ninja bison cmake
- name: Setup environment for llvm-14
run: |
export PATH="/usr/local/opt/llvm@14/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/llvm@14/lib -L/usr/local/opt/llvm@14/lib/c++ -Wl,-rpath,/usr/local/opt/llvm@14/lib/c++"
export CPPFLAGS="-I/usr/local/opt/llvm@14/include"
- name: Build Clio
run: |
cd clio
mkdir -p build
cd build
conan install .. -of . -b missing -s build_type=Release -o clio:tests=True
cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel $(($(sysctl -n hw.logicalcpu) - 2))
- name: Upload clio_tests
uses: actions/upload-artifact@v3
with:
name: clio_tests_mac
path: ./clio/build/clio_tests
build_linux:
name: Build linux
needs: lint
continue-on-error: true
runs-on: [self-hosted, Linux]
container:
image: conanio/gcc11:1.60.2
options: --user root
steps:
- name: Get Clio
uses: actions/checkout@v3
- name: Get rippled
uses: actions/checkout@v3
with:
repository: thejohnfreeman/rippled
ref: clio
path: rippled
- name: Build Clio
run: |
./.github/actions/linux_build/build.sh
- name: Upload clio_tests
uses: actions/upload-artifact@v3
with:
name: clio_tests_linux
path: ./build_clio/clio_tests
test_mac:
needs: build_mac
runs-on: [self-hosted, macOS]
steps:
- uses: actions/download-artifact@v3
with:
name: clio_tests_mac
- name: Run clio_tests
run: |
chmod +x ./clio_tests
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*"
test_linux:
needs: build_linux
runs-on: [self-hosted, x-heavy]
steps:
- uses: actions/download-artifact@v3
with:
name: clio_tests_linux
- name: Run clio_tests
run: |
chmod +x ./clio_tests
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*"