Skip to content

Commit 0689d83

Browse files
authored
fixed danmar#500 - added callgrind step to CI (danmar#501)
1 parent 9db6a20 commit 0689d83

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/CI-unixish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,22 @@ jobs:
120120
run: |
121121
make clean
122122
make -j$(nproc) test selfcheck CXXOPTS="-Werror -O2 -g3 -stdlib=libc++ -fsanitize=memory" LDOPTS="-lc++ -fsanitize=memory"
123+
124+
- name: Run callgrind
125+
if: matrix.os == 'ubuntu-24.04'
126+
run: |
127+
wget https://github.com/danmar/simplecpp/archive/refs/tags/1.5.1.tar.gz
128+
tar xvf 1.5.1.tar.gz
129+
make clean
130+
make -j$(nproc) CXXOPTS="-O2 -g3"
131+
valgrind --tool=callgrind ./simplecpp -e simplecpp-1.5.1/simplecpp.cpp 2>callgrind.log || (cat callgrind.log && false)
132+
cat callgrind.log
133+
callgrind_annotate --auto=no > callgrind.annotated.log
134+
head -50 callgrind.annotated.log
135+
136+
- uses: actions/upload-artifact@v4
137+
if: matrix.os == 'ubuntu-24.04'
138+
with:
139+
name: Callgrind Output - ${{ matrix.compiler }}
140+
path: |
141+
./callgrind.*

0 commit comments

Comments
 (0)