13
on: [push, pull_request]
16
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }}
17
cancel-in-progress: true
21
name: "py3-${{ matrix.os }}-${{ matrix.arch }}"
22
runs-on: ${{ matrix.os }}
28
- {os: ubuntu-latest, arch: x86_64}
29
- {os: ubuntu-latest, arch: i686}
30
- {os: ubuntu-latest, arch: aarch64}
31
- {os: macos-12, arch: x86_64}
32
- {os: macos-14, arch: arm64}
33
- {os: windows-2019, arch: AMD64}
34
- {os: windows-2019, arch: x86}
36
- uses: actions/checkout@v4
39
- name: "Install python 3.8 universal2 on macOS arm64"
40
if: runner.os == 'macOS' && runner.arch == 'ARM64'
41
uses: actions/setup-python@v5
43
PIP_DISABLE_PIP_VERSION_CHECK: 1
47
- uses: actions/setup-python@v5
52
uses: docker/setup-qemu-action@v3
53
if: matrix.arch == 'aarch64'
55
- name: Create wheels + run tests
56
uses: pypa/cibuildwheel@v2.19.2
58
CIBW_ARCHS: "${{ matrix.arch }}"
59
CIBW_PRERELEASE_PYTHONS: True
62
uses: actions/upload-artifact@v4
64
name: wheels-py3-${{ matrix.os }}-${{ matrix.arch }}
67
- name: Generate .tar.gz
68
if: matrix.os == 'ubuntu-latest'
70
make generate-manifest
72
mv dist/psutil*.tar.gz wheelhouse/
76
name: py2-${{ matrix.os }}
77
runs-on: ${{ matrix.os }}
82
os: [ubuntu-latest, macos-12]
85
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py &&
86
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py
87
CIBW_TEST_EXTRAS: test
91
- uses: actions/checkout@v4
92
- uses: actions/setup-python@v5
96
- name: Create wheels + run tests
97
uses: pypa/cibuildwheel@v1.12.0
100
uses: actions/upload-artifact@v4
102
name: wheels-py2-${{ matrix.os }}
105
- name: Generate .tar.gz
106
if: matrix.os == 'ubuntu-latest'
108
make generate-manifest
109
python setup.py sdist
110
mv dist/psutil*.tar.gz wheelhouse/
114
runs-on: ubuntu-latest
116
- uses: actions/checkout@v4
117
- uses: actions/setup-python@v5
120
- name: 'Run linters'
122
python3 -m pip install ruff==0.4.4 black rstcheck toml-sort sphinx
128
runs-on: ubuntu-latest
130
- uses: actions/upload-artifact/merge@v4
134
separate-directories: false
139
needs: [upload-wheels]
140
runs-on: ubuntu-latest
142
- uses: actions/checkout@v4
143
- uses: actions/setup-python@v5
146
- uses: actions/download-artifact@v4
151
python scripts/internal/print_hashes.py wheelhouse/
152
pipx run twine check --strict wheelhouse/*
153
pipx run abi3audit --verbose --strict wheelhouse/*-abi3-*.whl