From 5a46541a0c18c5bcd33063674a0e1e6ae43a43e0 Mon Sep 17 00:00:00 2001 From: DURAND Malo Date: Sun, 5 May 2024 00:52:41 +0200 Subject: [PATCH] reverting deletiong of Docker, it was not the issue --- Dockerfile | 11 +++++++++++ action.yml | 7 ++----- docker-compose.yml | 13 +++++++++++++ valgrind.sh | 2 +- 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cdeac62 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:stable + +RUN apt update -y \ + && apt upgrade -y \ + && apt install -y build-essential valgrind + +WORKDIR /root/ + +COPY valgrind.sh /root/valgrind.sh + +ENTRYPOINT ["./valgrind.sh"] diff --git a/action.yml b/action.yml index 2610b81..4fd4c1e 100644 --- a/action.yml +++ b/action.yml @@ -30,8 +30,5 @@ inputs: default: false runs: - using: "composite" - steps: - - name: "Run Valgrind checker" - run: valgrind.sh - shell: bash + using: "docker" + image: "Dockerfile" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8e4753b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: "3.9" + +services: + valgrind-action: + build: + dockerfile: Dockerfile + context: . + image: valgrind-action + container_name: valgrind-tester + env_file: + - .env + volumes: + - ./:/root/ diff --git a/valgrind.sh b/valgrind.sh index 2eb86ca..c0f9ef6 100755 --- a/valgrind.sh +++ b/valgrind.sh @@ -52,7 +52,7 @@ parse_valgrind_reports() { while IFS= read -r line; do if [[ "${error}" != "" ]]; then if [[ $(echo "${line}" | grep '^==.*== $') && $(skip_criterion_pipe_leaks "${error}") == "1" ]]; then - echo "::${kind} title=Valgrind Report::${error}" >> annotations + echo "::${kind} title=Valgrind Report::${error}" error="" status=1 else