summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2021-11-29 10:31:58 +0100
committerGitHub <noreply@github.com>2021-11-29 10:31:58 +0100
commiteb2f74c153987b4e0d03aa16931d97e8137d9257 (patch)
treed838ab0e677eeececf134fd42a6e72ab66ec649e /.github
parenta1ae994cabff37eb86c6ca4564b4f193a73a7b0d (diff)
downloadpsutil-eb2f74c153987b4e0d03aa16931d97e8137d9257.tar.gz
Fix CI tests / wheels / workflow (#2024)
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml66
1 files changed, 60 insertions, 6 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0559acd2..ca026299 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -3,13 +3,14 @@
#
# * Linux
# * macOS
-# * Windows (commented)
+# * Windows (disabled)
# * FreeBSD
#
# To skip certain builds see:
# https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip
#
# External GH actions:
+# * https://github.com/pypa/cibuildwheel
# * https://github.com/actions/checkout
# * https://github.com/actions/setup-python
# * https://github.com/actions/upload-artifact
@@ -19,10 +20,11 @@
on: [push, pull_request]
name: build
jobs:
- linux-macos-win:
- name: ${{ matrix.os }}
+ # Linux + macOS + Python 3
+ linux-macos-py3:
+ name: ${{ matrix.os }}-py3
runs-on: ${{ matrix.os }}
- timeout-minutes: 30
+ timeout-minutes: 20
strategy:
fail-fast: false
matrix:
@@ -35,11 +37,12 @@ jobs:
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py &&
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py
CIBW_TEST_EXTRAS: test
- CIBW_SKIP: cp35-* pp*
+ CIBW_BUILD: 'cp37-* cp38-* cp39-* cp310-*'
+ CIBW_SKIP: '*-musllinux_*'
steps:
- name: Cancel previous runs
- uses: styfle/cancel-workflow-action@0.6.0
+ uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
@@ -73,6 +76,57 @@ jobs:
mv dist/psutil*.tar.gz wheelhouse/
python scripts/internal/print_hashes.py wheelhouse/
+ # Linux + macOS + Python 2
+ linux-macos-py2:
+ name: ${{ matrix.os }}-py2
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, macos-latest]
+ include:
+ - {name: Linux, python: '3.9', os: ubuntu-latest}
+ env:
+ CIBW_ARCHS: 'x86_64 i686'
+ CIBW_TEST_COMMAND:
+ PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py &&
+ PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py
+ CIBW_TEST_EXTRAS: test
+ CIBW_BUILD: 'cp27-*'
+ CIBW_SKIP: '*-musllinux_*'
+
+ steps:
+ - name: Cancel previous runs
+ uses: styfle/cancel-workflow-action@0.9.1
+ with:
+ access_token: ${{ github.token }}
+
+ - uses: actions/checkout@v2
+ - uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+
+ - name: Install cibuildwheel
+ run: pip install cibuildwheel==1.12.0
+
+ - name: Run tests
+ run: cibuildwheel .
+
+ - name: Create wheels
+ uses: actions/upload-artifact@v2
+ with:
+ name: wheels
+ path: wheelhouse
+
+ - name: Print hashes
+ if: matrix.os == 'ubuntu-latest'
+ run: |
+ make generate-manifest
+ python setup.py sdist
+ mv dist/psutil*.tar.gz wheelhouse/
+ python scripts/internal/print_hashes.py wheelhouse/
+
freebsd:
runs-on: macos-latest
steps: