Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add valgrind to ci #91

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading