fix(ci): repair broken ccache in docs metadata jobs (#27583)

Both docs-orchestrator metadata jobs set CCACHE_DIR: ~/.ccache via the job env. Actions stores env values literally and ccache does not expand ~, so ccache used $GITHUB_WORKSPACE/~/.ccache while actions/cache saved and restored $HOME/.ccache. Every restore was empty and every save uploaded nothing, so px4_sitl_default rebuilt cold on every run.

Switch both jobs to the shared setup-ccache/save-ccache actions, which default ccache to $HOME/.ccache (matching the cached path) and apply the same base_dir, compiler_check, and compression settings used across the rest of CI.
This commit is contained in:
Jacob Dahl
2026-06-09 20:39:46 -04:00
committed by GitHub
parent 013797605f
commit 3b96afa1ec

View File

@@ -80,37 +80,22 @@ jobs:
- name: Configure Git Safe Directory
run: git config --system --add safe.directory '*'
- name: Cache Restore - ccache
id: cache-ccache
uses: actions/cache/restore@v5
- uses: ./.github/actions/setup-ccache
id: ccache
with:
path: ~/.ccache
key: ccache-docs-metadata-${{ github.sha }}
restore-keys: |
ccache-docs-metadata-
- name: Setup ccache
run: |
mkdir -p ~/.ccache
echo "max_size = 1G" > ~/.ccache/ccache.conf
cache-key-prefix: ccache-docs-metadata
max-size: 1G
- name: Build px4_sitl_default
run: |
make px4_sitl_default
env:
CCACHE_DIR: ~/.ccache
run: make px4_sitl_default
- name: Cache Save - ccache
uses: actions/cache/save@v5
- uses: ./.github/actions/save-ccache
if: always()
with:
path: ~/.ccache
key: ccache-docs-metadata-${{ github.sha }}
cache-primary-key: ${{ steps.ccache.outputs.cache-primary-key }}
- name: Generate and sync metadata
run: Tools/ci/metadata_sync.sh --generate --sync parameters airframes modules msg_docs failsafe_web
env:
CCACHE_DIR: ~/.ccache
- name: Upload metadata artifact
uses: actions/upload-artifact@v7
@@ -143,37 +128,22 @@ jobs:
- name: Git ownership workaround
run: git config --system --add safe.directory '*'
- name: Cache Restore - ccache
id: cache-ccache
uses: actions/cache/restore@v5
- uses: ./.github/actions/setup-ccache
id: ccache
with:
path: ~/.ccache
key: ccache-docs-metadata-${{ github.sha }}
restore-keys: |
ccache-docs-metadata-
- name: Setup ccache
run: |
mkdir -p ~/.ccache
echo "max_size = 1G" > ~/.ccache/ccache.conf
cache-key-prefix: ccache-docs-metadata
max-size: 1G
- name: Build px4_sitl_default
run: |
make px4_sitl_default
env:
CCACHE_DIR: ~/.ccache
run: make px4_sitl_default
- name: Cache Save - ccache
uses: actions/cache/save@v5
- uses: ./.github/actions/save-ccache
if: always()
with:
path: ~/.ccache
key: ccache-docs-metadata-${{ github.sha }}
cache-primary-key: ${{ steps.ccache.outputs.cache-primary-key }}
- name: Generate and sync metadata
run: Tools/ci/metadata_sync.sh --generate --sync parameters airframes modules msg_docs failsafe_web
env:
CCACHE_DIR: ~/.ccache
- name: Install Node.js and Yarn
run: |