Skip to content

Update setup.py

Update setup.py #13

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Lint and Test Devices Plugin
# on:
# push:
# branches: ["main"]
# paths:
# - plugins/devices/src/turnkeyml_plugin_devices/common/**
# - plugins/devices/src/turnkeyml_plugin_devices/onnxrt/**
# - plugins/devices/src/turnkeyml_plugin_devices/torchrt/**
# - plugins/devices/src/turnkeyml_plugin_devices/tensorrt/**
# - plugins/devices/setup.py
# - .github/workflows/test_devices_plugin.yml
# pull_request:
# branches: ["main"]
# paths:
# - plugins/devices/src/turnkeyml_plugin_devices/common/**
# - plugins/devices/src/turnkeyml_plugin_devices/onnxrt/**
# - plugins/devices/src/turnkeyml_plugin_devices/torchrt/**
# - plugins/devices/src/turnkeyml_plugin_devices/tensorrt/**
# - plugins/devices/setup.py
# - .github/workflows/test_devices_plugin.yml
permissions:
contents: read
jobs:
build-devices-plugin:
env:
TURNKEY_TRACEBACK: True
strategy:
matrix:
python-version: ["3.8", "3.11"]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Miniconda with 64-bit Python
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: tkml
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
conda install pylint
pip install pytest
pip install -e plugins/devices
pip install transformers timm
python -m pip check
- name: Lint with PyLint
shell: bash -el {0}
run: |
pylint plugins/devices/src --rcfile .pylintrc --disable E0401,E0203
- name: Test with unittest
shell: bash -el {0}
run: |
python plugins/devices/test/unit.py
python plugins/devices/test/benchmark.py