Skip to content

Commit

Permalink
attempt 4
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 23, 2024
1 parent 13be4f3 commit 045463a
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 82 deletions.
160 changes: 80 additions & 80 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ concurrency:
jobs:
# Linux + macOS + Windows Python 3
py3:
name: "py3-${{ matrix.os }}-${{ matrix.arch }}"
name: "py3, ${{ matrix.os }}, ${{ matrix.arch }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-latest, arch: x86_64}
- {os: ubuntu-latest, arch: i686}
- {os: ubuntu-latest, arch: aarch64}
- {os: macos-12, arch: x86_64}
- {os: macos-14, arch: arm64}
- {os: windows-2019, arch: AMD64}
- {os: windows-2019, arch: x86}
# - {os: ubuntu-latest, arch: i686}
# - {os: ubuntu-latest, arch: aarch64}
# - {os: macos-12, arch: x86_64}
# - {os: macos-14, arch: arm64}
# - {os: windows-2019, arch: AMD64}
# - {os: windows-2019, arch: x86}
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -71,83 +71,83 @@ jobs:
python setup.py sdist
mv dist/psutil*.tar.gz wheelhouse/
# Linux + macOS + Python 2
py2:
name: py2-${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
env:
CIBW_TEST_COMMAND:
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python -m pytest --tb=native -v -s {project}/psutil/tests/runner.py &&
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python -m pytest --tb=native -v -s {project}/psutil/tests/test_memleaks.py
CIBW_TEST_EXTRAS: test
CIBW_BUILD: 'cp27-*'
# # Linux + macOS + Python 2
# py2:
# name: py2, ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# timeout-minutes: 20
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, macos-12]
# env:
# CIBW_TEST_COMMAND:
# PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python -m pytest --tb=native -v -s {project}/psutil/tests/runner.py &&
# PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python -m pytest --tb=native -v -s {project}/psutil/tests/test_memleaks.py
# CIBW_TEST_EXTRAS: test
# CIBW_BUILD: 'cp27-*'

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.9

- name: Create wheels + run tests
uses: pypa/[email protected]
# - name: Create wheels + run tests
# uses: pypa/[email protected]

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-py2-${{ matrix.os }}
path: wheelhouse
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-py2-${{ matrix.os }}
# path: wheelhouse

- name: Generate .tar.gz
if: matrix.os == 'ubuntu-latest'
run: |
make generate-manifest
python setup.py sdist
mv dist/psutil*.tar.gz wheelhouse/
# - name: Generate .tar.gz
# if: matrix.os == 'ubuntu-latest'
# run: |
# make generate-manifest
# python setup.py sdist
# mv dist/psutil*.tar.gz wheelhouse/

# Run linters
linters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: 'Run linters'
run: |
python3 -m pip install ruff black rstcheck toml-sort sphinx
make lint-all
# # Run linters
# linters:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# - name: 'Run linters'
# run: |
# python3 -m pip install ruff black rstcheck toml-sort sphinx
# make lint-all

# upload weels as a single artefact
upload-wheels:
needs: [py2, py3]
runs-on: ubuntu-latest
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: wheels
pattern: wheels-*
separate-directories: false
delete-merged: true
# # upload weels as a single artefact
# upload-wheels:
# needs: [py2, py3]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/upload-artifact/merge@v4
# with:
# name: wheels
# pattern: wheels-*
# separate-directories: false
# delete-merged: true

# Check sanity of .tar.gz + wheel files
check-dist:
needs: [upload-wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheelhouse
- run: |
python scripts/internal/print_hashes.py wheelhouse/
pipx run twine check --strict wheelhouse/*
pipx run abi3audit --verbose --strict wheelhouse/*-abi3-*.whl
# # Check sanity of .tar.gz + wheel files
# check-dist:
# needs: [upload-wheels]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# - uses: actions/download-artifact@v4
# with:
# name: wheels
# path: wheelhouse
# - run: |
# python scripts/internal/print_hashes.py wheelhouse/
# pipx run twine check --strict wheelhouse/*
# pipx run abi3audit --verbose --strict wheelhouse/*-abi3-*.whl
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ skip = [
"pp*",
]
test-command = [
"env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR={project}/scripts python -m pytest --tb=native -v -s --ignore=psutil/tests/test_memleaks.py {project}/psutil/tests",
"env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR={project}/scripts python {project}/psutil/tests/test_memleaks.py",
"env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR={project}/scripts python -m pytest --tb=native -v -s {project}/psutil/tests",
]
test-extras = "test"

Expand Down

0 comments on commit 045463a

Please sign in to comment.