yuzu/.github/workflows/docker.sh

51 lines
1.5 KiB
Bash
Raw Normal View History

2020-12-29 23:15:51 +04:00
#!/bin/bash -ex
BRANCH=`echo ${GITHUB_REF##*/}`
2020-12-30 02:52:33 +04:00
ver=$(cat /yuzu/README.md | grep -o 'early-access [[:digit:]]*' | cut -c 14-17)
2020-12-30 00:23:31 +04:00
title="yuzu Early Access $ver"
2020-12-29 23:15:51 +04:00
ln -s /home/yuzu/.conan /root
2020-12-29 23:15:51 +04:00
#SDL-2.0.15-14858.tar.gz
mkdir SDL2 && cd SDL2
curl -sLO http://libsdl.org/tmp/SDL-2.0.15-14858.tar.gz
tar -xzf SDL-2.0.15-14858.tar.gz
cd SDL-2.0.15-14858
./configure --prefix=/usr
make && make install
cd ../../
2020-12-29 23:39:55 +04:00
yuzupatch=( $(ls -d patches/* ) )
2020-12-30 00:14:44 +04:00
for i in "${yuzupatch[@]}"; do patch -p1 < "$i"; done
2020-12-29 23:15:51 +04:00
2020-12-31 00:25:13 +04:00
find . -name "CMakeLists.txt" -exec sed -i 's/^.*-Werror$/-W/g' {} +
find . -name "CMakeLists.txt" -exec sed -i 's/^.*-Werror=.*)$/ )/g' {} +
find . -name "CMakeLists.txt" -exec sed -i 's/^.*-Werror=.*$/ /g' {} +
find . -name "CMakeLists.txt" -exec sed -i 's/-Werror/-W/g' {} +
2020-12-29 23:15:51 +04:00
mkdir build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
-DTITLE_BAR_FORMAT_IDLE="$title" \
-DTITLE_BAR_FORMAT_RUNNING="$title | {3}" \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
-DGIT_BRANCH="HEAD" \
-DGIT_DESC="$msvc" \
-DUSE_DISCORD_PRESENCE=ON \
-DENABLE_QT_TRANSLATION=ON \
-DBUILD_DATE="$build_date" \
-DYUZU_USE_QT_WEB_ENGINE=OFF \
-G Ninja
2020-12-30 00:23:31 +04:00
ninja
cd /tmp
curl -sLO "https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$BRANCH/.github/workflows/appimage.sh"
chmod a+x appimage.sh
./appimage.sh