-
Notifications
You must be signed in to change notification settings - Fork 0
246 lines (221 loc) · 10.9 KB
/
ci-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
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
name: Tateyama-bootstrap-CI
on: [push, pull_request, workflow_dispatch]
jobs:
Build:
strategy:
fail-fast: false
matrix:
container-tag: [ubuntu-20.04, ubuntu-22.04]
runs-on: [self-hosted, docker]
timeout-minutes: 30
container:
image: ghcr.io/project-tsurugi/oltp-sandbox:${{ matrix.container-tag }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
volumes:
- ${{ vars.ccache_dir }}:${{ vars.ccache_dir }}
defaults:
run:
shell: bash
env:
CCACHE_DIR: ${{ vars.ccache_dir }}
steps:
- id: Checkout
name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GHA_PAT }}
- id: Checkout_Actions
name: Checkout_Actions
uses: actions/checkout@v3
with:
repository: project-tsurugi/tsurugi-github-actions
path: .github/actions
ref: master
submodules: recursive
token: ${{ secrets.GHA_PAT }}
- id: Install_limestone
name: Install_limestone
run: |
cd third_party/jogasaki/third_party/tateyama/third_party/sharksfin/third_party/shirakami/third_party/limestone
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_shirakami
name: Install_shirakami
run: |
cd third_party/jogasaki/third_party/tateyama/third_party/sharksfin/third_party/shirakami
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DBUILD_BENCHMARK=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_sharksfin
name: Install_sharksfin
run: |
cd third_party/jogasaki/third_party/tateyama/third_party/sharksfin
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DBUILD_EXAMPLES=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_takatori
name: Install_takatori
run: |
cd third_party/jogasaki/third_party/mizugaki/third_party/yugawara/third_party/takatori
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_hopscotch-map
name: Install_hopscotch-map
run: |
cd third_party/jogasaki/third_party/mizugaki/third_party/hopscotch-map
rm -rf ../../build-hopscotch-map
mkdir -p ../../build-hopscotch-map
cd ../../build-hopscotch-map
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ../third_party/hopscotch-map
cmake --build . --target install -- -j
- id: Install_yugawara
name: Install_yugawara
run: |
cd third_party/jogasaki/third_party/mizugaki/third_party/yugawara
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_shakujo
name: Install_shakujo
run: |
cd third_party/jogasaki/third_party/mizugaki/third_party/shakujo
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_mizugaki
name: Install_mizugaki
run: |
cd third_party/jogasaki/third_party/mizugaki
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local -DCMAKE_PREFIX_PATH="${{ matrix.additional_prefix_path }};${GITHUB_WORKSPACE}/.local" ..
cmake --build . --target install --clean-first -- -j
- id: Install_moodycamel_concurrentqueue
name: Install_moodycamel_concurrentqueue
run: |
cd third_party/jogasaki/third_party/concurrentqueue
rm -rf build_debug
mkdir -p build_debug
cd build_debug
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_tateyama_shirakami
name: Install_tateyama_shirakami
run: |
cd third_party/jogasaki/third_party/tateyama
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DSHARKSFIN_IMPLEMENTATION=shirakami -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local -DCMAKE_PREFIX_PATH="${{ matrix.additional_prefix_path }};${GITHUB_WORKSPACE}/.local" ..
cmake --build . --target install --clean-first -- -j
- id: Install_jogasaki
name: Install_jogasaki
run: |
cd third_party/jogasaki
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DSHARKSFIN_IMPLEMENTATION=shirakami -DBUILD_TESTS=OFF -DBUILD_DOCUMENTS=OFF -DBUILD_EXAMPLES=OFF -DPERFORMANCE_TOOLS=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_metadata-manager
name: Install_metadata-manager
run: |
cd third_party/ogawayama/third_party/metadata-manager
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DDATA_STORAGE=json -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_message-manager
name: Install_message-manager
run: |
cd third_party/ogawayama/third_party/message-manager
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DBUILD_TESTS=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: Install_ogawayama
name: Install_ogawayama
run: |
cd third_party/ogawayama
rm -rf build
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DSHARKSFIN_IMPLEMENTATION=shirakami -DBUILD_TESTS=OFF -DFORCE_INSTALL_RPATH=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/.local -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
cmake --build . --target install --clean-first -- -j
- id: CMake_Build
name: CMake_Build
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=${{ vars.compiler_launcher }} -DSHARKSFIN_IMPLEMENTATION=shirakami -DOGAWAYAMA=ON -DFORCE_INSTALL_RPATH=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/.local -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/.local ..
cmake --build . --target install --clean-first -- -j
- id: CTest
name: CTest
continue-on-error: false
env:
GTEST_OUTPUT: xml
ASAN_OPTIONS: detect_stack_use_after_return=true
run: |
cd build
export PATH=$PATH:${GITHUB_WORKSPACE}/.local/bin
for pid in `ps -ef | grep tateyama-server | grep -v grep | awk '{print $2}'`; do kill $pid; done
ctest --verbose
- id: Clang-Tidy
name: Clang-Tidy
run: |
python tools/bin/run-clang-tidy.py -quiet -export-fixes=build/clang-tidy-fix.yaml -p build -extra-arg=-Wno-unknown-warning-option -header-filter=$(pwd)'/(include|src)/.*\.h$' $(pwd)'/src/.*' 2>&1 | awk '!a[$0]++{print > "build/clang-tidy.log"}'
if: matrix.container-tag == 'ubuntu-22.04'
- id: Doxygen
name: Doxygen
run: |
cd build
make doxygen 2> >(tee doxygen-error.log)
if: matrix.container-tag == 'ubuntu-22.04'
- id: Generate_Annotations
name: Generate_Annotations
uses: ./.github/actions/tsurugi-annotations-action
if: always()
with:
matrix: ${{ toJson(matrix) }}
ctest_input: 'build*/**/*_gtest_result.xml'
- id: Notify_Slack
name: Notify_Slack
uses: ./.github/actions/tsurugi-slack-action
if: always() && (contains(github.ref, '/tags/') || contains(github.ref, '/pull/') || contains(github.ref, '/heads/master'))
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}
with:
kind: 'job-result'
channel: 'tsurugi-build'
status: ${{ job.status }}
step_context: ${{ toJson(steps) }}
username: ${{ github.workflow }}
Eisen:
uses: ./.github/workflows/eisen-integration-test.yml
if: (github.event.pull_request.draft == false) && (contains(github.ref, '/tags/') || contains(github.ref, '/pull/') || contains(github.ref, '/heads/master'))
needs: Build
secrets:
GHA_PAT: ${{ secrets.GHA_PAT }}
GHCR_PAT: ${{ secrets.GHCR_PAT }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}