Skip to content

Commit

Permalink
update publish.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetWolf committed Dec 17, 2024
1 parent a0cef03 commit 8f16f6b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 269 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@
name: Upload Python Package

on:
release:
types: [published]
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
deploy_with_bdist_wheel:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-13, macos-14, macos-latest]
os: [windows-latest, macos-13, macos-14, macos-latest]
# FIXME: macos-latest will raise error now.
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -30,32 +32,26 @@ jobs:
run: |
make build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload dist/*
ls dist
deploy_with_manylinux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build wheel on Linux
uses: RalfG/[email protected]_x86_64
with:
# not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129
python-versions: 'cp37-cp37m cp38-cp38'
python-versions: 'cp38-cp38 cp39-cp39m cp310-cp310m cp311-cp311m cp312-cp312m'
build-requirements: 'numpy cython'
- name: Set up Python
uses: actions/setup-python@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload dist/pyqlib-*-manylinux*.whl
ls dist
74 changes: 0 additions & 74 deletions .github/workflows/test_qlib_from_pip.yml

This file was deleted.

116 changes: 0 additions & 116 deletions .github/workflows/test_qlib_from_source.yml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/test_qlib_from_source_slow.yml

This file was deleted.

0 comments on commit 8f16f6b

Please sign in to comment.