2021-02-27 13:22:26 +03:00
|
|
|
name: Test Valgrind
|
|
|
|
|
2023-10-15 20:46:25 +03:00
|
|
|
# like the Docker tests, but running valgrind only on *.c/*.h changes.
|
2021-02-27 13:22:26 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-10-15 20:46:25 +03:00
|
|
|
branches:
|
|
|
|
- "**"
|
2021-02-27 13:22:26 +03:00
|
|
|
paths:
|
2023-03-04 23:05:49 +03:00
|
|
|
- ".github/workflows/test-valgrind.yml"
|
2021-02-27 13:22:26 +03:00
|
|
|
- "**.c"
|
|
|
|
- "**.h"
|
2021-02-27 13:31:43 +03:00
|
|
|
pull_request:
|
2021-02-27 13:22:26 +03:00
|
|
|
paths:
|
2023-03-04 23:05:49 +03:00
|
|
|
- ".github/workflows/test-valgrind.yml"
|
2021-02-27 13:22:26 +03:00
|
|
|
- "**.c"
|
|
|
|
- "**.h"
|
2021-11-30 23:14:34 +03:00
|
|
|
workflow_dispatch:
|
2021-02-27 13:22:26 +03:00
|
|
|
|
2022-07-04 04:19:58 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2023-03-04 23:05:49 +03:00
|
|
|
concurrency:
|
2022-09-26 15:16:33 +03:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-02-27 13:22:26 +03:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
docker: [
|
2022-08-02 00:46:41 +03:00
|
|
|
ubuntu-22.04-jammy-amd64-valgrind,
|
2021-02-27 13:22:26 +03:00
|
|
|
]
|
2021-10-15 17:30:05 +03:00
|
|
|
dockerTag: [main]
|
2021-02-27 13:22:26 +03:00
|
|
|
|
|
|
|
name: ${{ matrix.docker }}
|
|
|
|
|
|
|
|
steps:
|
2023-09-05 00:04:29 +03:00
|
|
|
- uses: actions/checkout@v4
|
2024-11-03 00:29:56 +03:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2021-02-27 13:22:26 +03:00
|
|
|
|
|
|
|
- name: Build system information
|
|
|
|
run: python3 .github/workflows/system-info.py
|
|
|
|
|
|
|
|
- name: Docker pull
|
|
|
|
run: |
|
|
|
|
docker pull pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
|
|
|
|
2021-02-27 13:52:52 +03:00
|
|
|
- name: Build and Run Valgrind
|
2021-02-27 13:22:26 +03:00
|
|
|
run: |
|
2024-04-28 16:06:39 +03:00
|
|
|
# The Pillow user in the docker container is UID 1001
|
|
|
|
sudo chown -R 1001 $GITHUB_WORKSPACE
|
2022-12-31 05:47:07 +03:00
|
|
|
docker run --name pillow_container -e "PILLOW_VALGRIND_TEST=true" -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
2021-02-27 13:22:26 +03:00
|
|
|
sudo chown -R runner $GITHUB_WORKSPACE
|