summaryrefslogtreecommitdiffstats
path: root/.github/workflows/build.yml
blob: 1edc760a82b67faa6c36397726c99971d60c8a43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Executed on every push by GitHub Actions. 
# This runs CI tests

name: wheels

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    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: 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-devel'
          # 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