File tree 2 files changed +24
-2
lines changed
2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 49
49
# (a more sophisticated script would instead remove %%expect blocks)
50
50
[[ " $changed_file " == testsuite/tests/* ]] && continue
51
51
52
+ # Don't check autoformatted files (there's a bug in `ocamlformat` that
53
+ # sometimes produces lines over 80 characters)
54
+ ocamlformat -m 1 " $changed_file " & > /dev/null || continue
55
+ # |^^^
56
+ # This setting causes `ocamlformat` to crash, but
57
+ # only if the formatter is run. Thus, we can use
58
+ # the return code to determine whether the file
59
+ # is autoformatted
60
+
52
61
# Bash doesn't allow for comments on multiline commands, so excuse the
53
- # workaround of putting groups of argument in a variable
62
+ # workaround of putting a group of arguments in a variable
54
63
f=' --old-line-format= --unchanged-line-format= --new-line-format=%dn:%L'
55
64
# |^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |^^^^^^^^^^^^^^^^^^^^^^^
56
65
# Don't print deleted or unchanged lines Show added lines (%L),
Original file line number Diff line number Diff line change 11
11
strategy :
12
12
matrix :
13
13
os : [ubuntu-latest]
14
+ ocaml-compiler :
15
+ - " 4.14.0"
14
16
15
17
steps :
16
18
- name : Checkout the Flambda backend repo
19
21
- name : Checkout the parent branch
20
22
run : git fetch origin HEAD --deepen 1
21
23
24
+ - name : Setup OCaml ${{ matrix.ocaml-compiler }}
25
+ uses : ocaml/setup-ocaml@v3
26
+ with :
27
+ ocaml-compiler : ${{ matrix.ocaml-compiler }}
28
+
29
+ - name : Install a recent version of re
30
+ run : opam install 're>=1.10.0'
31
+
32
+ - name : Install ocamlformat 0.24.1
33
+ run : opam pin -y ocamlformat 0.24.1
34
+
22
35
- name : Check for new >80 character lines
23
- run : bash .github/workflows/80ch.sh
36
+ run : opam exec -- bash .github/workflows/80ch.sh
You can’t perform that action at this time.
0 commit comments