move to codeberg and fix memory leaks (#1)

This commit is contained in:
T. von Dein
2025-11-05 22:31:56 +01:00
parent 5c29ef69e0
commit 1ef2e34511
6 changed files with 191 additions and 157 deletions

29
.woodpecker/build.yaml Normal file
View File

@@ -0,0 +1,29 @@
matrix:
platform:
- linux/amd64
labels:
platform: ${platform}
steps:
build-n-test:
when:
event: [push]
image: alpine:latest
commands:
- apk update
- apk add --no-cache bash build-base words-en gdb valgrind
# build
- make
# look for memory leaks etc
- valgrind --leak-check=full --show-reachable=yes ./dicepwgen 2>&1 | tee log | grep "All heap blocks were freed"
- cat log
# enable in case of a crash
#- gdb -batch -ex "run" -ex "bt" --args dicepwgen
# check if we really get a password
- ./dicepwgen -y | grep -E '[a-z]*%'
# check a custom dict file and if we get 6 words when requested
- test 6 -eq $(./dicepwgen -f contrib/american-english-insane -c 6 | tee log | sed 's/[a-zA-Z]//g' | wc -c)
- cat log