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

Develop/3.12 #28

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 48 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
submodules: true

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -41,8 +41,9 @@ jobs:
ls -al ./dist

- name: Place wheels in artifacts folder
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: windows-${{ matrix.python-version }}
path: ./dist/*.whl

build_wheels_unix:
Expand All @@ -59,7 +60,7 @@ jobs:
submodules: true

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.11'

Expand All @@ -78,8 +79,9 @@ jobs:
ls -R dist

- name: Place wheels in artifacts folder
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: ./dist/*.whl

test-wheels:
Expand All @@ -97,15 +99,19 @@ jobs:
with:
submodules: true
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Retrieve packages
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: dist

- name: List items
run: |
ls -alR dist

- name: Test Package Installation
run: |
python -m pip install --upgrade pip
Expand All @@ -130,35 +136,59 @@ jobs:
pip install ${file}
python extern/nlopt/test/t_python.py

deploy:
name: deploy packages
deploy-test:
name: Deploy packages to TestPyPI
runs-on: ubuntu-latest
needs: test-wheels
if: startsWith(github.ref, 'refs/tags/')
if: ${{ !startsWith(github.ref, 'refs/tags/') }}

steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Retrieve packages
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- name: Install twine
run: pip install twine

- name: List directory
run: |
ls -ltR

- name: Upload packages to testpypi
env:
TWINE_USERNAME: ${{ secrets.PYPI_TEST_UID }}
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_PWD }}
run: python -m twine upload --skip-existing --repository testpypi dist/*
TWINE_USERNAME: ${{ secrets.PYPI_TEST_TOKEN_NAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_API_TOKEN }}
run: python -m twine upload --skip-existing --repository testpypi dist/* --verbose

deploy:
name: Deploy packages to PyPI
runs-on: ubuntu-latest
needs: test-wheels
if: startsWith(github.ref, 'refs/tags/')

steps:
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Retrieve packages
uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- name: Install twine
run: pip install twine

- name: Upload packages to pypi
env:
TWINE_USERNAME: ${{ secrets.PYPI_UID }}
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }}
run: python -m twine upload --skip-existing dist/*
TWINE_USERNAME: ${{ secrets.PYPI_PROD_TOKEN_NAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PROD_API_TOKEN }}
run: python -m twine upload --skip-existing dist/* --verbose
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.2
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

from extensions import NLOptBuild, NLOptBuildExtension

from wheel.bdist_wheel import bdist_wheel

with open("README.md") as f:
long_description = f.read()

Expand Down
Loading