mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 00:59:18 +01:00
CI: Add AppImage Build (#452)
This commit is contained in:
parent
2f86622a68
commit
5d156672e8
48
.github/workflows/build.yml
vendored
48
.github/workflows/build.yml
vendored
@ -22,34 +22,36 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
|
|
||||||
- name: Setup release mode parameters (for deploy)
|
- name: Setup release mode parameters (for deploy)
|
||||||
if: ${{ inputs.deploymode == 'release' }}
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_MODE=release" >> $GITHUB_ENV
|
echo "BUILD_MODE=release" >> $GITHUB_ENV
|
||||||
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
||||||
echo "Build mode is release"
|
echo "Build mode is release"
|
||||||
|
|
||||||
- name: Setup debug mode parameters (for continous build)
|
- name: Setup debug mode parameters (for continous build)
|
||||||
if: ${{ inputs.deploymode != 'release' }}
|
if: ${{ inputs.deploymode != 'release' }}
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_MODE=debug" >> $GITHUB_ENV
|
echo "BUILD_MODE=debug" >> $GITHUB_ENV
|
||||||
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
echo "BUILD_FLAGS=" >> $GITHUB_ENV
|
||||||
echo "Build mode is debug"
|
echo "Build mode is debug"
|
||||||
|
|
||||||
- name: Setup version for experimental
|
- name: Setup version for experimental
|
||||||
if: ${{ inputs.experimentalversion != '' }}
|
if: ${{ inputs.experimentalversion != '' }}
|
||||||
run: |
|
run: |
|
||||||
echo "[INFO] Experimental version ${{ inputs.experimentalversion }}"
|
echo "[INFO] Experimental version ${{ inputs.experimentalversion }}"
|
||||||
echo "BUILD_FLAGS=${{ env.BUILD_FLAGS }} -DEXPERIMENTAL_VERSION=${{ inputs.experimentalversion }}" >> $GITHUB_ENV
|
echo "BUILD_FLAGS=${{ env.BUILD_FLAGS }} -DEXPERIMENTAL_VERSION=${{ inputs.experimentalversion }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: "Install system dependencies"
|
- name: "Install system dependencies"
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -qq
|
sudo apt update -qq
|
||||||
sudo apt install -y clang-12 cmake freeglut3-dev libgcrypt20-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev nasm ninja-build
|
sudo apt install -y clang-12 cmake freeglut3-dev libgcrypt20-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev nasm ninja-build
|
||||||
|
|
||||||
- name: "Bootstrap vcpkg"
|
- name: "Bootstrap vcpkg"
|
||||||
run: |
|
run: |
|
||||||
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
bash ./dependencies/vcpkg/bootstrap-vcpkg.sh
|
||||||
|
|
||||||
- name: 'Setup NuGet Credentials for vcpkg'
|
- name: 'Setup NuGet Credentials for vcpkg'
|
||||||
shell: 'bash'
|
shell: 'bash'
|
||||||
run: |
|
run: |
|
||||||
@ -66,15 +68,12 @@ jobs:
|
|||||||
|
|
||||||
- name: "cmake"
|
- name: "cmake"
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build
|
cmake -S . -B build ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DPORTABLE=OFF -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja
|
||||||
cd build
|
|
||||||
cmake .. ${{ env.BUILD_FLAGS }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_MODE }} -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja
|
|
||||||
|
|
||||||
- name: "Build Cemu"
|
- name: "Build Cemu"
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cmake --build build
|
||||||
ninja
|
|
||||||
|
|
||||||
- name: Prepare artifact
|
- name: Prepare artifact
|
||||||
if: ${{ inputs.deploymode == 'release' }}
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
run: mv bin/Cemu_release bin/Cemu
|
run: mv bin/Cemu_release bin/Cemu
|
||||||
@ -85,8 +84,33 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: cemu-bin-linux-x64
|
name: cemu-bin-linux-x64
|
||||||
path: ./bin/Cemu
|
path: ./bin/Cemu
|
||||||
|
|
||||||
|
build-appimage:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: build-ubuntu
|
||||||
|
steps:
|
||||||
|
- name: Checkout Upstream Repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-bin-linux-x64
|
||||||
|
path: bin
|
||||||
|
|
||||||
|
- name: "Install system dependencies"
|
||||||
|
run: |
|
||||||
|
sudo apt update -qq
|
||||||
|
sudo apt install -y clang-12 cmake freeglut3-dev libgcrypt20-dev libgtk-3-dev libpulse-dev libsecret-1-dev libsystemd-dev nasm ninja-build
|
||||||
|
|
||||||
|
- name: "Build AppImage"
|
||||||
|
run: dist/linux/appimage.sh
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-appimage-x64
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
|
2
.github/workflows/build_check.yml
vendored
2
.github/workflows/build_check.yml
vendored
@ -11,7 +11,7 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "*.md"
|
- "*.md"
|
||||||
branches:
|
branches:
|
||||||
- main
|
#- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -13,13 +13,18 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: call-release-build
|
needs: call-release-build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cemu-bin-linux-x64
|
name: cemu-bin-linux-x64
|
||||||
path: cemu-bin-linux-x64
|
path: cemu-bin-linux-x64
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-appimage-x64
|
||||||
|
path: cemu-appimage-x64
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cemu-bin-windows-x64
|
name: cemu-bin-windows-x64
|
||||||
@ -53,7 +58,14 @@ jobs:
|
|||||||
mv cemu-bin-windows-x64/Cemu.exe ./${{ env.CEMU_FOLDER_NAME }}/Cemu.exe
|
mv cemu-bin-windows-x64/Cemu.exe ./${{ env.CEMU_FOLDER_NAME }}/Cemu.exe
|
||||||
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-windows-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-windows-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||||
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
|
||||||
|
- name: Create appimage
|
||||||
|
run: |
|
||||||
|
VERSION=${{ env.CEMU_VERSION }}
|
||||||
|
echo "Cemu Version is $VERSION"
|
||||||
|
ls cemu-appimage-x64
|
||||||
|
mv cemu-appimage-x64/Cemu-*-x86_64.AppImage upload/Cemu-$VERSION-x86_64.AppImage
|
||||||
|
|
||||||
- name: Create release from linux-bin
|
- name: Create release from linux-bin
|
||||||
run: |
|
run: |
|
||||||
ls ./
|
ls ./
|
||||||
|
20
.github/workflows/deploy_stable_release.yml
vendored
20
.github/workflows/deploy_stable_release.yml
vendored
@ -15,13 +15,18 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: call-release-build
|
needs: call-release-build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cemu-bin-linux-x64
|
name: cemu-bin-linux-x64
|
||||||
path: cemu-bin-linux-x64
|
path: cemu-bin-linux-x64
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cemu-appimage-x64
|
||||||
|
path: cemu-appimage-x64
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cemu-bin-windows-x64
|
name: cemu-bin-windows-x64
|
||||||
@ -44,11 +49,7 @@ jobs:
|
|||||||
echo "Cemu CI version: $(./getversion)"
|
echo "Cemu CI version: $(./getversion)"
|
||||||
echo "CEMU_FOLDER_NAME=Cemu_$(./getversion)" >> $GITHUB_ENV
|
echo "CEMU_FOLDER_NAME=Cemu_$(./getversion)" >> $GITHUB_ENV
|
||||||
echo "CEMU_VERSION=$(./getversion)" >> $GITHUB_ENV
|
echo "CEMU_VERSION=$(./getversion)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create appimage
|
|
||||||
run: |
|
|
||||||
echo "to do"
|
|
||||||
|
|
||||||
- name: Create release from windows-bin
|
- name: Create release from windows-bin
|
||||||
run: |
|
run: |
|
||||||
ls ./
|
ls ./
|
||||||
@ -57,6 +58,13 @@ jobs:
|
|||||||
mv cemu-bin-windows-x64/Cemu.exe ./${{ env.CEMU_FOLDER_NAME }}/Cemu.exe
|
mv cemu-bin-windows-x64/Cemu.exe ./${{ env.CEMU_FOLDER_NAME }}/Cemu.exe
|
||||||
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-windows-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
zip -9 -r upload/cemu-${{ env.CEMU_VERSION }}-windows-x64.zip ${{ env.CEMU_FOLDER_NAME }}
|
||||||
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
rm -r ./${{ env.CEMU_FOLDER_NAME }}
|
||||||
|
|
||||||
|
- name: Create appimage
|
||||||
|
run: |
|
||||||
|
VERSION=${{ env.CEMU_VERSION }}
|
||||||
|
echo "Cemu Version is $VERSION"
|
||||||
|
ls cemu-appimage-x64
|
||||||
|
mv cemu-appimage-x64/Cemu-*-x86_64.AppImage upload/Cemu-$VERSION-x86_64.AppImage
|
||||||
|
|
||||||
- name: Create release from ubuntu-bin
|
- name: Create release from ubuntu-bin
|
||||||
run: |
|
run: |
|
||||||
|
50
dist/linux/appimage.sh
vendored
Executable file
50
dist/linux/appimage.sh
vendored
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ -z "${GITHUB_WORKSPACE}" ]; then
|
||||||
|
export GITHUB_WORKSPACE="."
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
|
||||||
|
chmod a+x linuxdeploy*.AppImage
|
||||||
|
curl -sSfL https://github.com$(curl https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous | grep "mkappimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) -o mkappimage.AppImage
|
||||||
|
chmod a+x mkappimage.AppImage
|
||||||
|
curl -sSfLO "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh"
|
||||||
|
chmod a+x linuxdeploy-plugin-gtk.sh
|
||||||
|
|
||||||
|
if [[ ! -e /usr/lib/x86_64-linux-gnu ]]; then
|
||||||
|
sed -i 's#lib\/x86_64-linux-gnu#lib64#g' linuxdeploy-plugin-gtk.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p AppDir/usr/
|
||||||
|
cp dist/linux/{info.cemu.Cemu.desktop,info.cemu.Cemu.png} AppDir/
|
||||||
|
|
||||||
|
mkdir -p AppDir/usr/share/applications
|
||||||
|
mkdir -p AppDir/usr/share/icons/hicolor/scalable/apps
|
||||||
|
mkdir -p AppDir/usr/lib
|
||||||
|
|
||||||
|
cp -r bin AppDir/usr/
|
||||||
|
cp /usr/lib/x86_64-linux-gnu/{libsepol.so.1,libffi.so.7,libpcre.so.3,libGLU.so.1} AppDir/usr/lib
|
||||||
|
|
||||||
|
chmod +x AppDir/usr/bin/Cemu
|
||||||
|
#chmod +x AppDir/AppRun
|
||||||
|
|
||||||
|
export UPD_INFO="gh-releases-zsync|cemu-project|Cemu|ci|Cemu.AppImage.zsync"
|
||||||
|
./linuxdeploy-x86_64.AppImage --appimage-extract-and-run\
|
||||||
|
--appdir="$GITHUB_WORKSPACE"/AppDir/ \
|
||||||
|
-d "$GITHUB_WORKSPACE"/AppDir/info.cemu.Cemu.desktop \
|
||||||
|
-i "$GITHUB_WORKSPACE"/AppDir/info.cemu.Cemu.png \
|
||||||
|
-e "$GITHUB_WORKSPACE"/AppDir/usr/bin/Cemu \
|
||||||
|
--plugin gtk
|
||||||
|
|
||||||
|
GITVERSION=$(git rev-parse --short HEAD)
|
||||||
|
echo $GITVERSION
|
||||||
|
if [[ -z ${GITVERSION} ]]; then
|
||||||
|
GITVERSION=experimental
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Cemu Version Cemu-${GITVERSION}"
|
||||||
|
rm AppDir/usr/lib/libwayland-client.so.0
|
||||||
|
VERSION=${GITVERSION} ./mkappimage.AppImage --appimage-extract-and-run "$GITHUB_WORKSPACE"/AppDir
|
||||||
|
|
||||||
|
mkdir -p "$GITHUB_WORKSPACE"/artifacts/
|
||||||
|
mv Cemu-${GITVERSION}-x86_64.AppImage "$GITHUB_WORKSPACE"/artifacts/
|
BIN
dist/linux/info.cemu.Cemu.png
vendored
Normal file
BIN
dist/linux/info.cemu.Cemu.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Loading…
Reference in New Issue
Block a user