-
Notifications
You must be signed in to change notification settings - Fork 0
171 lines (139 loc) · 4.6 KB
/
kiwidb.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: kiwi
on:
push:
branches: [ "unstable" ]
pull_request:
branches: [ "*" ]
env:
BUILD_DIR: cmake-build-release
jobs:
check_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: bash ./etc/script/ci/build.sh
- name: Add LLVM apt repository
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt update
- name: Install clang-format-18
run: |
sudo apt install -y clang-format-18
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 200
- name: Verify clang-format version
run: clang-format --version
- name: Check Format
working-directory: ${{ github.workspace }}/build
run: make check-format
build_on_macos:
runs-on: macos-14
needs: check_format
env:
CMAKE_C_COMPILER_LAUNCHER: "ccache"
CMAKE_CXX_COMPILER_LAUNCHER: "ccache"
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew update
brew install ccache
- name: Configure ccache
run: |
ccache --set-config=cache_dir=$HOME/.ccache
ccache --max-size=10G
- name: Restore ccache
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('**/*.cpp','**/*.cc','**/*.c', '**/*.h') }}-clang
restore-keys: |
${{ runner.os }}-ccache-
ccache-
- name: Build
run: |
brew update
brew install ccache
brew install autoconf
brew install go
- name: Configure ccache
run: |
ccache --set-config=cache_dir=$HOME/.ccache
ccache --max-size=10G
- name: Restore ccache
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('**/*.cpp','**/*.cc','**/*.c', '**/*.h') }}-clang
restore-keys: |
${{ runner.os }}-ccache-
ccache-
- name: Build
run: |
export LIBRARY_PATH=$(xcrun --show-sdk-path)/usr/lib
export DYLD_LIBRARY_PATH=$(xcrun --show-sdk-path)/usr/lib
bash ./etc/script/build.sh --verbose
- name: Save ccache stats
run: ccache -s
- name: GTest
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest
- name: Run TCL E2e Tests
working-directory: ${{ github.workspace }}
run:
./etc/script/kiwitests.sh all
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
run: |
set +e
cd ../tests
go mod tidy
go test -timeout 15m --ginkgo.v
sh print_log.sh
build_on_ubuntu:
runs-on: ubuntu-latest
needs: check_format
env:
CMAKE_C_COMPILER_LAUNCHER: "ccache"
CMAKE_CXX_COMPILER_LAUNCHER: "ccache"
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt install -y ccache
- name: Configure ccache
run: |
ccache --set-config=cache_dir=$HOME/.ccache
ccache --max-size=10G
- name: Restore ccache
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('**/*.cpp','**/*.cc','**/*.c', '**/*.h') }}-${{ matrix.compiler || 'gcc' }}
restore-keys: |
${{ runner.os }}-ccache-
ccache-
- name: Build
run: |
bash ./etc/script/build.sh --verbose
- name: Save ccache stats
run: ccache -s
- name: GTest
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest
- name: Run TCL E2e Tests
working-directory: ${{ github.workspace }}
run:
./etc/script/kiwitests.sh all
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/${{ env.BUILD_DIR }}
run: |
set +e
cd ../tests
go mod tidy
go test -timeout 15m --ginkgo.v || exit 1
sh print_log.sh