Skip to content

Switch from pynput to libvinput #320

Switch from pynput to libvinput

Switch from pynput to libvinput #320

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
jobs:
package:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ 'ubuntu-latest', 'windows-latest', 'macos-12' ]
# os: [[self-hosted, Linux], [self-hosted, Windows]]
python-version: [ 3.11 ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies for build script
run: python -m pip install requests
- name: Package for ${{ matrix.os }}
run: python dist.py -d
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
if: runner.os == 'Windows'
- name: Install WiX
run: dotnet tool install --global wix
if: runner.os == 'Windows'
- name: Build WiX on Windows
run: wix build .\nexus.wxs
if: runner.os == 'Windows'
- name: Add generated binaries to artifact
uses: actions/upload-artifact@v4
with:
name: nexus-${{ matrix.os }}
path: |
dist/nexus
dist/nexus-macos
dist/nexus.exe
dist/nexusw.exe
nexus.msi
LICENSE
README.md
if-no-files-found: error
if: always()
build-test:
runs-on: ubuntu-latest
# runs-on: [self-hosted, Linux]
strategy:
matrix:
python-version: [ 3.11 ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine requests
pip install -r requirements.txt
pip install -r test-requirements.txt
sudo apt-get install xvfb libx11-dev libxcb-xtest0-dev libxdo-dev
wget https://github.com/xslendix/libvinput/releases/latest/download/libvinput.so
sudo mv libvinput.so /usr/local/lib/libvinput.so
- name: Lint with flake8
run: |
flake8 --count --show-source --statistics --max-line-length=120 \
--per-file-ignores=nexus/Freqlog/backends/__init__.py:F401 \
--exclude=venv,nexus/ui,resources_rc.py
- name: Build package
run: python -m build
- name: Check and install package
run: |
twine check dist/*
pip install .
- name: Test with pytest over Xvfb
run: xvfb-run -a pytest --cov=nexus
release:
needs: [ package, build-test ]
runs-on: ubuntu-latest
# runs-on: [self-hosted, Linux]
if: |
github.repository_owner == 'CharaChorder' &&
github.event_name != 'pull_request'
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Move downloaded artifacts to root
run: mv dist/* .
- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
nexus
nexus.exe
nexusw.exe
nexus.msi
nexus-macos
README.md
LICENSE