From d97e867c07deda91f1384f5e893d54dd0881729f Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Tue, 30 Nov 2021 23:03:52 -0600 Subject: [PATCH] GHActions: Cache patchelf --- .github/workflows/linux-workflow.yml | 19 +++++++++++++++---- .../scripts/linux/install-packages.sh | 7 ------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/linux-workflow.yml b/.github/workflows/linux-workflow.yml index 618bf6b96e..89d2a9c1ba 100644 --- a/.github/workflows/linux-workflow.yml +++ b/.github/workflows/linux-workflow.yml @@ -93,6 +93,7 @@ jobs: CCACHE_COMPRESSLEVEL: 9 CCACHE_MAXSIZE: 100M SDL: SDL2-2.0.16 + PATCHELF_VERSION: 0.12 steps: # NOTE - useful for debugging @@ -158,14 +159,24 @@ jobs: COMPILER: ${{ matrix.compiler }} run: .github/workflows/scripts/linux/install-packages.sh - - name: Cache SDL2 + - name: Cache Dependencies uses: actions/cache@v2.1.7 with: - path: 3rdparty/${{ env.SDL }} - key: ${{ matrix.os }} ${{ matrix.platform }} ${{ env.SDL }} + path: | + 3rdparty/${{ env.SDL }} + 3rdparty/patchelf-${{ env.PATCHELF_VERSION }} + key: ${{ matrix.os }} ${{ matrix.platform }} ${{ env.SDL }} patchelf-${{ env.PATCHELF_VERSION }} - - name: Build SDL2 + - name: Build Dependencies run: | + if [[ ! -e 3rdparty/patchelf-${{ env.PATCHELF_VERSION }} ]]; then + curl -sSfL https://github.com/NixOS/patchelf/releases/download/${{ env.PATCHELF_VERSION }}/patchelf-${{ env.PATCHELF_VERSION }}.tar.bz2 | tar -xjC 3rdparty + mv 3rdparty/patchelf-${{ env.PATCHELF_VERSION }}* 3rdparty/patchelf-${{ env.PATCHELF_VERSION }} + cd 3rdparty/patchelf-${{ env.PATCHELF_VERSION }} + ./configure + make && cd ../../ + fi + sudo make -C 3rdparty/patchelf-${{ env.PATCHELF_VERSION }} install if [[ ! -e 3rdparty/${{ env.SDL }} ]]; then curl -sL https://libsdl.org/release/${{ env.SDL }}.tar.gz | tar -xzC 3rdparty cd 3rdparty/${{ env.SDL }} diff --git a/.github/workflows/scripts/linux/install-packages.sh b/.github/workflows/scripts/linux/install-packages.sh index cf9a09732d..8749d4522d 100755 --- a/.github/workflows/scripts/linux/install-packages.sh +++ b/.github/workflows/scripts/linux/install-packages.sh @@ -61,10 +61,3 @@ sudo apt-get -y install "${BUILD_PACKAGES[@]}" PCSX2_PACKAGES=("${PCSX2_PACKAGES[@]/%/"${ARCH}"}") echo "Will install the following packages for pcsx2 - ${PCSX2_PACKAGES[*]}" sudo apt-get -y install "${PCSX2_PACKAGES[@]}" - -cd /tmp -curl -sSfLO https://github.com/NixOS/patchelf/releases/download/0.12/patchelf-0.12.tar.bz2 -tar xvf patchelf-0.12.tar.bz2 -cd patchelf-0.12*/ -./configure -make && sudo make install