From e58b0fdaeaedd73a0ca19ad23a63874708d86b91 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sun, 15 Nov 2020 21:54:42 +0100 Subject: Remove Travis and Cirrus, use GH also for FreeBSD (#1880) --- .github/ISSUE_TEMPLATE/bug.md | 6 +-- .github/ISSUE_TEMPLATE/enhancement.md | 1 - .github/lock.yml | 35 ------------- .github/workflows/build_wheel.yml | 51 ------------------- .github/workflows/ci.yml | 95 +++++++++++++++++++++++++++++++++++ 5 files changed, 96 insertions(+), 92 deletions(-) delete mode 100644 .github/lock.yml delete mode 100644 .github/workflows/build_wheel.yml create mode 100644 .github/workflows/ci.yml (limited to '.github') diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 67a9601b..1cdba810 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -7,13 +7,9 @@ labels: 'bug' --- **Platform** * { OS version } -* { psutil version: python3 -c "import psutil; print(psutil.__version__)" } +* { psutil version (print psutil.__version__) } * { python version } **Bug description** ... - - -**Test results** -{ output of `python -c psutil.tests` (failures only, not full result) } diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md index 7e7159f2..2111c572 100644 --- a/.github/ISSUE_TEMPLATE/enhancement.md +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -6,4 +6,3 @@ title: "[OS] title" --- -{ a clear and concise description of what the enhancment is about } diff --git a/.github/lock.yml b/.github/lock.yml deleted file mode 100644 index 7099c810..00000000 --- a/.github/lock.yml +++ /dev/null @@ -1,35 +0,0 @@ -# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app - -# Number of days of inactivity before a closed issue or pull request is locked -daysUntilLock: 3 - -# Skip issues and pull requests created before a given timestamp. Timestamp must -# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable -skipCreatedBefore: false - -# Issues and pull requests with these labels will be ignored. Set to `[]` to disable -exemptLabels: [] - -# Label to add before locking, such as `outdated`. Set to `false` to disable -lockLabel: false - -# Comment to post before locking. Set to `false` to disable -lockComment: false - -# Assign `resolved` as the reason for locking. Set to `false` to disable -setLockReason: false - -# Limit to only `issues` or `pulls` -# only: issues - -# Optionally, specify configuration settings just for `issues` or `pulls` -# issues: -# exemptLabels: -# - help-wanted -# lockLabel: outdated - -# pulls: -# daysUntilLock: 30 - -# Repository to extend settings from -# _extends: repo diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml deleted file mode 100644 index 1a8b4868..00000000 --- a/.github/workflows/build_wheel.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Linux, macOS, Windows - -on: [push, pull_request] - -jobs: - wheel: - name: ${{ matrix.os }} - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false # whether to exit the whole run on first failure - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - include: - - {name: Linux, python: '3.9', os: ubuntu-latest} - env: - CIBW_TEST_COMMAND: python -u -Wa {project}/psutil/tests/runner.py - CIBW_TEST_COMMAND_MACOS: LC_ALL='en_US.utf8' python -Wa {project}/psutil/tests/runner.py - CIBW_TEST_EXTRAS: test - # https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip - CIBW_SKIP: cp35-* pp* - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - - name: (Windows) install Visual C++ for Python 2.7 - if: matrix.os == 'windows-latest' - run: | - choco install vcpython27 -f -y - - - name: Run tests - run: | - pip install cibuildwheel - 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/ - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..c93ad480 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,95 @@ +# Executed on every push by GitHub Actions. This runs CI tests and +# generates wheels on the following platforms: +# +# * Linux +# * macOS +# * FreeBSD +# +# Windows works as well but it's disabled (we do it via AppVeyor). +# To skip certain builds see: +# https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip + +name: CI +on: [push] +jobs: + linux-macos-win: + name: ${{ matrix.os }} + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + # os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] + include: + - {name: Linux, python: '3.9', os: ubuntu-latest} + env: + CIBW_TEST_COMMAND: + PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_TESTING=1 PSUTIL_DEBUG=1 + python {project}/psutil/tests/runner.py && + PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_TESTING=1 PSUTIL_DEBUG=1 + python {project}/psutil/tests/test_memleaks.py + CIBW_TEST_EXTRAS: test + CIBW_SKIP: cp35-* pp* + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.6.0 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.9 + + # - name: (Windows) install Visual C++ for Python 2.7 + # if: matrix.os == 'windows-latest' + # run: | + # choco install vcpython27 -f -y + + - name: Run tests + run: | + pip install cibuildwheel + 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: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.6.0 + with: + access_token: ${{ github.token }} + + - uses: actions/checkout@v2 + + - name: Run tests + id: test + uses: vmactions/freebsd-vm@v0.0.8 + with: + usesh: true + prepare: pkg install -y gcc python3 + run: | + set +e + export \ + PYTHONWARNINGS=always \ + PYTHONUNBUFFERED=1 \ + PSUTIL_TESTING=1 \ + PSUTIL_DEBUG=1 + python3 -m pip install --user setuptools + python3 setup.py install + python3 psutil/tests/runner.py + python3 psutil/tests/test_memleaks.py -- cgit v1.2.1