.github/workflows/pythonapp.yml
name: Linux
on:
push:
branches:
- 'master'
paths:
- 'guiscrcpy/**'
- '.github/workflows/pythonapp.yml'
pull_request:
paths:
- 'guiscrcpy/**'
- '.github/workflows/pythonapp.yml'
jobs:
quality:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade poetry wheel
poetry install -E PySide2
poetry build
pip3 install dist/*.whl
- name: Lint with flake8
run: |
poetry run black --check guiscrcpy --exclude guiscrcpy/ui
- name: Build
run: |
poetry build
- name: Install Destop Environment
run: |
echo "adapted from https://github.com/AppImage/appimage.github.io/blob/master/.travis.yml"
sudo apt-get update
sudo apt-get -qq -y install imagemagick libasound2-dev pulseaudio-utils alsa-utils alsa-oss libjack0 desktop-file-utils xmlstarlet xterm xvfb icewm x11-utils x11-apps netpbm xdotool libgl1-mesa-dri libgl1-mesa-dev mesa-utils libosmesa6 libsdl1.2-dev fonts-wqy-microhei libfile-mimeinfo-perl libx11-xcb1 libxcb-xkb1 libxcb-* libxcb-render-util0 libxkbcommon-x11-0 libxkbcommon0 scrcpy > /dev/null # appstream # TODO: Cache me!
mkdir $HOME/.icewm/
echo "ShowTaskBar = 0" > $HOME/.icewm/preferences
echo "TaskBarAutoHide = 1" > $HOME/.icewm/preferences
echo "TaskBarShowWorkspaces = 0" > $HOME/.icewm/preferences
echo "TaskBarShowAllWindows = 0" > $HOME/.icewm/preferences
echo "TaskBarShowClock = 0" > $HOME/.icewm/preferences
echo "TaskBarShowMailboxStatus = 0" > $HOME/.icewm/preferences
echo "TaskBarShowCPUStatus = 0" > $HOME/.icewm/preferences
echo "TaskBarShowWindowListMenu = 0" > $HOME/.icewm/preferences
- name: Run headless test
run: |
chmod +x scripts/display-ci.sh
/usr/bin/xvfb-run --auto-servernum ./scripts/display-ci.sh "poetry run guiscrcpy"
- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
with:
name: guiscrcpy-screenshot.png
path: screenshot.png