summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2021-04-20 09:47:28 +0200
committernicolargo <nicolas@nicolargo.com>2021-04-20 09:47:28 +0200
commitd52d926aedd74d384816b91d185c5cc7db661088 (patch)
tree46a2dd32b7e07588f973b02ae020d375d8850af6
parentaefc945fda308e441834e07463f925f32d0d3e40 (diff)
Refactor build wheels pipeline
-rw-r--r--.github/workflows/build.yml52
-rw-r--r--.github/workflows/test.yml2
2 files changed, 23 insertions, 31 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 93115f57..70fb7d34 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -6,24 +6,10 @@ name: wheels
on: [push]
jobs:
+ deploy:
+ runs-on: ubuntu-latest
- 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]
- # env:
- # CIBW_TEST_COMMAND:
- # PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_TESTING=1 PSUTIL_DEBUG=1 python {project}/unitest.py &&
- # PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_TESTING=1 PSUTIL_DEBUG=1 python {project}/unitest-restful.py &&
- # PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_TESTING=1 PSUTIL_DEBUG=1 python {project}/unitest-xmlrpc.py
- # CIBW_TEST_EXTRAS: test
- # CIBW_SKIP: cp35-* pp*
-
- steps:
+ steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.6.0
with:
@@ -35,22 +21,28 @@ jobs:
with:
python-version: 3.9
- - name: Create wheels
- run: python3 setup.py sdist
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+
+ - name: Lint with flake8
+ run: |
+ # Stop the build if there are Python syntax errors or undefined names
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.git,./glances/outputs/static
+
+ - name: Build manylinux Python wheels
+ uses: RalfG/python-wheels-manylinux-build@v0.3.3-manylinux2010_x86_64
+ with:
+ python-versions: 'cp36-cp36m cp37-cp37m'
+ # build-requirements: 'cython'
+ system-packages: 'python-dev'
+ # pre-build-command: 'sh pre-build-script.sh'
+ pip-wheel-args: '-w ./dist --no-deps'
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
-
- # linters:
- # runs-on: ubuntu-latest
- # steps:
- # - uses: actions/checkout@v2
- # - uses: actions/setup-python@v2
- # - name: 'Run linters'
- # run: |
- # python3 -m pip install flake8
- # python3 -m flake8 .
- # echo "Flake8 linting OK"
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 2bd63d03..cf9f5943 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -27,7 +27,7 @@ jobs:
- name: Lint with flake8
run: |
- # stop the build if there are Python syntax errors or undefined names
+ # Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.git,./glances/outputs/static
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.git,./glances/outputs/static