Pillow/.github/workflows/test-docker.yml

90 lines
2.5 KiB
YAML
Raw Normal View History

2019-09-14 12:29:33 +03:00
name: Test Docker
on: [push, pull_request, workflow_dispatch]
2019-09-14 12:29:33 +03:00
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
2019-09-14 12:29:33 +03:00
matrix:
docker: [
# Run slower jobs first to give them a headstart and reduce waiting time
ubuntu-20.04-focal-arm64v8,
ubuntu-20.04-focal-ppc64le,
ubuntu-20.04-focal-s390x,
# Then run the remainder
2019-09-14 12:29:33 +03:00
alpine,
2020-11-25 01:02:34 +03:00
amazon-2-amd64,
2019-09-14 12:29:33 +03:00
arch,
centos-7-amd64,
2021-09-16 14:40:34 +03:00
centos-stream-8-amd64,
2022-02-08 15:35:01 +03:00
centos-stream-9-amd64,
2020-11-25 01:02:34 +03:00
debian-10-buster-x86,
2022-01-17 06:07:30 +03:00
debian-11-bullseye-x86,
2021-04-28 00:51:11 +03:00
fedora-34-amd64,
2021-11-03 13:31:12 +03:00
fedora-35-amd64,
2022-02-23 07:26:16 +03:00
gentoo,
2020-11-25 01:02:34 +03:00
ubuntu-18.04-bionic-amd64,
ubuntu-20.04-focal-amd64,
2019-09-14 12:29:33 +03:00
]
2021-10-15 17:30:05 +03:00
dockerTag: [main]
include:
- docker: "ubuntu-20.04-focal-arm64v8"
qemu-arch: "aarch64"
- docker: "ubuntu-20.04-focal-ppc64le"
qemu-arch: "ppc64le"
- docker: "ubuntu-20.04-focal-s390x"
qemu-arch: "s390x"
2019-09-14 12:29:33 +03:00
name: ${{ matrix.docker }}
steps:
2020-03-29 23:27:24 +03:00
- uses: actions/checkout@v2
2019-09-14 12:29:33 +03:00
- name: Build system information
2021-01-06 14:42:31 +03:00
run: python3 .github/workflows/system-info.py
- 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: |
# The Pillow user in the docker container is UID 1000
sudo chown -R 1000 $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
.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
uses: codecov/codecov-action@v1
with:
flags: GHA_Docker
name: ${{ matrix.docker }}
success:
needs: build
runs-on: ubuntu-latest
name: Docker Test Successful
steps:
- name: Success
run: echo Docker Test Successful