-
Notifications
You must be signed in to change notification settings - Fork 9
325 lines (316 loc) · 12.1 KB
/
presubmit.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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
name: Presubmit
on: [push, pull_request]
env:
APT_PACKAGE: gcc g++ ruby ruby-dev elfutils libelf-dev libpopt-dev libdw-dev libprotobuf-dev protobuf-compiler valgrind libglib2.0-dev libnuma-dev liburcu-dev
jobs:
pre_job:
runs-on: ubuntu-24.04
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md"]'
do_not_skip: '["pull_request"]'
efficios_dep:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build and Cache Efficios Dependencies
runs-on: ubuntu-24.04
steps:
- uses: actions/cache@v4
id: efficios_dep
env:
cache-name: cache-efficios_dep
with:
path: ~/efficios_dep/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Set PKG_CONFIG
run: |
echo "PKG_CONFIG_PATH=$HOME/efficios_dep/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
if: steps.efficios_dep.outputs.cache-hit != 'true'
- run: sudo apt update; sudo apt install -y $APT_PACKAGE
if: steps.efficios_dep.outputs.cache-hit != 'true'
# lttng-ust
- run: git clone https://github.com/lttng/lttng-ust
if: steps.efficios_dep.outputs.cache-hit != 'true'
- name: Install lttng-ust
run: |
# Avoid https://github.com/lttng/lttng-ust/commit/b187bcd5d99cde54dececee0e5028524d55aa314 who change the signature of
# lttng_ust_ctl_recv_register_event used by lttng-tool anl-ms3
git checkout 4f8afc535e77070f1ef00434674f0417c6f9ef69
./bootstrap
./configure --disable-man-pages --prefix=$HOME/efficios_dep/
make -j$(nproc)
make install
working-directory: lttng-ust
if: steps.efficios_dep.outputs.cache-hit != 'true'
# lttng-tools need lttng-ust 2.14+
- run: git clone -b anl-ms3 git://git.efficios.com/deliverable/lttng-tools.git
if: steps.efficios_dep.outputs.cache-hit != 'true'
- name: Install lttng-tools
run: |
./bootstrap
./configure --disable-man-pages --disable-bin-lttng-crash --prefix=$HOME/efficios_dep
make -j$(nproc)
make install
#Todo, this will need to be added in the spack repo as a patch
echo "#!/usr/bin/env python"| cat - dirwatch.py > $HOME/efficios_dep/bin/dirwatch.py
chmod 755 $HOME/efficios_dep/bin/dirwatch.py
working-directory: lttng-tools
if: steps.efficios_dep.outputs.cache-hit != 'true'
# babeltrace
- run: git clone -b anl-ms3 git://git.efficios.com/deliverable/babeltrace.git
if: steps.efficios_dep.outputs.cache-hit != 'true'
- name: Install Babeltrace
run: |
#Todo, grab file from Spack
wget https://raw.githubusercontent.com/argonne-lcf/THAPI/53262fcaaaf45d7d475884d7e63b69abe47e41d6/.github/workflows/str_nullptr.patch
patch -p1 < str_nullptr.patch
wget https://raw.githubusercontent.com/argonne-lcf/THAPI/4418916620496fd66cde0b3d5e241bed0a4c18a3/.github/workflows/bt_makefile.patch
patch -p1 < bt_makefile.patch
./bootstrap
./configure --disable-man-pages --prefix=$HOME/efficios_dep
make -j$(nproc)
make install
working-directory: babeltrace
if: steps.efficios_dep.outputs.cache-hit != 'true'
build-and-check:
needs: [efficios_dep, pre_job]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build and Check ubuntu-24.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: efficios_dep
env:
cache-name: cache-efficios_dep
with:
path: ~/efficios_dep/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y $APT_PACKAGE
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
- name: Load Babeltrace2
run: |
echo "$HOME/efficios_dep/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=$HOME/efficios_dep/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "CPATH=$HOME/efficios_dep/include:$CPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/efficios_dep/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/efficios_dep/lib:$LIBRARY_PATH" >> $GITHUB_ENV
- run: mkdir -p build
- run: ./autogen.sh
- run: ../configure
working-directory: build
- run: make -j
working-directory: build
- run: make check
working-directory: build
env:
THAPI_VALGRIND: 1
- uses: actions/upload-artifact@v3
if: failure()
with:
name: build-and-check
path: |
build/**/*.log
build/config.log
build/**/tests/*.log
install-with-mpi:
needs: [efficios_dep, pre_job]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Install with MPI daemon support
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: mpi4py/setup-mpi@v1
with:
mpi: intelmpi
- uses: actions/cache@v4
id: efficios_dep
env:
cache-name: cache-efficios_dep
with:
path: ~/efficios_dep/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y $APT_PACKAGE
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
- name: Load Babeltrace2
run: |
echo "$HOME/efficios_dep/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=$HOME/efficios_dep/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "CPATH=$HOME/efficios_dep/include:$CPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/efficios_dep/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/efficios_dep/lib:$LIBRARY_PATH" >> $GITHUB_ENV
- run: mkdir -p build
- run: ./autogen.sh
- run: ../configure --prefix=`pwd`/ici
working-directory: build
- run: make -j install
working-directory: build
- name: Tar THAPI # https://github.com/actions/download-artifact?tab=readme-ov-file#permission-loss
run: tar -cvf thapi.tar ./build/ici/
- uses: actions/upload-artifact@v4
with:
name: thapi-bin
path: thapi.tar
integration-tests:
needs: [efficios_dep, pre_job, install-with-mpi]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Integration ${{ matrix.bats_file }} ${{matrix.thapi_sync_daemon }}
runs-on: ubuntu-24.04
env:
THAPI_TEST_BIN: clinfo
THAPI_BIN_DIR: ./build/ici/bin
steps:
- uses: actions/checkout@v4
- uses: mpi4py/setup-mpi@v1
with:
mpi: intelmpi
- uses: actions/cache@v4
id: efficios_dep
env:
cache-name: cache-efficios_dep
with:
path: ~/efficios_dep/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- uses: actions/download-artifact@v4
with:
name: thapi-bin
- name: Untar THAPI
run: tar -xvf thapi.tar
- run: sudo apt update; sudo apt install -y $APT_PACKAGE bats coreutils libpocl2 clinfo
- run: sudo gem install babeltrace2 opencl_ruby_ffi
- name: Load Efficios Dependencies
run: |
echo "$HOME/efficios_dep/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$HOME/efficios_dep/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Integration test
run: |
bats integration_tests/
build-in-tree-and-check:
needs: [efficios_dep, pre_job]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build in Tree ubuntu-24.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: efficios_dep
env:
cache-name: cache-efficios_dep
with:
path: ~/efficios_dep/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y $APT_PACKAGE
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
- name: Load Efficios Dependencies
run: |
echo "$HOME/efficios_dep/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=$HOME/efficios_dep/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "CPATH=$HOME/efficios_dep/include:$CPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/efficios_dep/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/efficios_dep/lib:$LIBRARY_PATH" >> $GITHUB_ENV
- run: ./autogen.sh
- run: ./configure
- run: make -j
- run: make check
env:
THAPI_VALGRIND: 1
- uses: actions/upload-artifact@v3
if: failure()
with:
name: build-in-tree
path: |
./**/*.log
./config.log
./**/tests/*.log
distcheck:
needs: [efficios_dep, pre_job]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Distcheck ubuntu-24.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: efficios_dep
env:
cache-name: cache-efficios_dep
with:
path: ~/efficios_dep/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y $APT_PACKAGE
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
- name: Load Efficios Dependencies
run: |
echo "$HOME/efficios_dep/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=$HOME/efficios_dep/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "CPATH=$HOME/efficios_dep/include:$CPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/efficios_dep/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/efficios_dep/lib:$LIBRARY_PATH" >> $GITHUB_ENV
- run: mkdir -p build
- run: ./autogen.sh
- run: ../configure
working-directory: build
- run: make distcheck -j
working-directory: build
env:
THAPI_VALGRIND: 1
dist-check:
needs: [efficios_dep, pre_job]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Dist and Check ubuntu-24.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: efficios_dep
env:
cache-name: cache-efficios_dep
with:
path: ~/efficios_dep/
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y $APT_PACKAGE
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
- name: Load Efficios Dependencie
run: |
echo "$HOME/efficios_dep/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=$HOME/efficios_dep/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "CPATH=$HOME/efficios_dep/include:$CPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/efficios_dep/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/efficios_dep/lib:$LIBRARY_PATH" >> $GITHUB_ENV
- run: mkdir -p build
- run: ./autogen.sh
- run: ../configure
working-directory: build
- run: make dist
working-directory: build
- name: Extract
run: tar -xzvf thapi-*
working-directory: build
- name: Configure
run: |
cd `find . -type d -name "thapi-*"`
mkdir -p build
cd build
../configure
working-directory: build
- name: Check
run: |
cd `find . -type d -name "thapi-*"`
cd build
make -j check
working-directory: build
env:
THAPI_VALGRIND: 1
- uses: actions/upload-artifact@v3
if: failure()
with:
name: dist-check
path: |
build/**/*.log
build/config.log
build/**/tests/*.log