Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arm64v8, ppc64le, s390x images of ubuntu:focal using aptman/qus #98

Merged
merged 5 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
target:
- "latest"
image:
# 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
- "alpine"
- "amazon-2-amd64"
- "arch"
Expand All @@ -24,12 +29,24 @@ jobs:
- "ubuntu-18.04-bionic-amd64"
- "ubuntu-20.04-focal-amd64"
- "ubuntu-20.04-focal-amd64-valgrind"
include:
- image: "ubuntu-20.04-focal-arm64v8"
qemu-arch: "aarch64"
- image: "ubuntu-20.04-focal-ppc64le"
qemu-arch: "ppc64le"
- image: "ubuntu-20.04-focal-s390x"
qemu-arch: "s390x"

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Set up QEMU
if: "matrix.qemu-arch"
run: |
docker run --rm --privileged aptman/qus -s -- -p ${{ matrix.qemu-arch }}

- name: Prepare build
run: |
sudo apt-get update && sudo apt-get install -qyy debootstrap
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ TARGETS = \
fedora-33-amd64 \
ubuntu-18.04-bionic-amd64 \
ubuntu-20.04-focal-amd64 \
ubuntu-20.04-focal-amd64-valgrind
ubuntu-20.04-focal-amd64-valgrind \
ubuntu-20.04-focal-arm64v8 \
ubuntu-20.04-focal-ppc64le \
ubuntu-20.04-focal-s390x

BUILDDIRS = $(TARGETS:%=build-%)
PUSHDIRS = $(TARGETS:%=push-%)
Expand Down
51 changes: 51 additions & 0 deletions ubuntu-20.04-focal-arm64v8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM arm64v8/ubuntu:focal

RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
cmake \
ghostscript \
git \
libffi-dev \
libfreetype6-dev \
libfribidi-dev \
libharfbuzz-dev \
libimagequant-dev \
libjpeg-turbo-progs \
libjpeg8-dev \
liblcms2-dev \
libopenjp2-7-dev \
libtiff5-dev \
libwebp-dev \
netpbm \
python3-dev \
python3-numpy \
python3-scipy \
python3-setuptools \
python3-tk \
sudo \
tcl8.6-dev \
tk8.6-dev \
virtualenv \
wget \
xvfb \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

RUN useradd pillow \
&& addgroup pillow sudo \
&& mkdir /home/pillow \
&& chown pillow:pillow /home/pillow

RUN virtualenv -p /usr/bin/python3.8 --system-site-packages /vpy3 \
&& /vpy3/bin/pip install --no-cache-dir --upgrade pip \
&& /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov \
&& chown -R pillow:pillow /vpy3

ADD depends /depends
RUN cd /depends \
&& ./install_imagequant.sh \
&& ./install_raqm.sh

USER pillow
CMD ["depends/test.sh"]

#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/ubuntu-20.04-focal-arm64v8
1 change: 1 addition & 0 deletions ubuntu-20.04-focal-arm64v8/Makefile
6 changes: 6 additions & 0 deletions ubuntu-20.04-focal-arm64v8/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
source /vpy3/bin/activate
cd /Pillow
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
2 changes: 2 additions & 0 deletions ubuntu-20.04-focal-arm64v8/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
docker pull arm64v8/ubuntu:focal
51 changes: 51 additions & 0 deletions ubuntu-20.04-focal-ppc64le/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM ppc64le/ubuntu:focal

RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
cmake \
ghostscript \
git \
libffi-dev \
libfreetype6-dev \
libfribidi-dev \
libharfbuzz-dev \
libimagequant-dev \
libjpeg-turbo-progs \
libjpeg8-dev \
liblcms2-dev \
libopenjp2-7-dev \
libtiff5-dev \
libwebp-dev \
netpbm \
python3-dev \
python3-numpy \
python3-scipy \
python3-setuptools \
python3-tk \
sudo \
tcl8.6-dev \
tk8.6-dev \
virtualenv \
wget \
xvfb \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

RUN useradd pillow \
&& addgroup pillow sudo \
&& mkdir /home/pillow \
&& chown pillow:pillow /home/pillow

RUN virtualenv -p /usr/bin/python3.8 --system-site-packages /vpy3 \
&& /vpy3/bin/pip install --no-cache-dir --upgrade pip \
&& /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov \
&& chown -R pillow:pillow /vpy3

ADD depends /depends
RUN cd /depends \
&& ./install_imagequant.sh \
&& ./install_raqm.sh

USER pillow
CMD ["depends/test.sh"]

#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/ubuntu-20.04-focal-ppc64le
1 change: 1 addition & 0 deletions ubuntu-20.04-focal-ppc64le/Makefile
6 changes: 6 additions & 0 deletions ubuntu-20.04-focal-ppc64le/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
source /vpy3/bin/activate
cd /Pillow
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
2 changes: 2 additions & 0 deletions ubuntu-20.04-focal-ppc64le/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
docker pull ppc64le/ubuntu:focal
51 changes: 51 additions & 0 deletions ubuntu-20.04-focal-s390x/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM s390x/ubuntu:focal

RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
cmake \
ghostscript \
git \
libffi-dev \
libfreetype6-dev \
libfribidi-dev \
libharfbuzz-dev \
libimagequant-dev \
libjpeg-turbo-progs \
libjpeg8-dev \
liblcms2-dev \
libopenjp2-7-dev \
libtiff5-dev \
libwebp-dev \
netpbm \
python3-dev \
python3-numpy \
python3-scipy \
python3-setuptools \
python3-tk \
sudo \
tcl8.6-dev \
tk8.6-dev \
virtualenv \
wget \
xvfb \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

RUN useradd pillow \
&& addgroup pillow sudo \
&& mkdir /home/pillow \
&& chown pillow:pillow /home/pillow

RUN virtualenv -p /usr/bin/python3.8 --system-site-packages /vpy3 \
&& /vpy3/bin/pip install --no-cache-dir --upgrade pip \
&& /vpy3/bin/pip install --no-cache-dir cffi olefile pytest pytest-cov \
&& chown -R pillow:pillow /vpy3

ADD depends /depends
RUN cd /depends \
&& ./install_imagequant.sh \
&& ./install_raqm.sh

USER pillow
CMD ["depends/test.sh"]

#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/ubuntu-20.04-focal-s390x
1 change: 1 addition & 0 deletions ubuntu-20.04-focal-s390x/Makefile
6 changes: 6 additions & 0 deletions ubuntu-20.04-focal-s390x/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
source /vpy3/bin/activate
cd /Pillow
make clean
make install-coverage
/usr/bin/xvfb-run -a pytest -vx --cov PIL --cov-report term Tests
2 changes: 2 additions & 0 deletions ubuntu-20.04-focal-s390x/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
docker pull s390x/ubuntu:focal