diff --git a/.ci/linux-appimage/build.sh b/.ci/linux-appimage/build.sh new file mode 100755 index 0000000000..2d921a253a --- /dev/null +++ b/.ci/linux-appimage/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash -ex +mkdir -p "$HOME/.ccache" +docker run -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache citraemu/build-environments:linux-appimage /bin/bash -ex /citra/.ci/linux/docker.sh diff --git a/.ci/linux-appimage/docker.sh b/.ci/linux-appimage/docker.sh new file mode 100755 index 0000000000..c3576cd332 --- /dev/null +++ b/.ci/linux-appimage/docker.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +#Building Citra +mkdir build +cd build +cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON +ninja + +ctest -VV -C Release + +#Building AppDir +DESTDIR="./AppDir" ninja install +mv ./AppDir/usr/local/bin ./AppDir/usr +mv ./AppDir/usr/local/share ./AppDir/usr +rm -rf ./AppDir/usr/local + +#Circumvent missing LibFuse in Docker, by extracting the AppImage +export APPIMAGE_EXTRACT_AND_RUN=1 + +#Copy External Libraries +mkdir -p ./AppDir/usr/plugins/platformthemes +mkdir -p ./AppDir/usr/plugins/styles +cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqt5ct.so ./AppDir/usr/plugins/platformthemes +cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqgtk3.so ./AppDir/usr/plugins/platformthemes +cp /usr/lib/x86_64-linux-gnu/qt5/plugins/styles/libqt5ct-style.so ./AppDir/usr/plugins/styles + +#Build AppImage +/linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage diff --git a/.ci/linux-appimage/upload.sh b/.ci/linux-appimage/upload.sh new file mode 100755 index 0000000000..eee699b1cc --- /dev/null +++ b/.ci/linux-appimage/upload.sh @@ -0,0 +1,5 @@ +#!/bin/bash -ex + +. .ci/common/pre-upload.sh +REV_NAME="citra-linux-${GITDATE}-${GITREV}" +mv build/Citra*.AppImage "${GITHUB_WORKSPACE}"/artifacts/${REV_NAME}.AppImage diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6e5545aad..206586f85a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: ["linux-fresh", "linux-frozen", "linux-mingw"] + image: ["linux-appimage", "linux-fresh", "linux-frozen", "linux-mingw"] container: image: citraemu/build-environments:${{ matrix.image }} options: -u 1001 @@ -234,4 +234,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - asset_paths: '["./**/*.tar.*","./**/*.7z","./**/*.zip","./**/*.apk","./**/*.aab"]' + asset_paths: '["./**/*.tar.*","./**/*.AppImage","./**/*.7z","./**/*.zip","./**/*.apk","./**/*.aab"]'