Skip to content

Cache opam

Cache opam #110

Workflow file for this run

on:
push:
jobs:
ide:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }}
- name: Setup Node.js environment
uses: actions/setup-node@v4
- run: npm ci
working-directory: ide
server:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }}
- name: Use OCaml
with:
ocaml-compiler: 4.14.0
dune-cache: true
uses: ocaml/setup-ocaml@v2
- name: OCaml cache
id: ocaml-cache
uses: actions/cache@v3
env:
cache-name: cache-ocaml
with:
path: _opam
key: ${{ runner.os }}-${{ env.cache-name }}-ocaml5.2-${{ hashFiles('**/*.opam') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-ocaml5.2
- run: opam install . --deps-only
- run: opam exec -- dune build
# Cleanup _opam before updating cache
- if: ${{ steps.cache-ocaml.outputs.cache-hit != 'true' }}
name: Cleanup _opam before updating cache
continue-on-error: true
run: opam clean