Cache external submodules and depends in CI
Some checks failed
build / ARM v7 (push) Failing after 7m54s
build / i686 Linux (push) Failing after 16m50s
build / RISCV 64bit (push) Has been cancelled
build / x86_64 Freebsd (push) Has been cancelled
build / i686 Win (push) Has been cancelled

This commit is contained in:
t1amak
2026-03-19 14:08:39 +01:00
parent bbf529c3f0
commit 0cf90c4bc4

View File

@@ -43,8 +43,26 @@ jobs:
- name: Checkout - name: Checkout
uses: https://github.com/actions/checkout@v4 uses: https://github.com/actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 1
submodules: recursive fetch-tags: true
submodules: false
- name: Prepare submodule cache key
run: |
git submodule status --cached --recursive > .ci-submodules.lock
- name: Restore external cache
id: cache-external
uses: https://github.com/actions/cache@v3
with:
path: external
key: external-${{ hashFiles('.ci-submodules.lock') }}
- name: Sync submodules
if: steps.cache-external.outputs.cache-hit != 'true'
run: |
git submodule sync --recursive
git submodule update --init --recursive --depth 1
- name: Install dependencies - name: Install dependencies
run: | run: |
@@ -65,6 +83,17 @@ jobs:
zip \ zip \
${{ matrix.toolchain.packages }} ${{ matrix.toolchain.packages }}
- name: Restore depends cache
id: cache-depends
uses: https://github.com/actions/cache@v3
with:
path: |
contrib/depends/built
contrib/depends/sources
contrib/depends/work/build
contrib/depends/${{ matrix.toolchain.host }}
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/Makefile', 'contrib/depends/funcs.mk', 'contrib/depends/hosts/*.mk', 'contrib/depends/packages/*.mk', 'contrib/depends/toolchain.cmake.in') }}
- name: Prepare MinGW alternatives - name: Prepare MinGW alternatives
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'i686-w64-mingw32' }} if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'i686-w64-mingw32' }}
run: | run: |