@@ -68,40 +68,25 @@ jobs:
6868 with :
6969 config : .github/config/licenserc.yml
7070
71- prepare-deps-cache :
72- name : Prepare dependency cache
73- needs : [precondition]
74- if : ${{ needs.precondition.outputs.docs_only != 'true' }}
75- runs-on : ubuntu-22.04
76- steps :
77- - uses : actions/checkout@v6
78- - name : Cache Kvrocks dependencies
79- id : cache-kvrocks-deps
80- uses : actions/cache@v5
81- with :
82- path : ${{ env.KVROCKS_DEPS_CACHE_DIR }}
83- key : kvrocks-full-deps-${{ hashFiles('x.py', 'CMakeLists.txt', 'cmake/**/*.cmake') }}
84- enableCrossOsArchive : true
85- - name : Warm Kvrocks dependency cache
86- if : ${{ steps.cache-kvrocks-deps.outputs.cache-hit != 'true' }}
87- run : |
88- ./x.py build .github/ci-cache-default --skip-build --dep-dir ${{ env.KVROCKS_DEPS_CACHE_DIR }}
89- ./x.py build .github/ci-cache-lua --skip-build --dep-dir ${{ env.KVROCKS_DEPS_CACHE_DIR }} -D ENABLE_LUAJIT=OFF
90- rm -rf .github/ci-cache-default .github/ci-cache-lua
91-
9271 check-and-lint :
9372 name : Lint and check code
94- needs : [precondition, check-typos, prepare-deps-cache ]
73+ needs : [precondition, check-typos]
9574 if : ${{ needs.precondition.outputs.docs_only != 'true' }}
9675 runs-on : ubuntu-24.04
9776 steps :
9877 - uses : actions/checkout@v6
9978 - name : Restore Kvrocks dependency cache
79+ id : cache-kvrocks-deps
10080 uses : actions/cache@v5
10181 with :
10282 path : ${{ env.KVROCKS_DEPS_CACHE_DIR }}
10383 key : kvrocks-full-deps-${{ hashFiles('x.py', 'CMakeLists.txt', 'cmake/**/*.cmake') }}
10484 enableCrossOsArchive : true
85+ - name : Fetch Kvrocks dependencies
86+ if : ${{ steps.cache-kvrocks-deps.outputs.cache-hit != 'true' }}
87+ run : |
88+ ./x.py fetch-deps ${{ env.KVROCKS_DEPS_CACHE_DIR }}
89+ ./x.py fetch-deps ${{ env.KVROCKS_DEPS_CACHE_DIR }} -D ENABLE_LUAJIT=OFF
10590 - uses : actions/setup-go@v6
10691 with :
10792 go-version-file : ' tests/gocase/go.mod'
@@ -135,7 +120,7 @@ jobs:
135120
136121 build-and-test :
137122 name : Build and test
138- needs : [precondition, check-typos, prepare-deps-cache ]
123+ needs : [precondition, check-typos]
139124 if : ${{ needs.precondition.outputs.docs_only != 'true' }}
140125 strategy :
141126 fail-fast : false
@@ -528,7 +513,7 @@ jobs:
528513
529514 build-and-test-in-container :
530515 name : Build and test in container
531- needs : [precondition, check-typos, prepare-deps-cache ]
516+ needs : [precondition, check-typos]
532517 if : ${{ needs.precondition.outputs.docs_only != 'true' }}
533518 strategy :
534519 fail-fast : false
0 commit comments