Skip to content

Commit 93ef2b1

Browse files
committed
GHA: Ignore errors on trunk
1 parent 392626d commit 93ef2b1

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/ci.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ let latest_ocaml5 = "5.4.0-beta2" (* Add this number to ocamls below when the ne
1818
let ocamls = [
1919
(* Fully supported versions *)
2020
"4.08.1"; "4.09.1"; "4.10.2"; "4.11.2"; "4.12.1"; "4.13.1";
21-
"5.0.0"; "5.1.1"; "5.2.1"; "5.3.0"; "trunk";
21+
"5.0.0"; "5.1.1"; "5.2.1"; "5.3.0";
22+
"trunk";
2223

2324
(* The last elements of the list after 4.14 will be used as default versions *)
2425
latest_ocaml4; latest_ocaml5;
@@ -333,7 +334,8 @@ let main_build_job ~analyse_job ~cygwin_job ?section runner start_version ~oc ~w
333334
let matrix = ((platform <> Windows), matrix, includes) in
334335
let needs = if platform = Windows then [analyse_job; cygwin_job] else [analyse_job] in
335336
let host = host_of_platform platform in
336-
job ~oc ~workflow ~runs_on:(Runner [runner]) ?shell ?section ~needs ~matrix ("Build-" ^ name_of_platform platform)
337+
let continue_on_error = "${{ matrix.ocamlv == 'trunk' }}" in
338+
job ~oc ~workflow ~runs_on:(Runner [runner]) ~continue_on_error ?shell ?section ~needs ~matrix ("Build-" ^ name_of_platform platform)
337339
++ only_on Linux (run "Install bubblewrap" ["sudo apt install bubblewrap"])
338340
++ only_on Linux (run "Disable AppArmor" ["echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns"])
339341
++ only_on MacOS (run "Install GNU patch" ["brew install gpatch"])

.github/workflows/lib.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ let emit_runs_on ~oc runs_on =
127127

128128
(* Continuation for a job. Steps are specified as continuations as for
129129
the jobs within the workflow, terminated with {!end_job}. *)
130-
let job ~oc ~workflow ?shell ?section ?(needs = []) ?matrix ?env ?outputs ~runs_on name f =
130+
let job ~oc ~workflow ?continue_on_error ?shell ?section ?(needs = []) ?matrix ?env ?outputs ~runs_on name f =
131131
let module M = struct type job += Key end in
132132
Hashtbl.add jobs M.Key name;
133133
output_char oc '\n';
@@ -139,6 +139,7 @@ let job ~oc ~workflow ?shell ?section ?(needs = []) ?matrix ?env ?outputs ~runs_
139139
|} in
140140
Option.iter emit_section section;
141141
fprintf oc " %s:\n" name;
142+
Option.iter (fprintf oc " continue-on-error: %s\n") continue_on_error;
142143
emit_runs_on ~oc runs_on;
143144
emit_yaml_list ~oc "needs" (List.map find_need needs);
144145
Option.iter (emit_strategy ~oc) matrix;

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ jobs:
102102
# Build
103103
####
104104
Build-Linux:
105+
continue-on-error: ${{ matrix.ocamlv == 'trunk' }}
105106
runs-on: ubuntu-latest
106107
needs: Analyse
107108
strategy:
@@ -139,6 +140,7 @@ jobs:
139140
run: bash -exu .github/scripts/main/test.sh
140141

141142
Build-Windows:
143+
continue-on-error: ${{ matrix.ocamlv == 'trunk' }}
142144
runs-on: windows-2022
143145
needs: [ Analyse, Cygwin ]
144146
strategy:
@@ -249,6 +251,7 @@ jobs:
249251
run: bash -exu .github/scripts/main/reftests.sh ${{ matrix.host }}
250252

251253
Build-macOS:
254+
continue-on-error: ${{ matrix.ocamlv == 'trunk' }}
252255
runs-on: macos-latest
253256
needs: Analyse
254257
strategy:

0 commit comments

Comments
 (0)