2025-11-05 20:55:10 +01:00
|
|
|
matrix:
|
|
|
|
|
platform:
|
|
|
|
|
- linux/amd64
|
|
|
|
|
|
|
|
|
|
labels:
|
|
|
|
|
platform: ${platform}
|
|
|
|
|
|
|
|
|
|
steps:
|
2025-11-05 21:09:22 +01:00
|
|
|
build-n-test:
|
2025-11-05 20:55:10 +01:00
|
|
|
when:
|
|
|
|
|
event: [push]
|
|
|
|
|
image: alpine:latest
|
|
|
|
|
commands:
|
2025-11-05 20:58:48 +01:00
|
|
|
- apk update
|
2025-11-05 21:35:37 +01:00
|
|
|
- apk add --no-cache bash build-base words-en gdb valgrind
|
2025-11-05 22:17:23 +01:00
|
|
|
# build
|
2025-11-05 20:55:10 +01:00
|
|
|
- make
|
2025-11-05 22:17:23 +01:00
|
|
|
# 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
|
2025-11-05 21:35:37 +01:00
|
|
|
#- gdb -batch -ex "run" -ex "bt" --args dicepwgen
|
2025-11-05 22:17:23 +01:00
|
|
|
# check if we really get a password
|
2025-11-05 22:09:26 +01:00
|
|
|
- ./dicepwgen -y | grep -E '[a-z]*%'
|
2025-11-05 22:17:23 +01:00
|
|
|
# check a custom dict file and if we get 6 words when requested
|
|
|
|
|
- test 6 -eq $(./dicepwgen -f contrib/american-english-insane -c 6 | sed 's/[a-zA-Z]//g' | wc -c)
|
2025-11-05 21:09:22 +01:00
|
|
|
|
2025-11-05 20:55:10 +01:00
|
|
|
|