Skip to content

Commit 9e4192a

Browse files
committed
CI: Add a cache to windows CI
1 parent 0a2b1eb commit 9e4192a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ jobs:
144144
- name: Fetch tags
145145
run: git fetch --tags --force origin
146146

147+
- uses: actions/cache@v5
148+
id: wincache
149+
with:
150+
path: |
151+
~/.opam
152+
_opam
153+
key: windows-${{ hashFiles('*.opam') }}
154+
147155
- name: Install OCaml ${{ matrix.ocaml-compiler }}
148156
uses: ocaml/setup-ocaml@v3
149157
with:
@@ -157,8 +165,13 @@ jobs:
157165
# run: opam install conf-mingw-w64-gmp-x86_64 conf-mingw-w64-libffi-x86_64 conf-mingw-w64-openssl-x86_64 -y
158166

159167
- name: Install dependencies
168+
if: steps.wincache.outputs.cache-hit != 'true'
160169
run: opam install --deps-only --with-test --with-doc -y .
161170

171+
- name: Install dependencies
172+
if: steps.wincache.outputs.cache-hit
173+
run: opam install --deps-only --with-test --depext-only --with-doc -y . && opam upgrade
174+
162175
# - name: Build Windows executable
163176
# run: |
164177
# opam exec -- dune build --profile release -p slipshow

0 commit comments

Comments
 (0)