Skip to content

Commit 8e44e26

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 8e44e26

2 files changed

Lines changed: 41 additions & 4 deletions

File tree

.github/workflows/memcheck.yml

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