Skip to content

Commit

Permalink
Fix workflow (ish)
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Mar 5, 2024
1 parent 6ff2174 commit 9fa3963
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.ml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ let get_cache_cont : type s . s cache_name -> s = function
| _ -> fun _ b -> b in
let is_windows = if_windows true false in f
{name = Printf.sprintf "OCaml %s" version;
key = Printf.sprintf "${{ runner.os }}%s-ocaml-%s-${{ %s.outputs.ocaml-cache }}-${{ %s.outputs.archives }}" (if_windows ("-" ^ host) "") version version;
key =
(fun step -> Printf.sprintf "${{ runner.os }}%s-ocaml-%s-${{ %s.outputs.ocaml-cache }}-${{ %s.outputs.archives }}" (if_windows ("-" ^ host) "") version step step);
id = "ocaml-cache";
force_gzip = is_windows;
paths = [if_windows {|D:\Cache\ocaml-local.tar|} "~/.cache/ocaml-local/**"];
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/ocaml-local/**
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ ${{ matrix.ocamlv }}.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
- name: Create OCaml ${{ matrix.ocamlv }} cache
if: steps.ocaml-cache.outputs.cache-hit != 'true'
run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }}
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
uses: ocaml-opam/cache@opam
with:
path: D:\Cache\ocaml-local.tar
key: ${{ runner.os }}-${{ matrix.host }}-ocaml-${{ matrix.ocamlv }}-${{ ${{ matrix.ocamlv }}.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
key: ${{ runner.os }}-${{ matrix.host }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
force-gzip: true
- name: Unpack Cygwin
shell: cmd
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/ocaml-local/**
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ ${{ matrix.ocamlv }}.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
- name: Create OCaml ${{ matrix.ocamlv }} cache
if: steps.ocaml-cache.outputs.cache-hit != 'true'
run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }}
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/ocaml-local/**
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ ${{ matrix.ocamlv }}.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
- name: Create OCaml ${{ matrix.ocamlv }} cache
if: steps.ocaml-cache.outputs.cache-hit != 'true'
run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }}
Expand Down Expand Up @@ -339,7 +339,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/ocaml-local/**
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ ${{ matrix.ocamlv }}.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
- name: Create OCaml ${{ matrix.ocamlv }} cache
if: steps.ocaml-cache.outputs.cache-hit != 'true'
run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }}
Expand Down Expand Up @@ -428,7 +428,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/ocaml-local/**
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ ${{ matrix.ocamlv }}.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
- name: Create OCaml ${{ matrix.ocamlv }} cache
if: steps.ocaml-cache.outputs.cache-hit != 'true'
run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }}
Expand Down Expand Up @@ -474,7 +474,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/ocaml-local/**
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ ${{ matrix.ocamlv }}.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
- name: Create OCaml ${{ matrix.ocamlv }} cache
if: steps.ocaml-cache.outputs.cache-hit != 'true'
run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }}
Expand Down Expand Up @@ -517,7 +517,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/ocaml-local/**
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ ${{ matrix.ocamlv }}.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
- name: Create OCaml ${{ matrix.ocamlv }} cache
if: steps.ocaml-cache.outputs.cache-hit != 'true'
run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }}
Expand Down Expand Up @@ -548,7 +548,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/ocaml-local/**
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ ${{ matrix.ocamlv }}.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
key: ${{ runner.os }}-ocaml-${{ matrix.ocamlv }}-${{ needs.Analyse.outputs.ocaml-cache }}-${{ needs.Analyse.outputs.archives }}
- name: Create OCaml ${{ matrix.ocamlv }} cache
if: steps.ocaml-cache.outputs.cache-hit != 'true'
run: bash -exu .github/scripts/main/ocaml-cache.sh ${{ runner.os }} ${{ matrix.ocamlv }}
Expand Down

0 comments on commit 9fa3963

Please sign in to comment.