Skip to content

Commit

Permalink
Add bazel disk cache
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Oct 20, 2023
1 parent 906007a commit d5bfc4b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/gki-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ jobs:
max-size: 2G
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

- name: Setup bazel disk cache
if: inputs.use_cache == true
uses: actions/cache@v3
with:
key: gki-kernel-aarch64-${{ inputs.version }}
path: "/home/runner/.cache/bazel"
max-size: 2G
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

- name: Build boot.img
working-directory: android-kernel
run: |
Expand All @@ -167,7 +176,7 @@ jobs:
if [ -e build/build.sh ]; then
CCACHE="/usr/bin/ccache" LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
else
tools/bazel run --lto=thin //common:kernel_aarch64_dist -- --dist_dir=dist
tools/bazel run --disk_cache=/home/runner/.cache/bazel --lto=thin //common:kernel_aarch64_dist -- --dist_dir=dist
fi
- name: Prepare artifacts
Expand Down

0 comments on commit d5bfc4b

Please sign in to comment.