-
Notifications
You must be signed in to change notification settings - Fork 163
Expand file tree
/
Copy pathrocprofiler-register-continuous-integration.yml
More file actions
240 lines (221 loc) · 8.21 KB
/
rocprofiler-register-continuous-integration.yml
File metadata and controls
240 lines (221 loc) · 8.21 KB
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
name: rocprofiler-register Continuous Integration
on:
push:
branches:
- develop
paths:
- 'projects/rocprofiler-register/**'
- '.github/workflows/rocprofiler-register-continuous-integration.yml'
- '!**/*.md'
- '!**/*.rtf'
- '!**/*.rst'
- '!**/.markdownlint-ci2.yaml'
- '!**/.readthedocs.yaml'
- '!**/.spellcheck.local.yaml'
- '!**/.wordlist.txt'
pull_request:
paths:
- 'projects/rocprofiler-register/**'
- '.github/workflows/rocprofiler-register-continuous-integration.yml'
- '!**/*.md'
- '!**/*.rtf'
- '!**/*.rst'
- '!**/.markdownlint-ci2.yaml'
- '!**/.readthedocs.yaml'
- '!**/.spellcheck.local.yaml'
- '!**/.wordlist.txt'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
strategy:
fail-fast: false
matrix:
compiler: ['clang-14', 'clang-15', 'gcc-11', 'gcc-12']
ci-args: ['']
ci-tag: ['']
include:
- compiler: 'gcc-12'
ci-args: '--coverage'
ci-tag: '-codecov'
- compiler: 'clang-15'
ci-args: '--linter clang-tidy'
ci-tag: '-clang-tidy'
- compiler: 'clang-13'
ci-args: ''
ci-tag: ''
- compiler: 'gcc-12'
ci-args: '--memcheck ThreadSanitizer'
ci-tag: '-thread-sanitizer'
- compiler: 'gcc-12'
ci-args: '--memcheck AddressSanitizer'
ci-tag: '-address-sanitizer'
- compiler: 'gcc-12'
ci-args: '--memcheck LeakSanitizer'
ci-tag: '-leak-sanitizer'
# - compiler: 'gcc-12'
# ci-args: '--memcheck UndefinedBehaviorSanitizer'
# ci-tag: '-undefined-behavior-sanitizer'
runs-on: linux-mi325-1gpu-ossci-rocm
container:
image: docker.io/rocm/rocprofiler-private:ubuntu-22.04-gfx94X-latest
credentials:
username: ${{ secrets.ROCPROFILER_AZURE_CI_USER }}
password: ${{ secrets.ROCPROFILER_AZURE_CI_PASS }}
options: --privileged --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
env:
BUILD_TYPE: RelWithDebInfo
INSTALL_PREFIX: /opt/rocprofiler-register
PACKAGING_INSTALL_PREFIX: /opt/rocm
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
PATH: /usr/bin:$PATH
steps:
- name: Install Latest Nightly ROCm
shell: bash
working-directory: /tmp
run: |
tar -xf ${{ env.PACKAGING_INSTALL_PREFIX }}-gfx94X.tar.gz -C ${{ env.PACKAGING_INSTALL_PREFIX }}
echo "ROCm installed to: ${{ env.PACKAGING_INSTALL_PREFIX }}"
- name: Setup Git
shell: bash
run: |
apt-get update
apt-get install -y software-properties-common
add-apt-repository ppa:git-core/ppa
apt update
apt install -y git
- uses: actions/checkout@v5
with:
sparse-checkout: projects/rocprofiler-register
submodules: true
set-safe-directory: true
- name: Install Packages
timeout-minutes: 25
run: |
cd projects/rocprofiler-register
CC=${{ matrix.compiler }} &&
CXX=$(echo ${{ matrix.compiler }} | sed 's/clang-/clang++-/1' | sed 's/gcc-/g++-/1') &&
apt-get update &&
apt-get install -y build-essential python3 environment-modules ${{ matrix.compiler }} ${CXX} &&
update-alternatives --install /usr/bin/cc cc /usr/bin/${CC} 100 &&
update-alternatives --install /usr/bin/c++ c++ /usr/bin/${CXX} 100 &&
python3 -m pip install --upgrade pip &&
python3 -m pip install 'cmake==3.22.0' &&
python3 -m pip install -r requirements.txt
- name: Setup GCov
timeout-minutes: 25
if: ${{ matrix.compiler == 'gcc-12' }}
run: |
cd projects/rocprofiler-register
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-12 100
- name: Setup Clang-Tidy
timeout-minutes: 25
if: ${{ matrix.compiler == 'clang-15' }}
run: |
cd projects/rocprofiler-register
apt-get install -y clang-tidy-15
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15 100
- name: Configure, Build, and Test
timeout-minutes: 115
shell: bash
working-directory: projects/rocprofiler-register
run:
python3 ./scripts/run-ci.py -B build
--name ${{ github.repository_owner }}-${{ github.ref_name }}-azure-mi300x-${{ matrix.compiler }}${{ matrix.ci-tag }}
--build-jobs 2
--site GitHub
${{ matrix.ci-args }}
--disable-cdash
--
-DCMAKE_C_COMPILER=/usr/bin/cc
-DCMAKE_CXX_COMPILER=/usr/bin/c++
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PREFIX }}
-DROCPROFILER_REGISTER_BUILD_TESTS=ON
-DROCPROFILER_REGISTER_BUILD_SAMPLES=ON
--
-VV
- name: Install
timeout-minutes: 10
working-directory: projects/rocprofiler-register
run:
cmake --build build --target install --parallel 2
- name: CPack and Install
working-directory: projects/rocprofiler-register
run: |
cd build
cpack -G STGZ
rm -rf ${{ env.PACKAGING_INSTALL_PREFIX }}/lib/*rocprofiler-register* \
${{ env.PACKAGING_INSTALL_PREFIX }}/lib/cmake/*rocprofiler-register* \
${{ env.PACKAGING_INSTALL_PREFIX }}/share/*rocprofiler-register* \
${{ env.PACKAGING_INSTALL_PREFIX }}/libexec/*rocprofiler-register* \
${{ env.PACKAGING_INSTALL_PREFIX }}/include/rocprofiler-register
mkdir -p ${{ env.PACKAGING_INSTALL_PREFIX }}
./rocprofiler-register-*-Linux.sh --prefix=${{ env.PACKAGING_INSTALL_PREFIX }} --exclude-subdir --skip-license
ls -lah ${{ env.PACKAGING_INSTALL_PREFIX }}/lib
- name: Test Installed Packages
if: ${{ contains(matrix.compiler, 'clang-15') }}
timeout-minutes: 10
shell: bash
run: |
cd projects/rocprofiler-register
CMAKE_PREFIX_PATH=/opt/rocm cmake -B build-tests-deb
cmake --build build-tests-deb --target all --parallel 16
export PATH=${{ env.PACKAGING_INSTALL_PREFIX }}/bin:$PATH
export LD_LIBRARY_PATH=${{ env.PACKAGING_INSTALL_PREFIX }}/lib:$LD_LIBRARY_PATH
ctest --test-dir build-tests-deb --output-on-failure
- name: Test Install Modulefile
timeout-minutes: 15
shell: bash
run: |
cd projects/rocprofiler-register
set -v
source /usr/share/modules/init/$(basename ${SHELL})
module use ${{ env.INSTALL_PREFIX }}/share/modulefiles
module avail
module load rocprofiler-register
pushd tests
BUILD_DIR=${PWD}/build-rocp-reg-modulefile
cmake -B ${BUILD_DIR} .
cmake --build ${BUILD_DIR} --target all
rm -rf ${BUILD_DIR}
- name: Test Install Setup Env
timeout-minutes: 15
shell: bash
run: |
cd projects/rocprofiler-register
set -v
source ${{ env.INSTALL_PREFIX }}/share/rocprofiler-register/setup-env.sh
pushd samples/library-implementation
BUILD_DIR=${PWD}/build-rocp-reg-setup-env
cmake -B ${BUILD_DIR} .
cmake --build ${BUILD_DIR} --target all
rm -rf ${BUILD_DIR}
- name: Test Install CPack Modulefile
timeout-minutes: 15
shell: bash
run: |
cd projects/rocprofiler-register
set -v
source /usr/share/modules/init/$(basename ${SHELL})
module use ${{ env.PACKAGING_INSTALL_PREFIX }}/share/modulefiles
module avail
module load rocprofiler-register
pushd tests
BUILD_DIR=${PWD}/build-rocp-reg-modulefile-cpack
cmake -B ${BUILD_DIR} .
cmake --build ${BUILD_DIR} --target all
rm -rf ${BUILD_DIR}
- name: Test Install CPack Setup Env
timeout-minutes: 15
shell: bash
run: |
cd projects/rocprofiler-register
set -v
source ${{ env.PACKAGING_INSTALL_PREFIX }}/share/rocprofiler-register/setup-env.sh
pushd samples/library-implementation
BUILD_DIR=${PWD}/build-rocp-reg-setup-env-cpack
cmake -B ${BUILD_DIR} .
cmake --build ${BUILD_DIR} --target all
rm -rf ${BUILD_DIR}