From 5b3016ba3d7429c827c992699f50c2b7ff29b023 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Mon, 14 Nov 2022 12:18:35 +0100 Subject: update build.yml Signed-off-by: Giampaolo Rodola --- .github/workflows/build.yml | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d9999f8..b99a1d6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-12, windows-2019] + # python: ["3.6", "3.11"] steps: - name: Cancel previous runs @@ -41,27 +42,26 @@ jobs: with: python-version: 3.11 - - name: Run tests + - name: Create wheels + run tests uses: pypa/cibuildwheel@v2.11.2 - - name: Create wheels + - name: Upload wheels uses: actions/upload-artifact@v3 with: name: wheels path: wheelhouse - - name: Print hashes + - name: Generate .tar.gz 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/ # Windows cp37+ tests # psutil tests do not like running from a virtualenv with python>=3.7 so # not using cibuildwheel for those. run them "manually" with this job. - windows-py3-test: + py3-windows-tests: name: py3-windows-test-${{ matrix.python }}-${{ matrix.architecture }} needs: py3 runs-on: windows-2019 @@ -69,7 +69,7 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.7", "3.8", "3.9", "3.10", "~3.11.0-0"] + python: ["3.7", "3.8", "3.9", "3.10", "3.11"] architecture: ["x86", "x64"] steps: @@ -104,7 +104,7 @@ jobs: shell: bash # Linux + macOS + Python 2 - linux-macos-py2: + py2: name: py2-${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 20 @@ -130,24 +130,24 @@ jobs: with: python-version: 3.9 - - name: Run tests + - name: Create wheels + run tests uses: pypa/cibuildwheel@v1.12.0 - - name: Create wheels + - name: Upload wheels uses: actions/upload-artifact@v3 with: name: wheels path: wheelhouse - - name: Print hashes + - name: Generate .tar.gz 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: + # FreeBSD (tests only) + py3-freebsd: runs-on: macos-12 steps: - name: Cancel previous runs @@ -174,6 +174,7 @@ jobs: python3 psutil/tests/runner.py python3 psutil/tests/test_memleaks.py + # Run linters linters: runs-on: ubuntu-latest steps: @@ -193,13 +194,19 @@ jobs: # clinter find . -type f \( -iname "*.c" -o -iname "*.h" \) | xargs python3 scripts/internal/clinter.py - check_dist: - name: Check dist - needs: [linux-macos-py2, py3] + # Check sanity of .tar.gz + wheel files + check-dist: + needs: [py2, py3] runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x - uses: actions/download-artifact@v3 with: name: wheels path: wheelhouse - - run: pipx run twine check --strict wheelhouse/* + - run: | + python scripts/internal/print_hashes.py wheelhouse/ + pipx run twine check --strict wheelhouse/* -- cgit v1.2.1