@@ -28,31 +28,42 @@ jobs:
28
28
strategy :
29
29
fail-fast : false
30
30
matrix :
31
- ocaml-compiler : [4.14.x]
31
+ ocaml-compiler :
32
+ - 4.14
33
+ - 5.2
34
+ - 5.3
32
35
33
36
steps :
34
37
- name : Checkout code
35
- uses : actions/checkout@v3
38
+ uses : actions/checkout@v4
39
+
40
+ - name : Retrieve opam cache
41
+ uses : actions/cache@v4
42
+ if : runner.os != 'Windows'
43
+ id : cache-opam
44
+ with :
45
+ path : ~/.opam
46
+ key : v1-${{ runner.os }}-opam-${{ matrix.ocaml-compiler }}-${{ hashFiles('*.opam.locked') }}
36
47
37
48
- name : Use OCaml ${{ matrix.ocaml-version }}
38
- uses : ocaml/setup-ocaml@v2
49
+ uses : ocaml/setup-ocaml@v3
39
50
with :
40
51
ocaml-compiler : ${{ matrix.ocaml-compiler }}
41
52
dune-cache : true
42
53
opam-pin : true
43
- opam-depext : false
44
54
45
55
- name : Install system dependencies
46
56
run : sudo apt-get update -y && sudo apt-get install -y libmariadb-dev
47
57
48
- - name : Pin current guardian
49
- run : |
50
- opam pin add -yn guardian .
51
- OPAMSOLVERTIMEOUT=180 opam depext --with-test --with-doc -y guardian
52
-
53
58
- name : Install dependencies
54
59
run : opam install --deps-only --with-test --with-doc -y .
55
60
61
+ - name : Recover from an Opam broken state
62
+ if : steps.cache-opam.outputs.cache-hit == 'true'
63
+ run : |
64
+ opam install -y dune
65
+ opam upgrade --fixup
66
+
56
67
- name : Build
57
68
run : |
58
69
make build
@@ -71,15 +82,15 @@ jobs:
71
82
run : |
72
83
make doc
73
84
74
- - uses : actions/upload-artifact@v3
85
+ - uses : actions/upload-artifact@v4
75
86
with :
76
- name : documentation
87
+ name : documentation-${{ matrix.ocaml-compiler }}
77
88
path : _build/default/_doc/_html
78
89
79
- - uses : actions/upload-artifact@v3
90
+ - uses : actions/upload-artifact@v4
80
91
if : failure()
81
92
with :
82
- name : tests
93
+ name : tests-${{ matrix.ocaml-compiler }}
83
94
path : _build/default/test/_build/_tests/
84
95
85
96
- name : Notify about failure
@@ -98,13 +109,13 @@ jobs:
98
109
url : ${{ steps.deploy-doc.outputs.page_url }}
99
110
steps :
100
111
- name : Checkout code
101
- uses : actions/checkout@v3
112
+ uses : actions/checkout@v4
102
113
103
114
- name : Download all workflow run artifacts
104
- uses : actions/download-artifact@v3
115
+ uses : actions/download-artifact@v4
105
116
106
117
- name : Deploy odoc to GitHub Pages
107
- uses : peaceiris/actions-gh-pages@v3
118
+ uses : peaceiris/actions-gh-pages@v4
108
119
with :
109
120
github_token : ${{ github.token }}
110
121
publish_dir : documentation
@@ -121,13 +132,13 @@ jobs:
121
132
if : github.ref_type == 'tag'
122
133
steps :
123
134
- name : Checkout code
124
- uses : actions/checkout@v3
135
+ uses : actions/checkout@v4
125
136
126
137
- name : Extract version changelog
127
138
run : sed -nr "/^## .?v?${GITHUB_REF_NAME}/,/^## /p" CHANGELOG.md | sed '1d;2d;$d' > changes.md
128
139
129
140
- name : Create release
130
- uses : softprops/action-gh-release@v1
141
+ uses : softprops/action-gh-release@v2
131
142
with :
132
143
token : ${{ secrets.GITHUB_TOKEN }}
133
144
body_path : changes.md
0 commit comments