Skip to content

Commit

Permalink
Merge pull request #91 from imahjoub/add-valgrind-to-ci
Browse files Browse the repository at this point in the history
add valgrind to ci
  • Loading branch information
imahjoub authored Jul 26, 2023
2 parents 0c4d64d + 890d719 commit f987037
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/hash_sha256.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -----------------------------------------------------
# Copyright Iliass Mahjoub 2022 - 2023.
# Distributed under the Boost Software License,
# Copyright Iliass Mahjoub 2022 - 2023.
# Distributed under the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
# or copy at http://www.boost.org/LICENSE_1_0.txt)
# -----------------------------------------------------

name: hash_sha256
Expand Down Expand Up @@ -132,3 +132,29 @@ jobs:
echo "qemu_result" "$qemu_result"
echo "qemu_result" "$qemu_result" | grep 'qemu_result 0'
working-directory: .
valgrind-check:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
standard: [ c++2a ]
compiler: [ g++-12]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: update-tools
run: sudo apt-get install g++-12 valgrind
- name: valgrind-check
run: |
echo "+++ compile"
${{ matrix.compiler }} -v
${{ matrix.compiler }} -m64 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -O3 -std=${{ matrix.standard }} hash_sha256_test.cpp -DHASH_HASH256_PC -I. -o hash_sha256.exe
echo "+++ run valgrind"
valgrind --leak-check=yes --log-file=hash_sha256_valgrind.txt ./hash_sha256.exe
grep '0 bytes in 0 blocks' hash_sha256_valgrind.txt
grep '0 errors from 0 contexts' hash_sha256_valgrind.txt

0 comments on commit f987037

Please sign in to comment.