Merge pull request #2 from srevinsaju/bionic
fix: use ubuntu-bionic to build base
This commit is contained in:
commit
c60836424f
2 changed files with 54 additions and 37 deletions
79
.github/workflows/continuous.yml
vendored
79
.github/workflows/continuous.yml
vendored
|
@ -34,58 +34,73 @@ on:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
centos:
|
ubuntu:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: archlinux:latest
|
image: ubuntu:bionic
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up User
|
- name: Set up User
|
||||||
run: |
|
run: |
|
||||||
pacman -Syu --noconfirm
|
apt update
|
||||||
pacman -S sudo --noconfirm
|
apt install -y sudo
|
||||||
sed -i 's,# %wheel ALL=(ALL) ALL,%wheel\tALL=(ALL)\tNOPASSWD:ALL,g' /etc/sudoers
|
echo "github ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
useradd -m github
|
useradd -m github
|
||||||
usermod -aG wheel github
|
usermod -aG sudo github
|
||||||
su - github
|
su - github
|
||||||
|
sudo apt -y install git wget curl jq unzip
|
||||||
|
sudo apt -y install build-essential
|
||||||
|
|
||||||
- name: Install git
|
|
||||||
run: |
|
|
||||||
sudo pacman -S git wget curl jq unzip --noconfirm
|
|
||||||
sudo pacman -S gcc cmake pkgconf --noconfirm
|
|
||||||
sudo pacman -S meson sdl2 ffmpeg android-tools --noconfirm
|
|
||||||
|
|
||||||
- name: Clone scrcpy
|
- name: Clone scrcpy
|
||||||
run: |
|
run: |
|
||||||
|
wget https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-linux.zip
|
||||||
|
unzip ninja-linux.zip
|
||||||
|
mkdir bin
|
||||||
|
mv ninja bin/.
|
||||||
|
echo "Ninja here: $(which ninja)"
|
||||||
git clone https://github.com/Genymobile/scrcpy
|
git clone https://github.com/Genymobile/scrcpy
|
||||||
cd scrcpy
|
cd scrcpy
|
||||||
wget $(curl https://api.github.com/repos/Genymobile/scrcpy/releases/latest | jq -r '.assets[].browser_download_url' | grep server) -O scrcpy_server
|
sudo apt install -y ffmpeg libsdl2-2.0-0 adb
|
||||||
|
# client build dependencies
|
||||||
|
sudo apt install -y gcc git pkg-config ninja-build \
|
||||||
- name: Download adb
|
libavcodec-dev libavformat-dev libavutil-dev \
|
||||||
run: |
|
libsdl2-dev
|
||||||
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
|
sudo apt install -y python3-pip
|
||||||
unzip platform-tools-latest-linux.zip
|
pip3 install meson --user
|
||||||
|
|
||||||
- name: Build scrcpy
|
- name: Build scrcpy
|
||||||
run: |
|
run: |
|
||||||
export SRC_ROOT=$(realpath .)
|
|
||||||
export ADB_DIR=$(realpath platform-tools)
|
|
||||||
cd scrcpy
|
cd scrcpy
|
||||||
meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=scrcpy_server
|
wget $(curl https://api.github.com/repos/Genymobile/scrcpy/releases/latest | jq -r '.assets[].browser_download_url' | grep server) -O scrcpy_server
|
||||||
|
~/.local/bin/meson x --buildtype release --strip -Db_lto=true \
|
||||||
|
-Dprebuilt_server=./scrcpy_server
|
||||||
ninja -Cx
|
ninja -Cx
|
||||||
sudo ninja -Cx install
|
sudo ninja -Cx install
|
||||||
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
|
|
||||||
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
- name: Build AppImage
|
||||||
chmod +x appimagetool-*.AppImage
|
run: |
|
||||||
chmod +x linuxdeploy-x86_64.AppImage
|
cd scrcpy
|
||||||
export APPIMAGE_EXTRACT_AND_RUN=1
|
export APPIMAGE_EXTRACT_AND_RUN=1
|
||||||
|
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||||
|
chmod +x linuxdeploy*.AppImage
|
||||||
|
mkdir AppDir
|
||||||
|
export SRC_ROOT=$(realpath ..)
|
||||||
|
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/pulseaudio/:$LD_LIBRARY_PATH
|
||||||
|
./linuxdeploy*.AppImage -e /usr/local/bin/scrcpy --desktop-file $SRC_ROOT/scrcpy.desktop --icon-file $SRC_ROOT/scrcpy.png --appdir=AppDir --custom-apprun=$SRC_ROOT/AppRun --library=/usr/lib/x86_64-linux-gnu/libsndio.so.6.1
|
||||||
|
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
|
||||||
|
unzip platform-tools-latest-linux.zip
|
||||||
|
export ADB_DIR=$(realpath platform-tools)
|
||||||
export BUILD_DIR=$(realpath x)
|
export BUILD_DIR=$(realpath x)
|
||||||
cp $SRC_ROOT/build.sh .
|
cp $BUILD_DIR/app/scrcpy AppDir/usr/bin/.
|
||||||
chmod +x build.sh
|
cp $ADB_DIR/adb AppDir/usr/bin/.
|
||||||
./build.sh
|
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||||
mkdir -p dist
|
chmod +x appimagetool*.AppImage
|
||||||
mv scrcpy*.AppImage* dist/.
|
mkdir -p AppDir/usr/local/share/scrcpy/
|
||||||
|
cp scrcpy_server AppDir/usr/local/share/scrcpy/scrcpy-server
|
||||||
|
./appimagetool*.AppImage AppDir -n -u 'gh-releases-zsync|srevinsaju|scrcpy-appimage|continuous|scrcpy*.AppImage.zsync' scrcpy-$(git describe --tags)-$(uname -m).AppImage
|
||||||
|
mkdir dist
|
||||||
|
mv scrcpy*.AppImage* dist/
|
||||||
|
|
||||||
- name: Upload Appimage
|
- name: Upload Appimage
|
||||||
uses: actions/upload-artifact@v1.0.0
|
uses: actions/upload-artifact@v1.0.0
|
||||||
|
@ -93,8 +108,10 @@ jobs:
|
||||||
name: scrcpy-continuous-x86_64.AppImage
|
name: scrcpy-continuous-x86_64.AppImage
|
||||||
path: 'scrcpy/dist/'
|
path: 'scrcpy/dist/'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Release:
|
Release:
|
||||||
needs: [centos]
|
needs: [ubuntu]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v1
|
- uses: actions/download-artifact@v1
|
||||||
|
|
2
AppRun
2
AppRun
|
@ -7,5 +7,5 @@ APPDIR="${APPDIR:-${here}}"
|
||||||
export ADB="${APPDIR}/usr/bin/adb"
|
export ADB="${APPDIR}/usr/bin/adb"
|
||||||
export SCRCPY_SERVER_PATH="${APPDIR}/usr/local/share/scrcpy/scrcpy-server"
|
export SCRCPY_SERVER_PATH="${APPDIR}/usr/local/share/scrcpy/scrcpy-server"
|
||||||
export PATH="${APPDIR}/usr/bin:${PATH}"
|
export PATH="${APPDIR}/usr/bin:${PATH}"
|
||||||
|
export LD_LIBRARY_PATH="${APPDIR}/usr/lib:${LD_LIBRARY_PATH}"
|
||||||
${APPDIR}/usr/bin/scrcpy
|
${APPDIR}/usr/bin/scrcpy
|
||||||
|
|
Loading…
Reference in a new issue