@@ -10,46 +10,39 @@ jobs:
1010 container :
1111 image : quay.io/pypa/manylinux_2_28_x86_64
1212 steps :
13- - name : Set up Python ${{ matrix.python-version }}
14- uses : actions/setup-python@v3
15- with :
16- python-version : ${{ matrix.python-version }}
1713 - name : Checkout code
1814 uses : actions/checkout@v2
19- - name : Install dependencies
20- run : |
21- /opt/python/cp39-cp39/bin/pip install --upgrade pip setuptools rich wheel requests pillow
22- /opt/python/cp310-cp310/bin/pip install --upgrade pip setuptools rich wheel requests pillow
23- /opt/python/cp311-cp311/bin/pip install --upgrade pip setuptools rich wheel requests pillow
24- /opt/python/cp312-cp312/bin/pip install --upgrade pip setuptools rich wheel requests pillow
25- - name : Build wheel
15+ - name : Download test image file
2616 run : |
27- /opt/python/cp39-cp39/bin/python setup.py bdist_wheel
28- /opt/python/cp310-cp310/bin/python setup.py bdist_wheel
29- /opt/python/cp311-cp311/bin/python setup.py bdist_wheel
30- /opt/python/cp312-cp312/bin/python setup.py bdist_wheel sdist
31- - name : Run tests
17+ # Photo by Dillon Hunt (https://unsplash.com/@dillon_hunt) on https://unsplash.com/photos/an-aerial-view-of-the-ocean-and-rocks-zQLd8RXbenw
18+ curl -L -o test_image.jpg "https://unsplash.com/photos/zQLd8RXbenw/download?ixid=M3wxMjA3fDB8MXx0b3BpY3x8NnNNVmpUTFNrZVF8fHx8fDJ8fDE3MzY0MDA3NTd8&force=true&w=2400"
19+ - name : Setup, Build, Test and Audit
3220 run : |
33- /opt/python/cp39-cp39/bin/pip install --find-links=dist materialyoucolor
34- /opt/python/cp310-cp310/bin/pip install --find-links=dist materialyoucolor
35- /opt/python/cp311-cp311/bin/pip install --find-links=dist materialyoucolor
36- /opt/python/cp312-cp312/bin/pip install --find-links=dist materialyoucolor
21+ python_versions=("cp39" "cp310" "cp311" "cp312" "cp313")
22+ for version in "${python_versions[@]}"; do
23+
24+ /opt/python/$version-$version/bin/pip install --upgrade pip setuptools rich wheel requests pillow
25+ /opt/python/$version-$version/bin/python setup.py bdist_wheel
26+ /opt/python/$version-$version/bin/pip install --find-links=dist materialyoucolor --no-index
27+ /opt/python/$version-$version/bin/python tests/test_all.py test_image.jpg 1 &> /dev/null
28+
29+ if [ "$version" == "cp39" ]; then
30+ /opt/python/$version-$version/bin/python setup.py sdist
31+ /opt/python/$version-$version/bin/pip install auditwheel
32+ mkdir wheelhouse
33+ mv dist/*.tar.gz wheelhouse
34+ auditwheel repair dist/*
35+ echo "Built dists for Python $version:"
36+ ls wheelhouse
37+ fi
38+
39+ done
3740
38- /opt/python/cp39-cp39/bin/python tests/test_all.py test_image.jpg 1
39- /opt/python/cp310-cp310/bin/python tests/test_all.py test_image.jpg 1
40- /opt/python/cp311-cp311/bin/python tests/test_all.py test_image.jpg 1
41- /opt/python/cp312-cp312/bin/python tests/test_all.py test_image.jpg 1
42-
43- /opt/python/cp39-cp39/bin/pip install auditwheel
44- mkdir wheelhouse
45- mv dist/*.tar.gz wheelhouse
46- auditwheel repair dist/*
47- echo "Built dists:"
48- ls wheelhouse
4941 - name : Publish to PyPI
50425143 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
5244 with :
5345 user : __token__
5446 password : ${{ secrets.PYPI_TOKEN }}
5547 packages_dir : wheelhouse
48+
0 commit comments