Skip to content

Commit cbe0e13

Browse files
kanard38knard38
authored andcommitted
DAOS-18626 cq: Add memcheck GitHub Workflow
Add GitHub workflow building instrumented DAOS with the libasan address sanitizer. Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@hpe.com>
1 parent d55330e commit cbe0e13

2 files changed

Lines changed: 48 additions & 4 deletions

File tree

.github/workflows/memcheck.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Memory Usage Checking
2+
3+
# on:
4+
# pull_request:
5+
workflow_dispatch:
6+
inputs:
7+
logLevel:
8+
description: 'Log level'
9+
required: true
10+
default: 'info'
11+
12+
permissions: {}
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build-daos_asan:
20+
name: Build DAOS with Address Sanitizer
21+
if: github.repository == 'daos-stack/daos'
22+
runs-on: [self-hosted, docker]
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
with:
27+
submodules: 'recursive'
28+
- name: Build deps in Docker
29+
run: docker build . --file utils/docker/Dockerfile.el.9
30+
--build-arg COMPILER=clang
31+
--build-arg SANITIZERS=address
32+
--build-arg DAOS_BUILD=no
33+
--build-arg DEPS_JOBS=50
34+
- name: Build daos in Docker
35+
run: docker build . --file utils/docker/Dockerfile.el.9
36+
--build-arg COMPILER=clang
37+
--build-arg SANITIZERS=address
38+
--build-arg DEPS_JOBS=50
39+
--build-arg DAOS_KEEP_SRC=yes
40+
--build-arg DAOS_TARGET_TYPE=debug
41+
--build-arg DAOS_JAVA_BUILD=no
42+
--tag gha-amd-${{github.run_id}}-${{github.run_attempt}}

utils/docker/Dockerfile.el.9

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright 2022-2024 Intel Corporation
22
# Copyright 2025 Google LLC
3-
# Copyright 2025 Hewlett Packard Enterprise Development LP
3+
# Copyright 2025-2026 Hewlett Packard Enterprise Development LP
44
# All rights reserved.
55
#
66
# 'recipe' for Docker to build an image of EL 9 based
@@ -146,15 +146,17 @@ COPY --chown=daos_server:daos_server utils/completion utils/completion
146146

147147
# select compiler to use
148148
ARG COMPILER=gcc
149+
ARG SANITIZERS
149150
ARG JOBS=$DEPS_JOBS
150151
ARG DAOS_BUILD_TYPE=$DAOS_TARGET_TYPE
151152
ARG DAOS_BUILD=$DAOS_DEPS_BUILD
152153

153154
# Build DAOS
154155
RUN [ "$DAOS_BUILD" != "yes" ] || { \
155-
scons --jobs $JOBS install PREFIX=/opt/daos COMPILER=$COMPILER \
156-
FIRMWARE_MGMT=1 BUILD_TYPE=$DAOS_BUILD_TYPE \
157-
TARGET_TYPE=$DAOS_TARGET_TYPE && \
156+
scons --jobs $JOBS install PREFIX=/opt/daos COMPILER=$COMPILER \
157+
SANITIZERS=$SANITIZERS FIRMWARE_MGMT=1 \
158+
BUILD_TYPE=$DAOS_BUILD_TYPE TARGET_TYPE=$DAOS_TARGET_TYPE \
159+
&& \
158160
([ "$DAOS_KEEP_BUILD" != "no" ] || /bin/rm -rf build) && \
159161
go clean -cache && \
160162
cp -r utils/config/examples /opt/daos; \

0 commit comments

Comments
 (0)