Skip to content

Commit a209d91

Browse files
ci: Install clang in CI workflows
* This will make the Makefile of repo simpler to do everyday development Signed-off-by: Mahendra Paipuri <mahendra.paipuri@gmail.com>
1 parent 099ead9 commit a209d91

File tree

5 files changed

+35
-8
lines changed

5 files changed

+35
-8
lines changed

.github/workflows/step_tests-e2e.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ jobs:
1717
with:
1818
go-version: 1.22.x
1919

20+
- name: Setup clang 18
21+
run: ./scripts/install_clang.sh
22+
2023
- name: Run e2e tests for Go packages
2124
run: make test-e2e
2225

.github/workflows/step_tests-unit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ jobs:
1717
with:
1818
go-version: 1.22.x
1919

20+
- name: Setup clang 18
21+
run: ./scripts/install_clang.sh
22+
2023
- name: Run checkmetrics and checkrules
2124
run: make checkmetrics checkrules
2225

pkg/collector/testdata/proc.ttar

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9233,6 +9233,24 @@ Node 0, zone DMA32 759 572 791 475 194 45 12 0
92339233
Node 0, zone Normal 4381 1093 185 1530 567 102 4 0 0 0 0
92349234
Mode: 644
92359235
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9236+
Path: proc/cgroups
9237+
Lines: 14
9238+
#subsys_name hierarchy num_cgroups enabled
9239+
cpuset 5 3 1
9240+
cpu 6 3 1
9241+
cpuacct 6 3 1
9242+
blkio 12 1 1
9243+
memory 7 123 1
9244+
devices 11 51 1
9245+
freezer 2 3 1
9246+
net_cls 4 3 1
9247+
perf_event 3 1 1
9248+
net_prio 4 3 1
9249+
hugetlb 8 1 1
9250+
pids 9 56 1
9251+
rdma 10 1 1
9252+
Mode: 664
9253+
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
92369254
Path: proc/cmdline
92379255
Lines: 1
92389256
BOOT_IMAGE=/vmlinuz-5.11.0-22-generic root=UUID=456a0345-450d-4f7b-b7c9-43e3241d99ad ro quiet splash vt.handoff=7

scripts/e2e-test.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ then
304304
--path.sysfs="pkg/collector/testdata/sys" \
305305
--path.cgroupfs="pkg/collector/testdata/sys/fs/cgroup" \
306306
--path.procfs="pkg/collector/testdata/proc" \
307+
--collector.cgroups.force-version="v1" \
307308
--collector.slurm \
308309
--collector.slurm.gpu-type="nvidia" \
309310
--collector.slurm.nvidia-smi-path="pkg/collector/testdata/nvidia-smi" \
310-
--collector.slurm.force-cgroups-version="v1" \
311311
--collector.slurm.gpu-job-map-path="pkg/collector/testdata/gpujobmap" \
312312
--collector.ipmi.dcmi.cmd="pkg/collector/testdata/ipmi/freeipmi/ipmi-dcmi" \
313313
--collector.empty-hostname-label \
@@ -321,11 +321,11 @@ then
321321
--path.sysfs="pkg/collector/testdata/sys" \
322322
--path.cgroupfs="pkg/collector/testdata/sys/fs/cgroup" \
323323
--path.procfs="pkg/collector/testdata/proc" \
324+
--collector.cgroups.force-version="v1" \
325+
--collector.cgroup.active-subsystem="memory" \
324326
--collector.slurm \
325-
--collector.slurm.cgroups-v1-subsystem="memory" \
326327
--collector.slurm.gpu-type="nvidia" \
327328
--collector.slurm.nvidia-smi-path="pkg/collector/testdata/nvidia-smi" \
328-
--collector.slurm.force-cgroups-version="v1" \
329329
--collector.slurm.gpu-job-map-path="pkg/collector/testdata/gpujobmap" \
330330
--collector.ipmi.dcmi.cmd="pkg/collector/testdata/ipmi/freeipmi/ipmi-dcmi" \
331331
--collector.empty-hostname-label \
@@ -339,10 +339,10 @@ then
339339
--path.sysfs="pkg/collector/testdata/sys" \
340340
--path.cgroupfs="pkg/collector/testdata/sys/fs/cgroup" \
341341
--path.procfs="pkg/collector/testdata/proc" \
342+
--collector.cgroups.force-version="v2" \
342343
--collector.slurm \
343344
--collector.slurm.gpu-type="nvidia" \
344345
--collector.slurm.nvidia-smi-path="pkg/collector/testdata/nvidia-smi" \
345-
--collector.slurm.force-cgroups-version="v2" \
346346
--collector.slurm.gpu-job-map-path="pkg/collector/testdata/gpujobmap" \
347347
--collector.empty-hostname-label \
348348
--web.listen-address "127.0.0.1:${port}" \
@@ -355,10 +355,10 @@ then
355355
--path.sysfs="pkg/collector/testdata/sys" \
356356
--path.cgroupfs="pkg/collector/testdata/sys/fs/cgroup" \
357357
--path.procfs="pkg/collector/testdata/proc" \
358+
--collector.cgroups.force-version="v2" \
358359
--collector.slurm \
359360
--collector.slurm.gpu-type="amd" \
360361
--collector.slurm.rocm-smi-path="pkg/collector/testdata/rocm-smi" \
361-
--collector.slurm.force-cgroups-version="v2" \
362362
--collector.slurm.gpu-job-map-path="pkg/collector/testdata/gpujobmap" \
363363
--collector.empty-hostname-label \
364364
--web.listen-address "127.0.0.1:${port}" \
@@ -371,8 +371,8 @@ then
371371
--path.sysfs="pkg/collector/testdata/sys" \
372372
--path.cgroupfs="pkg/collector/testdata/sys/fs/cgroup" \
373373
--path.procfs="pkg/collector/testdata/proc" \
374+
--collector.cgroups.force-version="v2" \
374375
--collector.slurm \
375-
--collector.slurm.force-cgroups-version="v2" \
376376
--collector.empty-hostname-label \
377377
--web.listen-address "127.0.0.1:${port}" \
378378
--web.disable-exporter-metrics \
@@ -384,10 +384,10 @@ then
384384
--path.sysfs="pkg/collector/testdata/sys" \
385385
--path.cgroupfs="pkg/collector/testdata/sys/fs/cgroup" \
386386
--path.procfs="pkg/collector/testdata/proc" \
387+
--collector.cgroups.force-version="v2" \
387388
--collector.slurm \
388389
--collector.slurm.gpu-type="nvidia" \
389390
--collector.slurm.nvidia-smi-path="pkg/collector/testdata/nvidia-smi" \
390-
--collector.slurm.force-cgroups-version="v2" \
391391
--collector.ipmi.dcmi.cmd="pkg/collector/testdata/ipmi/ipmiutils/ipmiutil" \
392392
--collector.empty-hostname-label \
393393
--web.listen-address "127.0.0.1:${port}" \
@@ -400,10 +400,10 @@ then
400400
--path.sysfs="pkg/collector/testdata/sys" \
401401
--path.cgroupfs="pkg/collector/testdata/sys/fs/cgroup" \
402402
--path.procfs="pkg/collector/testdata/proc" \
403+
--collector.cgroups.force-version="v2" \
403404
--collector.slurm \
404405
--collector.slurm.gpu-type="amd" \
405406
--collector.slurm.rocm-smi-path="pkg/collector/testdata/rocm-smi" \
406-
--collector.slurm.force-cgroups-version="v2" \
407407
--collector.slurm.gpu-job-map-path="pkg/collector/testdata/gpujobmap" \
408408
--collector.slurm.swap.memory.metrics \
409409
--collector.slurm.psi.metrics \

scripts/install_clang.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/bin/bash
22
set -exo pipefail
33

4+
# This script only works for Ubuntu derivates and it is meant to be
5+
# used in CI to install clang in golang builder containers.
6+
47
# Check if clang exists. If it exists, we need to ensure that it
58
# is at least of version >= 18
69
if [ -x "$(command -v clang)" ]; then

0 commit comments

Comments
 (0)