mirror of
https://github.com/anrieff/libcpuid
synced 2024-11-30 23:05:48 +00:00
49 lines
948 B
YAML
49 lines
948 B
YAML
|
name: Test Python bindings
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- '*'
|
||
|
pull_request:
|
||
|
branches:
|
||
|
- '*'
|
||
|
|
||
|
jobs:
|
||
|
test_python:
|
||
|
name: Test Python bindings
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v4
|
||
|
- uses: actions/setup-python@v5
|
||
|
with:
|
||
|
python-version: '3.12'
|
||
|
|
||
|
- name: Build and install libcpuid
|
||
|
run: |
|
||
|
sudo apt-get install autoconf libtool automake
|
||
|
libtoolize
|
||
|
autoreconf --install
|
||
|
./configure
|
||
|
make
|
||
|
sudo make install
|
||
|
sudo ldconfig
|
||
|
|
||
|
- name: Check code formatting (black)
|
||
|
run: |
|
||
|
pip install black
|
||
|
black --check python
|
||
|
|
||
|
- name: Install the libcpuid Python package
|
||
|
run: pip install ./python
|
||
|
|
||
|
- name: Perform static analysis (pylint)
|
||
|
run: |
|
||
|
pip install pylint
|
||
|
pylint python/src/libcpuid
|
||
|
|
||
|
- name: Run tests
|
||
|
run: |
|
||
|
pip install pytest
|
||
|
pytest ./python
|