Skip to content

Commit

Permalink
Setup Valgrind on GHA [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
acgetchell committed Nov 28, 2023
1 parent 9da2499 commit 470ff3f
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:

- name: Setup
run: |
rm /usr/local/bin/2to3
rm /usr/local/bin/2to3-3.11
rm /usr/local/bin/idle3
rm /usr/local/bin/idle3.11
rm /usr/local/bin/pydoc3
rm /usr/local/bin/pydoc3.11
rm /usr/local/bin/python3
rm /usr/local/bin/python3.11
rm /usr/local/bin/python3-config
rm /usr/local/bin/python3.11-config
# rm /usr/local/bin/2to3
# rm /usr/local/bin/2to3-3.11
# rm /usr/local/bin/idle3
# rm /usr/local/bin/idle3.11
# rm /usr/local/bin/pydoc3
# rm /usr/local/bin/pydoc3.11
# rm /usr/local/bin/python3
# rm /usr/local/bin/python3.11
# rm /usr/local/bin/python3-config
# rm /usr/local/bin/python3.11-config
brew install automake autoconf autoconf-archive libtool texinfo yasm ninja python ccache pkg-config

- name: Restore artifacts or setup vcpkg
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Valgrind

on: [workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- name: Setup
run: |
sudo apt update
sudo apt-get install build-essential automake autoconf autoconf-archive texinfo libtool-bin yasm ninja-build ccache
- name: Setup GCC
uses: pkgxdev/setup@v1
with:
+: gcc@13

- run: gcc --version

- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 2a01db703fec3cdd13ca884a6a84d1505df2d235

- name: Configure
run: cmake --preset=valgrind

- name: Build
run: cmake --build build -j 2

- name: Run Valgrind
working-directory: build
continue-on-error: true
run: |
ctest -VV -T memcheck --verbose
cd src
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ./initialize --s n32000 -t11 -o
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ./cdt-opt
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose ./cdt --s -n64 -t3 -a.6 -k1.1 -l.1 -p10
14 changes: 14 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,20 @@
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
},
{
"name": "valgrind",
"inherits": "ci-std",
"description": "This preset is used for valgrind builds",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"ENABLE_VALGRIND": true,
"ENABLE_TESTING": true,
"ENABLE_CACHE": "OFF"
}
},
{
"name": "conf-common",
"description": "General settings that apply to all configurations",
Expand Down

0 comments on commit 470ff3f

Please sign in to comment.