diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a592a32c7..b28ace488e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,25 +20,15 @@ on: [push, pull_request] name: build jobs: - # Linux + macOS + Python 3 + # Linux + macOS + Python 3.6+ linux-macos-py3: - name: ${{ matrix.os }}-py3 + name: ${{ matrix.os }}-py36-plus runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: fail-fast: false matrix: - # os: [ubuntu-latest, macos-latest, windows-latest] - os: [ubuntu-latest, macos-10.15] - include: - - {name: Linux, python: '3.9', os: ubuntu-latest} - env: - 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: 'cp36-* cp37-* cp38-* cp39-* cp310-*' - CIBW_SKIP: '*-musllinux_*' + os: [ubuntu-20.04, macos-10.15] steps: - name: Cancel previous runs @@ -53,16 +43,10 @@ jobs: cache: pip cache-dependency-path: .github/workflows/build.yml - - name: Install cibuildwheel - run: pip install cibuildwheel - - # - name: (Windows) install Visual C++ for Python 2.7 - # if: matrix.os == 'windows-latest' - # run: | - # choco install vcpython27 -f -y - - name: Run tests - run: cibuildwheel . + uses: pypa/cibuildwheel@v2.5.0 + with: + config-file: "./cibuildwheel.toml" - name: Create wheels uses: actions/upload-artifact@v3 @@ -78,25 +62,21 @@ jobs: mv dist/psutil*.tar.gz wheelhouse/ python scripts/internal/print_hashes.py wheelhouse/ - # Linux + macOS + Python 2 + # Linux + macOS + Python 2.7 & 3.5 linux-macos-py2: - name: ${{ matrix.os }}-py2 - runs-on: ubuntu-latest + name: ${{ matrix.os }}-py27-py35 + runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] - include: - - {name: Linux, python: '3.9', os: ubuntu-latest} + os: [ubuntu-20.04, macos-10.15] 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_*' + CIBW_BUILD: 'cp27-* cp35-*' steps: - name: Cancel previous runs diff --git a/.gitignore b/.gitignore index 3d22b0b355..ddafc64c6a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ syntax: glob .tox/ build/ dist/ +wheelhouse/ diff --git a/cibuildwheel.toml b/cibuildwheel.toml new file mode 100644 index 0000000000..9cf2c4d902 --- /dev/null +++ b/cibuildwheel.toml @@ -0,0 +1,13 @@ +[tool.cibuildwheel] +skip = ["pp*", "*-musllinux*"] +test-extras = "test" +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" +] + +[tool.cibuildwheel.macos] +archs = ["x86_64", "universal2"] + +[tool.cibuildwheel.macos.environment] +MACOSX_DEPLOYMENT_TARGET = "10.9"