summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorEmanuele Torre <torreemanuele6@gmail.com>2023-07-14 02:44:13 +0200
committerEmanuele Torre <torreemanuele6@gmail.com>2023-07-15 01:29:13 +0200
commitbf4390562faee46f0fc29e9d2fc7d0376ee6c1f0 (patch)
tree1121ad05b9d98cf43f1a0934e1a51ecafef0642b /.github
parent24871fb4a384d65683c6dae5c095ac2405fb3675 (diff)
Add workflow that runs tests with valgrind on linux
To hopefully detect when we introduce new memory leaks. :-)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/valgrind.yml42
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml
new file mode 100644
index 00000000..d4ef744b
--- /dev/null
+++ b/.github/workflows/valgrind.yml
@@ -0,0 +1,42 @@
+name: valgrind
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+
+jobs:
+ linux:
+ runs-on: ubuntu-22.04
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Install packages
+ run: |
+ sudo apt-get update
+ sudo apt-get upgrade
+ sudo apt-get install -y automake autoconf libtool valgrind
+ - name: Build
+ run: |
+ autoreconf -i
+ ./configure \
+ --disable-maintainer-mode \
+ --disable-docs \
+ --with-oniguruma=builtin
+ make -j"$(nproc)"
+ file ./jq
+ - name: Test
+ run: |
+ make check
+ git diff --exit-code
+ - name: Upload Test Logs
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v3
+ with:
+ name: test-logs-valgrind-linux
+ retention-days: 7
+ path: |
+ test-suite.log
+ tests/*.log