-
Notifications
You must be signed in to change notification settings - Fork 9
216 lines (210 loc) · 8.55 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
name: Presubmit
on: [push, pull_request]
jobs:
pre_job:
runs-on: ubuntu-latest
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"]'
babeltrace2:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build and cache Babeltrace2
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v3
id: babeltrace2
env:
cache-name: cache-babeltrace2
with:
path: ~/babeltrace2/2.0.4
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y gcc g++ lttng-tools liblttng-ust-dev ruby ruby-dev elfutils libelf-dev libdw-dev libprotobuf-dev protobuf-compiler
if: steps.babeltrace2.outputs.cache-hit != 'true'
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
if: steps.babeltrace2.outputs.cache-hit != 'true'
- run: wget https://www.efficios.com/files/babeltrace/babeltrace2-2.0.4.tar.bz2
if: steps.babeltrace2.outputs.cache-hit != 'true'
- run: tar -xjvf babeltrace2-2.0.4.tar.bz2
if: steps.babeltrace2.outputs.cache-hit != 'true'
- run: |
wget https://github.com/argonne-lcf/THAPI-spack/raw/main/packages/babeltrace2/d2d2e6cc.patch
wget https://github.com/argonne-lcf/THAPI-spack/raw/main/packages/babeltrace2/0db1832.patch
patch -p1 < d2d2e6cc.patch
patch -p1 < 0db1832.patch
if: steps.babeltrace2.outputs.cache-hit != 'true'
working-directory: babeltrace2-2.0.4
- run: mkdir -p babeltrace2-2.0.4/build
if: steps.babeltrace2.outputs.cache-hit != 'true'
- run: ../configure --prefix=$HOME/babeltrace2/2.0.4
if: steps.babeltrace2.outputs.cache-hit != 'true'
working-directory: babeltrace2-2.0.4/build
- run: make -j
if: steps.babeltrace2.outputs.cache-hit != 'true'
working-directory: babeltrace2-2.0.4/build
- run: make -j install
if: steps.babeltrace2.outputs.cache-hit != 'true'
working-directory: babeltrace2-2.0.4/build
build-and-check:
needs: [babeltrace2, pre_job]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build and Check ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: babeltrace2
env:
cache-name: cache-babeltrace2
with:
path: ~/babeltrace2/2.0.4
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y gcc g++ lttng-tools liblttng-ust-dev ruby ruby-dev elfutils libelf-dev libdw-dev libprotobuf-dev protobuf-compiler
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
- name: Load Babeltrace2
run: |
echo "$HOME/babeltrace2/2.0.4/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=$HOME/babeltrace2/2.0.4/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "CPATH=$HOME/babeltrace2/2.0.4/include:$CPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/babeltrace2/2.0.4/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/babeltrace2/2.0.4/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
- uses: actions/upload-artifact@v3
if: failure()
with:
name: build-and-check
path: |
build/**/*.log
build/config.log
build/**/tests/*.log
build-in-tree:
needs: [babeltrace2, pre_job]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build in Tree ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: babeltrace2
env:
cache-name: cache-babeltrace2
with:
path: ~/babeltrace2/2.0.4
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y gcc g++ lttng-tools liblttng-ust-dev ruby ruby-dev elfutils libelf-dev libdw-dev libprotobuf-dev protobuf-compiler
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
- name: Load Babeltrace2
run: |
echo "$HOME/babeltrace2/2.0.4/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=$HOME/babeltrace2/2.0.4/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "CPATH=$HOME/babeltrace2/2.0.4/include:$CPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/babeltrace2/2.0.4/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/babeltrace2/2.0.4/lib:$LIBRARY_PATH" >> $GITHUB_ENV
- run: ./autogen.sh
- run: ./configure
- run: make -j
- run: make check
- uses: actions/upload-artifact@v3
if: failure()
with:
name: build-in-tree
path: |
./**/*.log
./config.log
./**/tests/*.log
distcheck:
needs: [babeltrace2, pre_job]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Distcheck ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: babeltrace2
env:
cache-name: cache-babeltrace2
with:
path: ~/babeltrace2/2.0.4
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y gcc g++ lttng-tools liblttng-ust-dev ruby ruby-dev elfutils libelf-dev libdw-dev libprotobuf-dev protobuf-compiler
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
- name: Load Babeltrace2
run: |
echo "$HOME/babeltrace2/2.0.4/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=$HOME/babeltrace2/2.0.4/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "CPATH=$HOME/babeltrace2/2.0.4/include:$CPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/babeltrace2/2.0.4/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/babeltrace2/2.0.4/lib:$LIBRARY_PATH" >> $GITHUB_ENV
- run: mkdir -p build
- run: ./autogen.sh
- run: ../configure
working-directory: build
- run: make distcheck -j
working-directory: build
dist-check:
needs: [babeltrace2, pre_job]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Dist and Check ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: babeltrace2
env:
cache-name: cache-babeltrace2
with:
path: ~/babeltrace2/2.0.4
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: sudo apt update; sudo apt install -y gcc g++ lttng-tools liblttng-ust-dev ruby ruby-dev elfutils libelf-dev libdw-dev libprotobuf-dev protobuf-compiler
- run: sudo gem install cast-to-yaml nokogiri babeltrace2 opencl_ruby_ffi metababel
- name: Load Babeltrace2
run: |
echo "$HOME/babeltrace2/2.0.4/bin" >> $GITHUB_PATH
echo "PKG_CONFIG_PATH=$HOME/babeltrace2/2.0.4/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "CPATH=$HOME/babeltrace2/2.0.4/include:$CPATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/babeltrace2/2.0.4/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/babeltrace2/2.0.4/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: make -j check
run: |
cd `find . -type d -name "thapi-*"`
cd build
make -j check
working-directory: build
- uses: actions/upload-artifact@v3
if: failure()
with:
name: dist-check
path: |
build/**/*.log
build/config.log
build/**/tests/*.log