72 lines
1.7 KiB
YAML
72 lines
1.7 KiB
YAML
name: "Valgrind Analysis"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
valgrind-analysis:
|
|
runs-on: ubuntu-latest
|
|
container: deskflow/deskflow:ubuntu-22.04-amd64
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Config Git safe dir
|
|
run: git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
|
|
# Should only restore the .venv directory from cache.
|
|
- name: Init Python venv
|
|
uses: ./.github/actions/init-python
|
|
with:
|
|
cache-key: "valgrind"
|
|
setup: false
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
./scripts/install_deps.py &&
|
|
apt install valgrind -y
|
|
env:
|
|
# Prevent apt prompting for input.
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
- name: Configure
|
|
run: cmake -B build --preset=linux-release
|
|
|
|
- name: Build
|
|
run: cmake --build build -j8
|
|
|
|
- name: Valgrind unit tests
|
|
id: unittests
|
|
uses: ./.github/actions/run-valgrind
|
|
with:
|
|
executable: ./build/bin/unittests
|
|
|
|
- name: Valgrind integration tests
|
|
id: integtests
|
|
uses: ./.github/actions/run-valgrind
|
|
with:
|
|
executable: ./build/bin/integtests
|
|
|
|
- name: Set job summary
|
|
run: |
|
|
backticks='```'
|
|
message=$(cat <<EOF
|
|
## Valgrind summary
|
|
|
|
### Unit tests
|
|
$backticks
|
|
${{ steps.unittests.outputs.summary }}
|
|
$backticks
|
|
|
|
### Integration tests
|
|
$backticks
|
|
${{ steps.integtests.outputs.summary }}
|
|
$backticks
|
|
EOF
|
|
)
|
|
|
|
echo "$message" >> $GITHUB_STEP_SUMMARY
|