Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #182 from srevinsaju/dev
Browse files Browse the repository at this point in the history
Release v4.7.3
  • Loading branch information
srevinsaju committed Oct 3, 2020
2 parents 4f238f9 + f5609e2 commit 9931c4d
Show file tree
Hide file tree
Showing 14 changed files with 221 additions and 330 deletions.
239 changes: 84 additions & 155 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,26 @@ jobs:
name: guiscrcpy-continuous-none-any-py3.whl
path: dist/${{ env.VERSION }}

- name: Publish distribution 📦 to Test PyPI
if: startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/*

AppImage:
runs-on: ubuntu-latest
strategy:
matrix:
type: ['r', 'm']
container: ['ubuntu:18.04', 'ubuntu:16.04'] # r: full or m: minimal
exclude:
- type: 'r'
container: 'ubuntu:16.04'
- type: 'm'
container: 'ubuntu:18.04'
container:
image: ubuntu:18.04
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -71,125 +86,51 @@ jobs:
sed -i 's,PyQt5,PySide2,g' *.py
python3 -m pyappimage.cli build
ls -a
- name: Bundle scrcpy
- name: Create Standalone scrcpy
if: matrix.type == 'm'
run: |
export APPIMAGE_EXTRACT_AND_RUN=1
wget -c $(curl -sL https://api.github.com/repos/srevinsaju/scrcpy-appimage/releases/latest | jq -r '.assets[].browser_download_url')
chmod +x scrcpy*.AppImage
./scrcpy*.AppImage --appimage-extract
mv squashfs-root scrcpy
mkdir squashfs-root
mv scrcpy squashfs-root/.
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
ARCH=x86_64 ./appimagetool*.AppImage -n guiscrcpy.AppDir
./guiscrcpy*.AppImage --appimage-extract
cp pyappimage/AppRun.standalone.sh guiscrcpy.AppDir/AppRun
chmod +x guiscrcpy.AppDir/AppRun
mv guiscrcpy.AppDir squashfs-root
export GUISCRCPY_VERSION="$(cat setup.py | grep 'version=' | grep -P -o '\d\.\d\.\d+').dev"
export GUISCRCPY_GLIB_VERSION="glibc$(ldd --version | grep 'ldd ' | grep -o ').[0-9].[0-9][0-9]' | grep -o '[0-9].[0-9][0-9]')"
export GUISCRCPY_MACHINE="$(uname -m)"
export GUISCRCPY_TYPE="r"
export GUISCRCPY_TYPE="m"
./appimagetool*.AppImage squashfs-root -n \
-u 'gh-releases-zsync|srevinsaju|guiscrcpy|continuous|guiscrcpy-*.$GUISCRCPY_TYPE.*.AppImage.zsync' \
guiscrcpy-$GUISCRCPY_VERSION.$GUISCRCPY_TYPE.$GUISCRCPY_GLIB_VERSION-$GUISCRCPY_MACHINE.AppImage
guiscrcpy-min-$GUISCRCPY_VERSION.$GUISCRCPY_TYPE.$GUISCRCPY_GLIB_VERSION-$GUISCRCPY_MACHINE.AppImage
mkdir dist
mv guiscrcpy-$GUISCRCPY_VERSION.$GUISCRCPY_TYPE.$GUISCRCPY_GLIB_VERSION-$GUISCRCPY_MACHINE.AppImage* dist/.
- 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 > /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: |
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export APPIMAGE_EXTRACT_AND_RUN=1
chmod +x scripts/display-ci.sh
echo "echo Dummy scrcpy" | sudo tee -a /usr/bin/scrcpy
sudo chmod +x /usr/bin/scrcpy
/usr/bin/xvfb-run --auto-servernum ./scripts/display-ci.sh "$(realpath dist/*.AppImage)"
- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
with:
name: guiscrcpy-continuous-x86_64.AppImage
path: 'dist/'
mv guiscrcpy-min-$GUISCRCPY_VERSION.$GUISCRCPY_TYPE.$GUISCRCPY_GLIB_VERSION-$GUISCRCPY_MACHINE.AppImage* dist/.
AppImage-Standalone:
runs-on: ubuntu-latest
container:
image: ubuntu:16.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup up User
run: |
apt update
apt install -y sudo
echo "github ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
useradd -m github
usermod -aG sudo github
su - github
- name: Install dependencies
run: |
sudo apt -y install git
sudo apt -y install wget curl jq
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.8 python3.8-dev python3.8-venv -y
wget https://bootstrap.pypa.io/get-pip.py
python3.8 get-pip.py
mv `which python3.8` `which python3`
sudo apt install -y libtool libcairo-dev
sudo apt -y install libxcb-xinerama0
sudo apt -y install build-essential
git clone https://github.com/srevinsaju/pyappimage --depth=1 pyapim
cd pyapim
python3 -m pip install -r requirements.txt
python3 -m pip install .
cd ..
echo "$(git describe --tags --always --match '*[0-9]*')"
sed -i 's,qtpy,PySide2,g' ./**/*.py
sed -i 's,qtpy,PySide2,g' **/*.py
sed -i 's,PyQt5,PySide2,g' *.py
python3 -m pyappimage.cli build
ls -a
- name: Bundle scrcpy
if: matrix.type == 'r'
run: |
export APPIMAGE_EXTRACT_AND_RUN=1
wget -c $(curl -sL https://api.github.com/repos/srevinsaju/scrcpy-appimage/releases/latest | jq -r '.assets[].browser_download_url')
chmod +x scrcpy*.AppImage
./scrcpy*.AppImage --appimage-extract
mv squashfs-root scrcpy
mkdir squashfs-root
mv scrcpy squashfs-root/.
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
cp pyappimage/AppRun.standalone.sh guiscrcpy.AppDir/AppRun
chmod +x guiscrcpy.AppDir/AppRun
mv guiscrcpy.AppDir squashfs-root
ARCH=x86_64 ./appimagetool*.AppImage -n guiscrcpy.AppDir
./guiscrcpy*.AppImage --appimage-extract
export GUISCRCPY_VERSION="$(cat setup.py | grep 'version=' | grep -P -o '\d\.\d\.\d+').dev"
export GUISCRCPY_GLIB_VERSION="glibc$(ldd --version | grep 'ldd ' | grep -o ').[0-9].[0-9][0-9]' | grep -o '[0-9].[0-9][0-9]')"
export GUISCRCPY_MACHINE="$(uname -m)"
export GUISCRCPY_TYPE="m"
export GUISCRCPY_TYPE="r"
./appimagetool*.AppImage squashfs-root -n \
-u 'gh-releases-zsync|srevinsaju|guiscrcpy|continuous|guiscrcpy-*.$GUISCRCPY_TYPE.*.AppImage.zsync' \
guiscrcpy-min-$GUISCRCPY_VERSION.$GUISCRCPY_TYPE.$GUISCRCPY_GLIB_VERSION-$GUISCRCPY_MACHINE.AppImage
guiscrcpy-$GUISCRCPY_VERSION.$GUISCRCPY_TYPE.$GUISCRCPY_GLIB_VERSION-$GUISCRCPY_MACHINE.AppImage
mkdir dist
mv guiscrcpy-min-$GUISCRCPY_VERSION.$GUISCRCPY_TYPE.$GUISCRCPY_GLIB_VERSION-$GUISCRCPY_MACHINE.AppImage* dist/.
mv guiscrcpy-$GUISCRCPY_VERSION.$GUISCRCPY_TYPE.$GUISCRCPY_GLIB_VERSION-$GUISCRCPY_MACHINE.AppImage* dist/.
- name: Install Destop Environment
run: |
Expand All @@ -205,29 +146,32 @@ jobs:
echo "TaskBarShowMailboxStatus = 0" > $HOME/.icewm/preferences
echo "TaskBarShowCPUStatus = 0" > $HOME/.icewm/preferences
echo "TaskBarShowWindowListMenu = 0" > $HOME/.icewm/preferences
- name: Run headless test
if: matrix.type == 'r'
run: |
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export APPIMAGE_EXTRACT_AND_RUN=1
chmod +x scripts/display-ci.sh
echo "echo Dummy scrcpy" | sudo tee -a /usr/bin/scrcpy
sudo chmod +x /usr/bin/scrcpy
# /usr/bin/xvfb-run --auto-servernum ./scripts/display-ci.sh "$(realpath dist/*.AppImage)"
/usr/bin/xvfb-run --auto-servernum ./scripts/display-ci.sh "$(realpath dist/*.AppImage)"
- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
with:
name: guiscrcpy-min-continuous-x86_64.AppImage
name: guiscrcpy-${{ matrix.type }}-continuous-x86_64.AppImage
path: 'dist/'


Windows:
name: Windows
runs-on: windows-latest
strategy:
matrix:
arch: ['x64', 'x86']
qt: ['PyQt5', 'PySide2']
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -236,68 +180,39 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: '3.8'

- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install --upgrade setuptools wheel
pip3 install PyInstaller
pip3 install -r requirements.txt
pip3 install .
echo Done
- name: Create .exe
run: |
echo "from guiscrcpy.cli import cli; cli()" > entry.py
python -m PyInstaller -n guiscrcpy .\entry.py --onefile -i guiscrcpy\ui\icons\guiscrcpy_logo_SRj_icon.ico
- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
with:
# Artifact name
name: guiscrcpy-continuous.exe
# Directory containing files to upload
path: dist/guiscrcpy.exe

architecture: ${{ matrix.arch }}

Windows-PySide2:
name: Windows-PySide2
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- uses: actions/setup-python@v1
with:
python-version: '3.8'

- name: Install dependencies
- name: Patch PySide2
if: matrix.qt == 'PySide2'
run: |
sed -i 's,PyQt5,PySide2,g' requirements.txt
sed -i 's,PyQt5,PySide2,g' setup.py
- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install --upgrade setuptools wheel
pip3 install PyInstaller
pip3 install -r requirements.txt
pip3 install .
echo Done
- name: Create .exe
run: |
echo "from guiscrcpy.cli import cli; cli()" > entry.py
python -m PyInstaller -n guiscrcpy .\entry.py --onefile -i guiscrcpy\ui\icons\guiscrcpy_logo_SRj_icon.ico
mv dist/guiscrcpy.exe dist/guiscrcpy-pyside2.exe
python -m PyInstaller -n guiscrcpy-${{ matrix.qt }}-${{ matrix.arch }} .\entry.py --onefile -i guiscrcpy\ui\icons\guiscrcpy_logo_SRj_icon.ico
- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
with:
# Artifact name
name: guiscrcpy-pyside2-continuous.exe
name: guiscrcpy-${{ matrix.qt }}-${{ matrix.arch }}-continuous.exe
# Directory containing files to upload
path: dist/guiscrcpy-pyside2.exe
path: dist


Release:
needs: [Windows, AppImage, Wheel, Windows-PySide2, AppImage-Standalone]
needs: [Windows, AppImage, Wheel, Windows]
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -306,32 +221,46 @@ jobs:
steps:
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-continuous.exe
name: guiscrcpy-PyQt5-x86-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-PyQt5-x64-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-pyside2-continuous.exe
name: guiscrcpy-PySide2-x86-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-PySide2-x64-continuous.exe
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-continuous-none-any-py3.whl
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-continuous-x86_64.AppImage
name: guiscrcpy-r-continuous-x86_64.AppImage
- uses: actions/download-artifact@v1
with:
name: guiscrcpy-min-continuous-x86_64.AppImage
name: guiscrcpy-m-continuous-x86_64.AppImage

- name: Detect Release type
if: github.ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags/v') != true
run: |
echo "::set-env release_tag=continuous"
- name: Release
uses: marvinpinto/action-automatic-releases@latest
if: github.ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags/') != true
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
with:
automatic_release_tag: continuous
title: continuous
prerelease: "!startsWith(github.ref, 'refs/tags/v')"
draft: startsWith(github.ref, 'refs/tags/v')
automatic_release_tag: ${{ env.release_tag }} || null
title: ${{ env.release_tag }} || null
files: |
guiscrcpy-continuous.exe
guiscrcpy-pyside2-continuous.exe
guiscrcpy-PySide2-continuous-x86_64.AppImage
guiscrcpy-continuous-x86_64.AppImage
guiscrcpy-PyQt5-x86-continuous.exe
guiscrcpy-PyQt5-x64-continuous.exe
guiscrcpy-PySide2-x86-continuous.exe
guiscrcpy-PySide2-x64-continuous.exe
guiscrcpy-continuous-none-any-py3.whl
guiscrcpy-min-continuous-x86_64.AppImage
guiscrcpy-m-continuous-x86_64.AppImage
guiscrcpy-r-continuous-x86_64.AppImage
repo_token: ${{ secrets.GITHUB_TOKEN }}
41 changes: 0 additions & 41 deletions .github/workflows/macospython.yml

This file was deleted.

0 comments on commit 9931c4d

Please sign in to comment.