Skip to content

Commit 147ead5

Browse files
committed
CI: add a Valgrind workflow
1 parent 85cacf6 commit 147ead5

File tree

5 files changed

+85
-0
lines changed

5 files changed

+85
-0
lines changed

.github/workflows/valgrind.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Valgrind
2+
on:
3+
workflow_dispatch:
4+
release:
5+
types: [created]
6+
push:
7+
paths:
8+
- src/*.[hc]
9+
pull_request:
10+
paths:
11+
- src/*.[hc]
12+
13+
concurrency:
14+
# Group by workflow and ref; the last component ensures that for pull
15+
# requests, we limit to 1 concurrent job, but for the main branch we don't
16+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
17+
# Only cancel intermediate pull request builds
18+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
19+
20+
jobs:
21+
test-valgrind:
22+
name: "Ubuntu / GAP stable-4.15 / valgrind"
23+
runs-on: ubuntu-latest
24+
env:
25+
NO_COVERAGE: true
26+
VALGRIND: valgrind --trace-children=yes --leak-check=full --error-exitcode=1
27+
steps:
28+
- uses: actions/checkout@v5
29+
- name: "Output g++ version . . ."
30+
run: g++ --version
31+
- name: "Install Valgrind . . ."
32+
run: sudo apt-get install valgrind
33+
- name: "Install GAP . . ."
34+
uses: gap-actions/setup-gap@v3
35+
with:
36+
gap-version: stable-4.15
37+
configflags: --enable-valgrind
38+
- name: "Build additional necessary GAP packages . . ."
39+
run: |
40+
cd ${GAPROOT}/pkg
41+
../bin/BuildPackages.sh --strict digraphs* io* orb* datastructures* profiling*
42+
- name: "Build Semigroups . . ."
43+
uses: gap-actions/build-pkg@v2
44+
with:
45+
CONFIGFLAGS: --disable-hpcombi
46+
- name: "Run SemigroupsTestInstall . . ."
47+
uses: gap-actions/run-pkg-tests@v4
48+
with:
49+
testfile: tst/github_actions/install.g
50+
pre-gap: ${{ env.VALGRIND }}
51+
coverage: false
52+
- name: "Run SemigroupsTestStandard . . ."
53+
uses: gap-actions/run-pkg-tests@v4
54+
with:
55+
testfile: tst/github_actions/standard.g
56+
pre-gap: ${{ env.VALGRIND }}
57+
coverage: false

tst/github_actions/examples.g

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
LoadPackage("semigroups", false);;
2+
if SEMIGROUPS.TestManualExamples() then
3+
QUIT_GAP(0);
4+
else
5+
QUIT_GAP(1);
6+
fi;
7+
FORCE_QUIT_GAP(1);

tst/github_actions/extreme.g

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
LoadPackage("semigroups", false);;
2+
if SemigroupsTestExtreme(rec(earlyStop := false)) then
3+
QUIT_GAP(0);
4+
else
5+
QUIT_GAP(1);
6+
fi;
7+
FORCE_QUIT_GAP(1);

tst/github_actions/install.g

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
LoadPackage("semigroups", false);;
2+
if SemigroupsTestInstall() then
3+
QUIT_GAP(0);
4+
else
5+
QUIT_GAP(1);
6+
fi;
7+
FORCE_QUIT_GAP(1);

tst/github_actions/standard.g

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
LoadPackage("semigroups", false);;
2+
if SemigroupsTestStandard(rec(earlyStop := false)) then
3+
QUIT_GAP(0);
4+
else
5+
QUIT_GAP(1);
6+
fi;
7+
FORCE_QUIT_GAP(1);

0 commit comments

Comments
 (0)