From e60d4b39ee22c4ed8b7378eae26059c3222cc227 Mon Sep 17 00:00:00 2001 From: Dale Whinham Date: Fri, 3 Mar 2023 16:41:25 +0000 Subject: [PATCH] CI: Enable ccache --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b254e9a..484f215 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,11 @@ jobs: - name: Fetch submodules run: make submodules + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ env.toolchain-version }}-${{ matrix.board }} + - name: Cache ARM toolchains id: cache-toolchains uses: actions/cache@v3 @@ -66,8 +71,11 @@ jobs: - name: Update PATH run: | + mkdir ~/ccache_bin for triplet in arm-none-eabi aarch64-none-elf; do - echo "$HOME/arm-gnu-toolchain-${{ env.toolchain-version }}-x86_64-${triplet}/bin" >> $GITHUB_PATH + ln -s $(which ccache) ~/ccache_bin/${triplet}-gcc + ln -s $(which ccache) ~/ccache_bin/${triplet}-g++ + echo "$HOME/ccache_bin:$HOME/arm-gnu-toolchain-${{ env.toolchain-version }}-x86_64-${triplet}/bin" >> $GITHUB_PATH done - name: Build