Skip to content

Commit a4647e6

Browse files
committed
fixed #500 - added callgrind step to CI
1 parent 012b941 commit a4647e6

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
@@ -111,3 +111,22 @@ jobs:
111111
run: |
112112
make clean
113113
make -j$(nproc) test selfcheck CXXOPTS="-Werror -O2 -g3 -stdlib=libc++ -fsanitize=memory" LDOPTS="-lc++ -fsanitize=memory"
114+
115+
- name: Run callgrind
116+
if: matrix.os == 'ubuntu-24.04'
117+
run: |
118+
wget https://github.com/danmar/simplecpp/archive/refs/tags/1.5.1.tar.gz
119+
tar xvf 1.5.1.tar.gz
120+
make clean
121+
make -j$(nproc) CXXOPTS="-O2 -g3"
122+
valgrind --tool=callgrind ./simplecpp -e simplecpp-1.5.1/simplecpp.cpp 2>callgrind.log || (cat callgrind.log && false)
123+
cat callgrind.log
124+
callgrind_annotate --auto=no > callgrind.annotated.log
125+
head -50 callgrind.annotated.log
126+
127+
- uses: actions/upload-artifact@v4
128+
if: matrix.os == 'ubuntu-24.04'
129+
with:
130+
name: Callgrind Output - ${{ matrix.compiler }}
131+
path: |
132+
./callgrind.*

0 commit comments

Comments
 (0)