From 024c0013196d513d3da7ac17a5332755a1c84c91 Mon Sep 17 00:00:00 2001 From: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Date: Wed, 8 Dec 2021 05:57:24 -0800 Subject: [PATCH 1/2] Install SDL 2.0.18 *Install SDL 2.0.18 *Disable external SDL 2.0.18 *Cache files --- .github/workflows/docker.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/docker.sh b/.github/workflows/docker.sh index 6b2d2cf40..4ba263f3b 100644 --- a/.github/workflows/docker.sh +++ b/.github/workflows/docker.sh @@ -14,6 +14,24 @@ find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/^.*-Werror find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/^.*-Werror=.*$/ /g' {} + find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/-Werror/-W/g' {} + +############################################### +# Install SDL +SDL2VER=2.0.18 +#SDL2 +cd $CACHEDIR +if [[ ! -e SDL2-${SDL2VER} ]]; then + curl -sLO https://libsdl.org/release/SDL2-${SDL2VER}.tar.gz + tar -xzf SDL2-${SDL2VER}.tar.gz + cd SDL2-${SDL2VER} + ./configure --prefix=/usr + make && cd ../ + rm SDL2-${SDL2VER}.tar.gz +fi +sudo make -C SDL2-${SDL2VER} install +sdl2-config --version +cd /yuzu +############################################### + pip3 install conan --upgrade mkdir build && cd build @@ -31,6 +49,7 @@ cmake .. \ -DENABLE_QT_TRANSLATION=ON \ -DBUILD_DATE="$build_date" \ -DYUZU_USE_QT_WEB_ENGINE=OFF \ + -DYUZU_USE_EXTERNAL_SDL2=OFF \ -G Ninja ninja From 3470d017443a076aa105a1a3e6d6f7d118fe9c81 Mon Sep 17 00:00:00 2001 From: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Date: Wed, 8 Dec 2021 06:19:15 -0800 Subject: [PATCH 2/2] cache SDL package Adding to cache removes 4 mins build time. --- .github/workflows/docker.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.sh b/.github/workflows/docker.sh index 4ba263f3b..43733e6fc 100644 --- a/.github/workflows/docker.sh +++ b/.github/workflows/docker.sh @@ -14,6 +14,12 @@ find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/^.*-Werror find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/^.*-Werror=.*$/ /g' {} + find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/-Werror/-W/g' {} + +# Add cache if does not exist +if [[ ! -e ~/.ccache ]]; then + mkdir ~/.ccache +fi +CACHEDIR=~/.ccache +ls -al $CACHEDIR ############################################### # Install SDL SDL2VER=2.0.18 @@ -27,7 +33,7 @@ if [[ ! -e SDL2-${SDL2VER} ]]; then make && cd ../ rm SDL2-${SDL2VER}.tar.gz fi -sudo make -C SDL2-${SDL2VER} install +make -C SDL2-${SDL2VER} install sdl2-config --version cd /yuzu ############################################### @@ -49,7 +55,7 @@ cmake .. \ -DENABLE_QT_TRANSLATION=ON \ -DBUILD_DATE="$build_date" \ -DYUZU_USE_QT_WEB_ENGINE=OFF \ - -DYUZU_USE_EXTERNAL_SDL2=OFF \ + -DYUZU_USE_EXTERNAL_SDL2=OFF \ -G Ninja ninja