-
Notifications
You must be signed in to change notification settings - Fork 124
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
38 additions
and
18 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 |
---|---|---|
|
@@ -23,7 +23,7 @@ jobs: | |
- name: Checkout source | ||
uses: actions/[email protected] | ||
- name: Set up Python 3.12 for linting | ||
uses: actions/setup-python@v5.0.0 | ||
uses: actions/setup-python@v5.1.1 | ||
with: | ||
python-version: '3.12' | ||
- name: Install dependencies | ||
|
@@ -51,7 +51,7 @@ jobs: | |
- name: Checkout source | ||
uses: actions/[email protected] | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5.0.0 | ||
uses: actions/setup-python@v5.1.1 | ||
with: | ||
python-version: '3.12' | ||
- name: Upgrade pip | ||
|
@@ -62,9 +62,9 @@ jobs: | |
- name: Build sdist | ||
shell: bash | ||
run: |- | ||
python -m pip install pip -U | ||
python -m pip install setuptools>=0.8 wheel build | ||
python -m pip install setuptools>=0.8 wheel build twine | ||
python -m build --sdist --outdir wheelhouse | ||
python -m twine check ./wheelhouse/line_profiler*.tar.gz | ||
- name: Install sdist | ||
run: |- | ||
ls -al wheelhouse | ||
|
@@ -102,7 +102,7 @@ jobs: | |
name: Upload sdist artifact | ||
with: | ||
name: sdist_wheels | ||
path: wheelhouse/*.tar.gz | ||
path: ./wheelhouse/line_profiler*.tar.gz | ||
build_binpy_wheels: | ||
## | ||
# Build the binary wheels. Note: even though cibuildwheel will test | ||
|
@@ -135,7 +135,7 @@ jobs: | |
uses: ilammy/msvc-dev-cmd@v1 | ||
if: matrix.os == 'windows-latest' && ${{ contains(matrix.cibw_skip, '*-win32') }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
uses: docker/setup-qemu-action@v3.0.0 | ||
if: runner.os == 'Linux' && matrix.arch != 'auto' | ||
with: | ||
platforms: all | ||
|
@@ -151,7 +151,7 @@ jobs: | |
shell: bash | ||
run: ls -la wheelhouse | ||
- name: Set up Python 3.12 to combine coverage | ||
uses: actions/setup-python@v5.0.0 | ||
uses: actions/setup-python@v5.1.1 | ||
if: runner.os == 'Linux' | ||
with: | ||
python-version: '3.12' | ||
|
@@ -170,6 +170,14 @@ jobs: | |
echo '### The cwd should now have a coverage.xml' | ||
ls -altr | ||
pwd | ||
- uses: codecov/[email protected] | ||
name: Codecov Upload | ||
env: | ||
HAVE_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }} | ||
if: ${{ env.HAVE_PERSONAL_TOKEN == 'true' }} | ||
with: | ||
file: ./coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
- uses: codecov/[email protected] | ||
name: Codecov Upload | ||
with: | ||
|
@@ -320,12 +328,12 @@ jobs: | |
uses: ilammy/msvc-dev-cmd@v1 | ||
if: matrix.os == 'windows-latest' | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
uses: docker/setup-qemu-action@v3.0.0 | ||
if: runner.os == 'Linux' && matrix.arch != 'auto' | ||
with: | ||
platforms: all | ||
- name: Setup Python | ||
uses: actions/setup-python@v5.0.0 | ||
uses: actions/setup-python@v5.1.1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/[email protected] | ||
|
@@ -343,11 +351,23 @@ jobs: | |
echo "Installing helpers" | ||
pip install setuptools>=0.8 setuptools_scm wheel build -U | ||
pip install tomli pkginfo | ||
export WHEEL_FPATH=$(python -c "import pathlib; print(str(sorted(pathlib.Path('wheelhouse').glob('line_profiler*.whl'))[-1]).replace(chr(92), chr(47)))") | ||
export MOD_VERSION=$(python -c "from pkginfo import Wheel; print(Wheel('$WHEEL_FPATH').version)") | ||
echo "$WHEEL_FPATH=WHEEL_FPATH" | ||
echo "$INSTALL_EXTRAS=INSTALL_EXTRAS" | ||
echo "$MOD_VERSION=MOD_VERSION" | ||
export WHEEL_FPATH=$(python -c "if 1: | ||
import pathlib | ||
dist_dpath = pathlib.Path('wheelhouse') | ||
candidates = list(dist_dpath.glob('line_profiler*.whl')) | ||
candidates += list(dist_dpath.glob('line_profiler*.tar.gz')) | ||
fpath = sorted(candidates)[-1] | ||
print(str(fpath).replace(chr(92), chr(47))) | ||
") | ||
export MOD_VERSION=$(python -c "if 1: | ||
from pkginfo import Wheel, SDist | ||
fpath = '$WHEEL_FPATH' | ||
cls = Wheel if fpath.endswith('.whl') else SDist | ||
print(cls(fpath).version) | ||
") | ||
echo "WHEEL_FPATH=$WHEEL_FPATH" | ||
echo "INSTALL_EXTRAS=$INSTALL_EXTRAS" | ||
echo "MOD_VERSION=$MOD_VERSION" | ||
pip install --prefer-binary "line_profiler[$INSTALL_EXTRAS]==$MOD_VERSION" -f wheelhouse | ||
echo "Install finished." | ||
- name: Test wheel ${{ matrix.install-extras }} | ||
|
@@ -402,7 +422,7 @@ jobs: | |
file: ./coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
test_deploy: | ||
name: Uploading Test to PyPi | ||
name: Deploy Test | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && ! startsWith(github.event.ref, 'refs/tags') && ! startsWith(github.event.ref, 'refs/heads/release') | ||
needs: | ||
|
@@ -476,7 +496,7 @@ jobs: | |
wheelhouse/*.asc | ||
wheelhouse/*.ots | ||
live_deploy: | ||
name: Uploading Live to PyPi | ||
name: Deploy Live | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && (startsWith(github.event.ref, 'refs/tags') || startsWith(github.event.ref, 'refs/heads/release')) | ||
needs: | ||
|
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
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 |
---|---|---|
|
@@ -56,7 +56,7 @@ mod_name = "line_profiler" | |
repo_name = "line_profiler" | ||
rel_mod_parent_dpath = "." | ||
os = [ "all", "linux", "osx", "win",] | ||
min_python = 3.6 | ||
min_python = '3.6' | ||
author = "Robert Kern" | ||
author_email = "[email protected]" | ||
description = "Line-by-line profiler" | ||
|