[github] fix opam cache

Summary:
Fix the path to ~/.opam, and move *before* the OCaml setup so that OCaml
is cached too.

I'm not convinced it ever worked, as `${HOME}` is not interpreted by the
action.

Reviewed By: martintrojer

Differential Revision: D24160822

fbshipit-source-id: b1e0fcd59
master
Jules Villard 4 years ago committed by Facebook GitHub Bot
parent 5edfbbaaf7
commit 6e3435b8e3

@ -21,17 +21,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Restore opam cache
uses: actions/cache@v2
with:
path: ~/.opam
key: opam-${{ runner.os }}-${{ hashFiles('opam.locked') }}
- name: Use OCaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v1
with:
ocaml-version: ${{ matrix.ocaml-version }}
- name: Restore opam cache
uses: actions/cache@v2
with:
path: ${HOME}/.opam
key: ${{ runner.os }}-${{ hashFiles('opam.locked') }}
- name: Install Required Brew Packages for MacOS
run: brew install pkg-config automake jq
if: runner.os == 'macOS'

Loading…
Cancel
Save