From 0169c08350eea79b54cdd108a8175abd7b69e31f Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Thu, 16 Jan 2025 14:32:54 -0600 Subject: [PATCH] Updated SDL and added cache on linux --- .github/workflows/main.yml | 41 +++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 024f7cc4..43f4bd5f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -114,15 +114,36 @@ jobs: submodules: recursive - name: Install dependencies run: sudo apt-get install gcc g++ git cmake ninja-build lsb-release libsdl2-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2.14 + with: + key: linux-ccache-${{ github.ref }}-${{ github.sha }} + restore-keys: | + linux-ccache-${{ github.ref }} + linux-ccache- + - name: Cache build folders + uses: actions/cache@v4 + with: + key: linux-build-${{ github.ref }}-${{ github.sha }} + restore-keys: | + linux-build-${{ github.ref }} + linux-build- + path: | + SDL2-2.30.3 + tinyxml2-10.0.0 + libzip-1.10.1 - name: Install latest SDL run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - wget https://www.libsdl.org/release/SDL2-2.24.1.tar.gz - tar -xzf SDL2-2.24.1.tar.gz - cd SDL2-2.24.1 + if [ ! -d "SDL2-2.30.3" ]; then + wget https://www.libsdl.org/release/SDL2-2.30.3.tar.gz + tar -xzf SDL2-2.30.3.tar.gz + fi + cd SDL2-2.30.3 ./configure --enable-hidapi-libusb make -j 10 sudo make install + sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/ - name: Install latest tinyxml2 run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" @@ -134,6 +155,20 @@ jobs: cmake .. make sudo make install + - name: Install libzip without crypto + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + if [ ! -d "libzip-1.10.1" ]; then + wget https://github.com/nih-at/libzip/releases/download/v1.10.1/libzip-1.10.1.tar.gz + tar -xzf libzip-1.10.1.tar.gz + fi + cd libzip-1.10.1 + mkdir -p build + cd build + cmake .. -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF + make + sudo make install + sudo cp -av /usr/local/lib/libzip* /lib/x86_64-linux-gnu/ - name: Download starship.o2r uses: actions/download-artifact@v4 with: