-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
106 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build and Tests (MACOS and WINDOWS) | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, macos-latest] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
dist: [bdist_wheel] | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip setuptools rich pybind11 wheel requests | ||
- name: Build wheel | ||
run: | | ||
python setup.py ${{ matrix.dist }} | ||
- name: Run tests | ||
run: | | ||
pip install --find-links=dist materialyoucolor | ||
python tests/test_color_gen.py test_image.jpg 1 | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
deploy: | ||
name: Publish to PyPI | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@v1.5.0 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
packages_dir: dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build and Tests (LINUX) | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ['ubuntu-latest'] | ||
container: | ||
image: quay.io/pypa/manylinux_2_28_x86_64 | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
/opt/python/cp39-cp39/bin/pip install --upgrade pip setuptools rich pybind11 wheel requests | ||
/opt/python/cp310-cp310/bin/pip install --upgrade pip setuptools rich pybind11 wheel requests | ||
/opt/python/cp311-cp311/bin/pip install --upgrade pip setuptools rich pybind11 wheel requests | ||
/opt/python/cp312-cp312/bin/pip install --upgrade pip setuptools rich pybind11 wheel requests | ||
- name: Build wheel | ||
run: | | ||
/opt/python/cp39-cp39/bin/python setup.py bdist_wheel | ||
/opt/python/cp310-cp310/bin/python setup.py bdist_wheel | ||
/opt/python/cp311-cp311/bin/python setup.py bdist_wheel | ||
/opt/python/cp312-cp312/bin/python setup.py bdist_wheel | ||
- name: Run tests | ||
run: | | ||
/opt/python/cp39-cp39/bin/pip install --find-links=dist materialyoucolor | ||
/opt/python/cp310-cp310/bin/pip install --find-links=dist materialyoucolor | ||
/opt/python/cp311-cp311/bin/pip install --find-links=dist materialyoucolor | ||
/opt/python/cp312-cp312/bin/pip install --find-links=dist materialyoucolor | ||
/opt/python/cp39-cp39/bin/python tests/test_color_gen.py test_image.jpg 1 | ||
/opt/python/cp310-cp310/bin/python tests/test_color_gen.py test_image.jpg 1 | ||
/opt/python/cp311-cp311/bin/python tests/test_color_gen.py test_image.jpg 1 | ||
/opt/python/cp312-cp312/bin/python tests/test_color_gen.py test_image.jpg 1 | ||
/opt/python/cp39-cp39/bin/pip install auditwheel | ||
auditwheel repair dist/* | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@v1.5.0 | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
packages_dir: wheelhouse |
This file was deleted.
Oops, something went wrong.