From 63f43b62bbbbc0448529720ba733df74328dbdf8 Mon Sep 17 00:00:00 2001 From: Escary <81011361+pflyly@users.noreply.github.com> Date: Tue, 10 Jun 2025 19:23:56 +0100 Subject: [PATCH] add ccache --- .github/workflows/appimage.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 0c63f1d9de..bddf9cb823 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -20,6 +20,7 @@ on: - 'Tools/**' - '.{editorconfig,gitattributes,gitignore}' - 'appveyor.yml' + workflow_dispatch: {} env: SDL_AUDIODRIVER: "dummy" #"disk" @@ -40,7 +41,10 @@ jobs: runs-on: ${{ matrix.os }} container: ghcr.io/pkgforge-dev/archlinux:latest - + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache + CCACHE_COMPILERCHECK: content + CCACHE_SLOPPINESS: time_macros steps: - name: Install git run: pacman -Syu --noconfirm git @@ -65,11 +69,13 @@ jobs: git remote add upstream https://github.com/hrydgard/ppsspp.git # fetching from official repo as a fallback git fetch --deepen=15000 --no-recurse-submodules --tags upstream || exit 0 - #- name: Setup ccache # Doesn't support archlinux container? - # uses: hendrikmuhs/ccache-action@v1.2 - # with: - # key: "linux-appimage-${{ matrix.id }}" - # create-symlink: true + - name: Set up ccache for ${{ matrix.id }} + uses: actions/cache@v4.2.3 + with: + path: ${{ env.CCACHE_DIR }} + key: ${{ runner.os }}-ccache-${{ matrix.id }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-ccache-${{ matrix.id }}- - name: Install dependencies shell: bash @@ -110,6 +116,7 @@ jobs: cmake \ ninja \ clang \ + ccache \ llvm-libs \ llvm \ lld \ @@ -195,7 +202,7 @@ jobs: #./b.sh --release --no-sdl2 --no-png mkdir -p build pushd build - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_SYSTEM_LIBSDL2=OFF -DUSE_SYSTEM_LIBPNG=OFF -DUSE_SYSTEM_FFMPEG=OFF .. + cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_SYSTEM_LIBSDL2=OFF -DUSE_SYSTEM_LIBPNG=OFF -DUSE_SYSTEM_FFMPEG=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .. make -j$(nproc) popd