From 14826ae308868b149e6bd66af46bcd8236450a43 Mon Sep 17 00:00:00 2001 From: Chad Condon Date: Wed, 9 Sep 2026 22:05:32 -0700 Subject: [PATCH] CI: fix ccache cache effectiveness in basic.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The build matrix job ran ccache-action before actions/checkout, so checkout's directory-cleanup wiped the just-restored .ccache before any compilation, forcing a near-total cache miss on every run regardless of what changed. Move checkout first, matching every other job in this file. Also give the test_report, tap_validate, and source_archive jobs distinct ccache keys — they previously shared the default "ccache" key and thrashed each other's cache despite building different configs. --- .github/workflows/basic.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index 41bb0065..d2f7e128 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -211,6 +211,9 @@ jobs: sudo apt-get install -y ${{ matrix.apt_packages }} if: ${{ matrix.apt_packages }} + - name: Checkout + uses: actions/checkout@v7 + - uses: hendrikmuhs/ccache-action@v1.2.24 with: key: ${{ matrix.name }} @@ -219,9 +222,6 @@ jobs: - uses: carlosperate/arm-none-eabi-gcc-action@v1 if: ${{ matrix.name == 'GCC ARM embedded' }} - - name: Checkout - uses: actions/checkout@v7 - ## BUILD AND TEST - name: Workflow @@ -287,6 +287,7 @@ jobs: uses: actions/checkout@v7 - uses: hendrikmuhs/ccache-action@v1.2.24 with: + key: test_report variant: ccache - run: cmake --preset=defaults -DMUTINY_JUNIT_REPORT=TRUE - run: cmake --build --preset defaults @@ -313,6 +314,7 @@ jobs: uses: actions/checkout@v7 - uses: hendrikmuhs/ccache-action@v1.2.24 with: + key: tap_validate variant: ccache - run: cmake --preset=defaults - run: cmake --build --preset defaults @@ -390,6 +392,7 @@ jobs: uses: actions/checkout@v7 - uses: hendrikmuhs/ccache-action@v1.2.24 with: + key: source_archive variant: ccache - name: Configure run: cmake --preset GNU