diff options
Diffstat (limited to '.ci/scripts/linux/docker.sh')
| -rwxr-xr-x | .ci/scripts/linux/docker.sh | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/.ci/scripts/linux/docker.sh b/.ci/scripts/linux/docker.sh index e0c018cfd..39b1f77d7 100755 --- a/.ci/scripts/linux/docker.sh +++ b/.ci/scripts/linux/docker.sh | |||
| @@ -1,14 +1,49 @@ | |||
| 1 | #!/bin/bash -ex | 1 | #!/bin/bash -ex |
| 2 | 2 | ||
| 3 | # Exit on error, rather than continuing with the rest of the script. | ||
| 4 | set -e | ||
| 5 | |||
| 3 | cd /yuzu | 6 | cd /yuzu |
| 4 | 7 | ||
| 5 | ccache -s | 8 | ccache -s |
| 6 | 9 | ||
| 7 | mkdir build || true && cd build | 10 | mkdir build || true && cd build |
| 8 | cmake .. -G Ninja -DDISPLAY_VERSION=$1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON | 11 | cmake .. -DDISPLAY_VERSION=$1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_INSTALL_PREFIX="/usr" |
| 9 | 12 | ||
| 10 | ninja | 13 | make -j$(nproc) |
| 11 | 14 | ||
| 12 | ccache -s | 15 | ccache -s |
| 13 | 16 | ||
| 14 | ctest -VV -C Release | 17 | ctest -VV -C Release |
| 18 | |||
| 19 | make install DESTDIR=AppDir | ||
| 20 | rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester | ||
| 21 | |||
| 22 | # Download tools needed to build an AppImage | ||
| 23 | wget -nc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | ||
| 24 | wget -nc https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | ||
| 25 | wget -nc https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64 | ||
| 26 | wget -nc https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so | ||
| 27 | # Set executable bit | ||
| 28 | chmod 755 \ | ||
| 29 | AppRun-patched-x86_64 \ | ||
| 30 | exec-x86_64.so \ | ||
| 31 | linuxdeploy-x86_64.AppImage \ | ||
| 32 | linuxdeploy-plugin-qt-x86_64.AppImage | ||
| 33 | |||
| 34 | # Workaround for https://github.com/AppImage/AppImageKit/issues/828 | ||
| 35 | export APPIMAGE_EXTRACT_AND_RUN=1 | ||
| 36 | |||
| 37 | mkdir -p AppDir/usr/optional | ||
| 38 | mkdir -p AppDir/usr/optional/libstdc++ | ||
| 39 | mkdir -p AppDir/usr/optional/libgcc_s | ||
| 40 | |||
| 41 | # Deploy yuzu's needed dependencies | ||
| 42 | ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt | ||
| 43 | |||
| 44 | # Workaround for building yuzu with GCC 10 but also trying to distribute it to Ubuntu 18.04 et al. | ||
| 45 | # See https://github.com/darealshinji/AppImageKit-checkrt | ||
| 46 | cp exec-x86_64.so AppDir/usr/optional/exec.so | ||
| 47 | cp AppRun-patched-x86_64 AppDir/AppRun | ||
| 48 | cp --dereference /usr/lib/x86_64-linux-gnu/libstdc++.so.6 AppDir/usr/optional/libstdc++/libstdc++.so.6 | ||
| 49 | cp --dereference /lib/x86_64-linux-gnu/libgcc_s.so.1 AppDir/usr/optional/libgcc_s/libgcc_s.so.1 | ||