2019-09-14 12:29:33 +03:00
|
|
|
name: Test Docker
|
|
|
|
|
2023-03-04 16:44:56 +03:00
|
|
|
on:
|
|
|
|
push:
|
2023-10-15 20:46:25 +03:00
|
|
|
branches:
|
|
|
|
- "**"
|
2023-03-04 16:44:56 +03:00
|
|
|
paths-ignore:
|
|
|
|
- ".github/workflows/docs.yml"
|
2023-10-02 11:01:23 +03:00
|
|
|
- ".github/workflows/wheels*"
|
|
|
|
- ".gitmodules"
|
2023-03-04 16:44:56 +03:00
|
|
|
- "docs/**"
|
2023-10-02 11:01:23 +03:00
|
|
|
- "wheels/**"
|
2023-03-04 16:44:56 +03:00
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- ".github/workflows/docs.yml"
|
2023-10-02 11:01:23 +03:00
|
|
|
- ".github/workflows/wheels*"
|
|
|
|
- ".gitmodules"
|
2023-03-04 16:44:56 +03:00
|
|
|
- "docs/**"
|
2023-10-02 11:01:23 +03:00
|
|
|
- "wheels/**"
|
2023-03-04 16:44:56 +03:00
|
|
|
workflow_dispatch:
|
2019-09-14 12:29:33 +03:00
|
|
|
|
2022-07-04 04:19:58 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-10-31 11:36:14 +03:00
|
|
|
concurrency:
|
2022-09-26 15:16:33 +03:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2019-09-14 12:29:33 +03:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2020-03-11 19:30:11 +03:00
|
|
|
fail-fast: false
|
2019-09-14 12:29:33 +03:00
|
|
|
matrix:
|
|
|
|
docker: [
|
2020-12-11 22:41:02 +03:00
|
|
|
# Run slower jobs first to give them a headstart and reduce waiting time
|
2022-05-18 03:11:52 +03:00
|
|
|
ubuntu-22.04-jammy-arm64v8,
|
2024-04-28 16:06:39 +03:00
|
|
|
ubuntu-24.04-noble-ppc64le,
|
|
|
|
ubuntu-24.04-noble-s390x,
|
2020-12-11 22:41:02 +03:00
|
|
|
# Then run the remainder
|
2019-09-14 12:29:33 +03:00
|
|
|
alpine,
|
2020-11-25 01:02:34 +03:00
|
|
|
amazon-2-amd64,
|
2023-03-19 14:36:37 +03:00
|
|
|
amazon-2023-amd64,
|
2019-09-14 12:29:33 +03:00
|
|
|
arch,
|
2022-02-08 15:35:01 +03:00
|
|
|
centos-stream-9-amd64,
|
2023-06-27 09:36:22 +03:00
|
|
|
debian-12-bookworm-x86,
|
2023-06-23 14:52:00 +03:00
|
|
|
debian-12-bookworm-amd64,
|
2024-04-25 01:41:15 +03:00
|
|
|
fedora-40-amd64,
|
2022-02-23 07:26:16 +03:00
|
|
|
gentoo,
|
2022-04-22 10:35:20 +03:00
|
|
|
ubuntu-22.04-jammy-amd64,
|
2024-04-28 16:06:39 +03:00
|
|
|
ubuntu-24.04-noble-amd64,
|
2019-09-14 12:29:33 +03:00
|
|
|
]
|
2021-10-15 17:30:05 +03:00
|
|
|
dockerTag: [main]
|
2020-12-11 22:41:02 +03:00
|
|
|
include:
|
2022-05-18 03:11:52 +03:00
|
|
|
- docker: "ubuntu-22.04-jammy-arm64v8"
|
2020-12-11 22:41:02 +03:00
|
|
|
qemu-arch: "aarch64"
|
2024-04-28 16:06:39 +03:00
|
|
|
- docker: "ubuntu-24.04-noble-ppc64le"
|
2020-12-11 22:41:02 +03:00
|
|
|
qemu-arch: "ppc64le"
|
2024-04-28 16:06:39 +03:00
|
|
|
- docker: "ubuntu-24.04-noble-s390x"
|
2020-12-11 22:41:02 +03:00
|
|
|
qemu-arch: "s390x"
|
2019-09-14 12:29:33 +03:00
|
|
|
|
|
|
|
name: ${{ matrix.docker }}
|
|
|
|
|
|
|
|
steps:
|
2023-09-05 00:04:29 +03:00
|
|
|
- uses: actions/checkout@v4
|
2019-09-14 12:29:33 +03:00
|
|
|
|
2019-12-09 23:35:31 +03:00
|
|
|
- name: Build system information
|
2021-01-06 14:42:31 +03:00
|
|
|
run: python3 .github/workflows/system-info.py
|
2019-12-09 23:35:31 +03:00
|
|
|
|
2020-12-11 22:41:02 +03:00
|
|
|
- name: Set up QEMU
|
|
|
|
if: "matrix.qemu-arch"
|
|
|
|
run: |
|
|
|
|
docker run --rm --privileged aptman/qus -s -- -p ${{ matrix.qemu-arch }}
|
|
|
|
|
2019-09-14 12:29:33 +03:00
|
|
|
- name: Docker pull
|
|
|
|
run: |
|
|
|
|
docker pull pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
|
|
|
|
|
|
|
- name: Docker build
|
|
|
|
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
|
2020-01-24 14:36:49 +03:00
|
|
|
docker run --name pillow_container -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
2019-12-30 12:44:15 +03:00
|
|
|
sudo chown -R runner $GITHUB_WORKSPACE
|
|
|
|
|
|
|
|
- name: After success
|
|
|
|
run: |
|
|
|
|
PATH="$PATH:~/.local/bin"
|
2020-01-24 14:36:49 +03:00
|
|
|
docker start pillow_container
|
|
|
|
pil_path=`docker exec pillow_container /vpy3/bin/python -c 'import os, PIL;print(os.path.realpath(os.path.dirname(PIL.__file__)))'`
|
|
|
|
docker stop pillow_container
|
|
|
|
sudo mkdir -p $pil_path
|
|
|
|
sudo cp src/PIL/*.py $pil_path
|
2020-01-08 16:41:48 +03:00
|
|
|
.ci/after_success.sh
|
2019-12-30 12:44:15 +03:00
|
|
|
env:
|
2020-01-24 14:36:49 +03:00
|
|
|
MATRIX_DOCKER: ${{ matrix.docker }}
|
2019-12-30 12:44:15 +03:00
|
|
|
|
|
|
|
- name: Upload coverage
|
2024-05-03 01:45:39 +03:00
|
|
|
uses: codecov/codecov-action@v4
|
2019-12-30 12:44:15 +03:00
|
|
|
with:
|
2020-01-24 15:14:56 +03:00
|
|
|
flags: GHA_Docker
|
2019-12-30 13:37:40 +03:00
|
|
|
name: ${{ matrix.docker }}
|
2023-02-12 00:14:47 +03:00
|
|
|
gcov: true
|
2024-05-03 01:45:39 +03:00
|
|
|
token: ${{ secrets.CODECOV_ORG_TOKEN }}
|
2020-09-23 09:56:17 +03:00
|
|
|
|
|
|
|
success:
|
2022-07-04 04:19:58 +03:00
|
|
|
permissions:
|
|
|
|
contents: none
|
2020-09-23 09:56:17 +03:00
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Docker Test Successful
|
|
|
|
steps:
|
|
|
|
- name: Success
|
|
|
|
run: echo Docker Test Successful
|