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

Update test target to current Ubuntu #161

Merged
merged 10 commits into from
Jan 9, 2023
11 changes: 7 additions & 4 deletions manylinux2014-wheel-build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ TARGET := $(notdir $(WD))
ROOT := $(abspath $(WD)/../Pillow)
IMAGENAME := $(if $(USERNAME), $(USERNAME)/$(TARGET), $(TARGET))
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
TEST_TARGET = ubuntu-20.04-focal-amd64
TEST_IMAGE=pythonpillow/$(TEST_TARGET)
TEST_TARGET = ubuntu-22.04-jammy-amd64
TEST_IMAGE := $(if $(USERNAME), $(USERNAME)/$(TEST_TARGET), $(TEST_TARGET))

.PHONY: build
build:
docker build -t $(IMAGENAME):$(BRANCH) .
Expand All @@ -27,10 +28,12 @@ wheel:
_PYVER=39 $(MAKE) wheel
310:
_PYVER=310 $(MAKE) wheel
311:
_PYVER=311 $(MAKE) wheel

.PHONY: test
test: 38
docker run --rm -v $(ROOT):/Pillow -v `pwd`/out:/output $(TEST_IMAGE):$(BRANCH) sh -c "/vpy3/bin/pip install /output/*cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl && cd /Pillow && /vpy3/bin/python selftest.py && /usr/bin/xvfb-run -a /vpy3/bin/pytest -vx"
test: 310
docker run --rm -v $(ROOT):/Pillow -v `pwd`/out:/output $(TEST_IMAGE):$(BRANCH) sh -c "/vpy3/bin/pip install /output/*cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl && cd /Pillow && /vpy3/bin/python selftest.py && /usr/bin/xvfb-run -a /vpy3/bin/pytest -vx"

.PHONY: push
push:
Expand Down
2 changes: 1 addition & 1 deletion manylinux2014-wheel-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The Makefile has several new commands:

* make wheel: Makes a Python 3.8 manylinux2014 wheel, and puts it in the
./out directory.
* make 37|38|39|310: These are specific commands to make
* make 37|38|39|310|311: These are specific commands to make
the corresponding 3.x version in the ./out directory.

The test target here is mainly to validate the image build, it is
Expand Down
2 changes: 1 addition & 1 deletion manylinux2014-wheel-build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi
# not strictly necessary, unless running multiple versions from the shell
rm -f /tmp/*.whl || true

# Python version, as 37,38,39,310. Defaults to 38.
# Python version, as 37,38,39,310,311. Defaults to 38.
# Matches the naming in /opt/python/
PYVER=${1:-38}
wiredfool marked this conversation as resolved.
Show resolved Hide resolved
PYBIN=$(echo /opt/python/cp${PYVER}*/bin)
Expand Down