From 75be1e1bd607e0b588b3f95a3554cdf14598bb0c Mon Sep 17 00:00:00 2001 From: Howard Wu Date: Tue, 18 Apr 2023 12:12:03 +0800 Subject: [PATCH] ci: avoid ccache key conflict (#397) --- .github/workflows/gki-kernel.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gki-kernel.yml b/.github/workflows/gki-kernel.yml index ec06220d..b256a92e 100644 --- a/.github/workflows/gki-kernel.yml +++ b/.github/workflows/gki-kernel.yml @@ -64,7 +64,6 @@ jobs: env: CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion" CCACHE_NOHASHDIR: "true" - CCACHE_MAXSIZE: "2G" CCACHE_HARDLINK: "true" steps: - uses: actions/checkout@v3 @@ -72,13 +71,6 @@ jobs: path: KernelSU fetch-depth: 0 - - uses: hendrikmuhs/ccache-action@v1.2 - if: inputs.use_cache == true - with: - key: ccache-aarch64-${{ inputs.version_name }} - append-timestamp: false - save: ${{ github.event_name != 'pull_request' }} - - name: Setup need_upload id: need_upload run: | @@ -124,6 +116,14 @@ jobs: echo "[+] Add KernelSU symbols" cat $KSU_ROOT/kernel/export_symbol.txt | awk '{sub("[ \t]+","");print " "$0}' >> $SYMBOL_LIST + - name: Settup ccache + if: inputs.use_cache == true + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: gki-kernel-aarch64-${{ inputs.version_name }} + max-size: 2G + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + - name: Build boot.img working-directory: android-kernel run: CCACHE="/usr/bin/ccache" LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh @@ -149,4 +149,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: AnyKernel3-${{ inputs.version_name }}_${{ inputs.os_patch_level }} - path: ./AnyKernel3/* \ No newline at end of file + path: ./AnyKernel3/*