Skip to content

Commit

Permalink
CI: separate cache per ocaml-version
Browse files Browse the repository at this point in the history
We currently compile 4.12.0 every run since only 4.07.1 is cached.
See #296 (comment).
  • Loading branch information
vogler committed Jul 28, 2021
1 parent eabcf45 commit 72ee51d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: build and run tests
# https://github.com/avsm/setup-ocaml
# https://github.com/ocaml/setup-ocaml

on:
- push
Expand Down Expand Up @@ -27,17 +27,17 @@ jobs:
uses: actions/checkout@v2

- name: Cache # https://github.com/marketplace/actions/cache
uses: actions/cache@v2.0.0
uses: actions/cache@v2
with:
# A list of files, directories, and wildcard patterns to cache and restore
path: |
~/.opam
_opam
# An explicit key for restoring and saving the cache
key: ${{ runner.os }}-new-${{ hashFiles('goblint.opam.locked') }}
key: opam-${{ runner.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('goblint.opam.locked') }}

- name: Setup OCaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v1
uses: ocaml/setup-ocaml@v1
with:
ocaml-version: ${{ matrix.ocaml-version }}

Expand Down

0 comments on commit 72ee51d

Please sign in to comment.