-
Notifications
You must be signed in to change notification settings - Fork 4
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
2 changed files
with
95 additions
and
5 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,84 @@ | ||
name: Test Upload Python Package | ||
on: | ||
release: | ||
types: [prereleased] | ||
|
||
jobs: | ||
deploy-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.6 | ||
- name: Build linux wheels | ||
run: | | ||
pip install twine | ||
docker run -v $PWD:/io quay.io/pypa/manylinux1_x86_64 "/io/build_wheels.sh" | ||
- name: Test linux wheel | ||
run: | | ||
pip install dist/finalfusion*36*.whl pytest | ||
pytest | ||
- name: Upload linux wheels | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} | ||
run: | | ||
twine upload wheelhouse/*.whl --skip-existing --repository testpypi | ||
twine upload dist/*.tar.gz --repository testpypi --skip-existing | ||
deploy-mac: | ||
runs-on: macOS-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build mac wheel | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel==0.31.1 twine cython | ||
python setup.py bdist_wheel | ||
- name: Test mac wheel | ||
run: | | ||
pip install dist/*.whl pytest | ||
pytest | ||
- name: Test mac wheel system python | ||
if: ${{ matrix.python-version == '3.7' }} | ||
run: | | ||
/usr/bin/python3 -m venv venv | ||
source venv/bin/activate | ||
pip install dist/*.whl pytest | ||
pytest | ||
- name: Publish macos | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} | ||
run: | | ||
twine upload dist/*.whl --repository testpypi --skip-existing | ||
deploy-windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build windows wheel | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel==0.31.1 twine cython | ||
python setup.py bdist_wheel | ||
- name: Publish windows | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} | ||
run: | | ||
twine upload dist\*.whl --repository testpypi --skip-existing |
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