Skip to content

Sharun CI

Sharun CI #35

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Sharun CI
# Controls when the action will run.
on:
# Build at 00:00 on every 12th day-of-month.
schedule:
- cron: "0 0 */6 * *"
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
paths-ignore: [ '**/README.md' ]
pull_request:
branches: [ main ]
paths-ignore: [ '**/README.md' ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build-stable"
build-stable:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Prerequisites
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y
sudo apt update
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install -y xvfb qt6ct libspa-0.2-dev libpipewire-0.3-0 libpipewire-0.3-modules \
libspa-0.2-modules libxcb-cursor0 build-essential git cmake ffmpeg mesa-utils \
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libevdev-dev libusb-1.0-0-dev \
libxrandr-dev libxi-dev libpangocairo-1.0-0 qt6-base-private-dev libqt6svg6-dev libbluetooth-dev \
libasound2-dev libpulse-dev libgl1-mesa-dev libcurl4-openssl-dev libsystemd-dev
####################################################################
sudo apt-get install -y build-essential desktop-file-utils dialog dpkg liblz4-dev liblzma-dev libssl-dev libopus-dev libpng-dev \
libzip-dev libzstd-dev zlib1g-dev pulseaudio p7zip p7zip-full libsfml-dev libminiupnpc-dev libmbedtls-dev libpugixml-dev \
libbz2-dev liblzo2-dev libc6-dev libhidapi-dev libavdevice-dev \
libfmt-dev libwayland-dev libglu1-mesa-dev x11-utils zenity wget curl git gettext ccache make cmake ninja-build \
libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-icccm4 libxcb-image0-dev libxcb-cursor-dev
sudo apt install git cmake pkg-config gcc mesa-common-dev libxext-dev libreadline-dev libglu1-mesa-dev libudev-dev -y
sudo apt-get install make cmake git g++ libsdl1.2-dev libxext-dev libao-dev -y
sudo apt install --no-install-recommends ca-certificates ninja-build git cmake make g++-11 gcc-11 pkg-config libudev-dev \
libsfml-dev libminiupnpc-dev libmbedtls-dev libhidapi-dev libpugixml-dev libbz2-dev libzstd-dev liblzo2-dev libpng-dev -y
sudo apt install git -y
sudo apt install libstdc++6 libc++-dev libc++abi-dev -y
version=$(apt-cache pkgnames | sed -nr 's/^gcc-(([0-9]+\.?)+)$/\1/p' \
| sort -n | tail -n1)
echo "The latest available GCC version: $version"
sudo apt-get install gcc-$version g++-$version
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$version 60 --slave /usr/bin/g++ g++ /usr/bin/g++-$version
sudo apt remove --purge llvm-* clang-* -y
sudo apt autoremove -y
git clone --filter="blob:none" --depth=1 -b master https://github.com/dolphin-emu/dolphin.git dolphin-emu
#export VERSION2=$(git tag | tail -n 1)
mkdir -p lucas/usr/lib/
mkdir -p lucas2/shared/lib/
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ${{github.workspace}}/lucas2/shared/lib/
cd ./dolphin-emu
git submodule update --init --recursive
[ "${COMMIT:=}" ] && git fetch --unshallow --tags && git checkout "$COMMIT"
HEAD="$(git rev-parse --short HEAD)"
DATE="$(git show -s --format=%cd --date=format:%Y.%m.%d)"
VERSION="${DATE}_$HEAD"
mkdir -p "$HOME/.ccache"
mkdir Build && cd Build
cmake .. -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DLINUX_LOCAL_DEV=true
sudo ninja install
cd ../../
# Runs a set of commands using the runners shell
- name: Build appimage
run: |
export PATH="$PATH:${{github.workspace}}"
export APPIMAGE_EXTRACT_AND_RUN=1
export ARCH="$(uname -m)"
APPIMAGETOOL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$ARCH.AppImage"
LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin"
#DESKTOP="https://raw.githubusercontent.com/dolphin-emu/dolphin/refs/heads/master/Data/dolphin-emu.desktop"
ICON="https://github.com/dolphin-emu/dolphin/blob/master/Data/dolphin-emu.png?raw=true"
UPINFO="gh-releases-zsync|$(echo "$GITHUB_REPOSITORY" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
# Prepare AppDir
cd lucas2/
cat <<-'HEREDOC' > ./dolphin-emu.desktop
[Desktop Entry]
Version=1.0
Icon=dolphin-emu
Exec=dolphin-emu
Terminal=false
Type=Application
Categories=Game;Emulator;
Name=Dolphin Emulator
GenericName=Wii/GameCube Emulator
StartupWMClass=dolphin-emu
Comment=A Wii/GameCube Emulator
X-AppImage-Version=5.0-16793
HEREDOC
wget -q --retry-connrefused --tries=30 "$ICON" -O ./dolphin-emu.png
# Bundle all libs
wget -q --retry-connrefused --tries=30 "$LIB4BN" -O ./lib4bin
chmod +x ./lib4bin
xvfb-run -- ./lib4bin -p -v -r -e -s -k /usr/local/bin/dolphin-*
# for some reason the dir needs a capital S?
cp -r /usr/local/share/dolphin-emu/sys ./bin/Sys
# Deploy Qt manually xd
mkdir -p ./shared/lib/qt6/plugins
cp -vr /usr/lib/x86_64-linux-gnu/qt6/plugins/iconengines ./shared/lib/qt6/plugins
cp -vr /usr/lib/x86_64-linux-gnu/qt6/plugins/imageformats ./shared/lib/qt6/plugins
cp -vr /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms ./shared/lib/qt6/plugins
cp -vr /usr/lib/x86_64-linux-gnu/qt6/plugins/platformthemes ./shared/lib/qt6/plugins || true
cp -vr /usr/lib/x86_64-linux-gnu/qt6/plugins/styles ./shared/lib/qt6/plugins
cp -vr /usr/lib/x86_64-linux-gnu/qt6/plugins/xcbglintegrations ./shared/lib/qt6/plugins
cp -vr /usr/lib/x86_64-linux-gnu/qt6/plugins/wayland-* ./shared/lib/qt6/plugins || true
ldd ./shared/lib/qt6/plugins/*/* 2>/dev/null \
| awk -F"[> ]" '{print $4}' | xargs -I {} cp -nv {} ./shared/lib || true
# Bundle pipewire
cp -vr /usr/lib/x86_64-linux-gnu/pipewire-0.3 ./shared/lib
cp -vr /usr/lib/x86_64-linux-gnu/spa-0.2 ./shared/lib
# Prepare sharun
ln ./sharun ./AppRun
./sharun -g
cd ..
# Make AppImage with the static appimage runtime (removes libfuse2 dependency).
wget -q --retry-connrefused --tries=30 "$APPIMAGETOOL" -O ./appimagetool
chmod +x ./appimagetool
./appimagetool -n -u "$UPINFO" lucas2/
echo "$PWD"
ls .
- name: release
uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303"
with:
title: Continuous Sharun
automatic_release_tag: continuous-Sharun
prerelease: false
draft: false
files: /home/runner/work/Dolphin_emu_Appimage/Dolphin_emu_Appimage/*.AppImage*
repo_token: "${{ secrets.GITHUB_TOKEN }}"