Skip to content

Commit f90f069

Browse files
authored
Merge pull request #1009 from ocsigen/ocaml-5.1-ci
Add OCaml 5.1 to CI
2 parents 73f1a0f + 1e4421d commit f90f069

File tree

7 files changed

+226
-111
lines changed

7 files changed

+226
-111
lines changed

.github/workflows/workflow.yml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Main workflow
1+
name: Builds, tests & co
22

33
on:
44
pull_request:
@@ -8,21 +8,22 @@ on:
88
- cron: 0 1 * * MON
99

1010
jobs:
11-
build:
11+
build-and-test:
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
os:
1616
- ubuntu-latest
1717
ocaml-compiler:
18-
- 4.08.x
19-
- 4.09.x
20-
- 4.10.x
21-
- 4.11.x
22-
- 4.12.x
23-
- 4.13.x
24-
- 4.14.x
25-
- 5.0.x
18+
- "4.08"
19+
- "4.09"
20+
- "4.10"
21+
- "4.11"
22+
- "4.12"
23+
- "4.13"
24+
- "4.14"
25+
- "5.0"
26+
- "5.1"
2627
libev:
2728
- true
2829
- false
@@ -33,7 +34,7 @@ jobs:
3334
*.opam
3435
include:
3536
- os: ubuntu-latest
36-
ocaml-compiler: ocaml-variants.4.14.0+options,ocaml-option-flambda,ocaml-option-musl,ocaml-option-static
37+
ocaml-compiler: ocaml-variants.4.14.2+options,ocaml-option-flambda,ocaml-option-musl,ocaml-option-static
3738
libev: false
3839
ppx: true
3940
local-packages: |
@@ -75,20 +76,19 @@ jobs:
7576
runs-on: ${{ matrix.os }}
7677

7778
steps:
79+
- name: Hack Git CRLF for ocaml/setup-ocaml#529 issue
80+
run: git config --global core.autocrlf input
81+
7882
- name: Checkout code
7983
uses: actions/checkout@v4
8084

81-
- name: Hack Git CRLF for ocaml/setup-ocaml issue #529
82-
if: ${{ startsWith(matrix.os, 'windows-') }}
83-
run: |
84-
& "C:\Program Files\Git\bin\git.exe" config --system core.autocrlf input
85-
86-
- name: Use OCaml ${{ matrix.ocaml-compiler }}
85+
- name: Set-up OCaml
8786
uses: ocaml/setup-ocaml@v2
8887
with:
8988
ocaml-compiler: ${{ matrix.ocaml-compiler }}
9089
opam-depext-flags: --with-test
9190
opam-local-packages: ${{ matrix.local-packages }}
91+
allow-prerelease-opam: true
9292

9393
- run: opam depext conf-libev --install
9494
if: ${{ matrix.libev == true }}
@@ -110,3 +110,19 @@ jobs:
110110

111111
- run: opam exec -- make ppx_let-test-deps ppx_let-test
112112
if: ${{ matrix.ppx == true }}
113+
114+
# lint-opam:
115+
# runs-on: ubuntu-latest
116+
117+
# steps:
118+
# - name: Checkout tree
119+
# uses: actions/checkout@v4
120+
121+
# - name: Set-up OCaml
122+
# uses: ocaml/setup-ocaml@v2
123+
# with:
124+
# ocaml-compiler: "5.1"
125+
# allow-prerelease-opam: true
126+
# dune-cache: true
127+
128+
# - uses: ocaml/setup-ocaml/lint-opam@v2

dune-project

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,59 @@
1-
(lang dune 1.8)
1+
(lang dune 1.12)
2+
3+
(name lwt)
4+
5+
(generate_opam_files true)
6+
7+
(maintainers
8+
"Raphaël Proust <code@bnwr.net>"
9+
"Anton Bachin <antonbachin@yahoo.com>")
10+
(authors "Jérôme Vouillon" "Jérémie Dimino")
11+
(license MIT)
12+
(source (github ocsigen/lwt))
13+
(documentation "https://ocsigen.org/lwt")
14+
15+
(package
16+
(name lwt_ppx_let)
17+
(synopsis "Dummy package context for ppx_let tests")
18+
(description "Internal package used to partition ppx_let tests.")
19+
(depends
20+
(ocaml (>= 4.08))
21+
(ppx_let :with-test)
22+
lwt))
23+
24+
(package
25+
(name lwt_ppx)
26+
(synopsis "PPX syntax for Lwt, providing something similar to async/await from JavaScript")
27+
(depends
28+
(ocaml (>= 4.08))
29+
(ppxlib (>= 0.16.0))
30+
lwt))
31+
32+
(package
33+
(name lwt_react)
34+
(synopsis "Helpers for using React with Lwt")
35+
(depends
36+
(ocaml (>= 4.08))
37+
(cppo (and :build (>= 1.1.0)))
38+
(lwt (>= 3.0.0))
39+
(react (>= 1.0.0))))
40+
41+
(package
42+
(name lwt)
43+
(synopsis "Promises and event-driven I/O")
44+
(description "A promise is a value that may become determined in the future.
45+
46+
Lwt provides typed, composable promises. Promises that are resolved by I/O are
47+
resolved by Lwt in parallel.
48+
49+
Meanwhile, OCaml code, including code creating and waiting on promises, runs in
50+
a single thread by default. This reduces the need for locks or other
51+
synchronization primitives. Code can be run in parallel on an opt-in basis.
52+
")
53+
(depends
54+
(ocaml (>= 4.08))
55+
(cppo (and :build (>= 1.1.0)))
56+
(ocamlfind (and :dev (>= 1.7.3-1)))
57+
dune-configurator
58+
ocplib-endian)
59+
(depopts base-threads base-unix conf-libev))

lwt.opam

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,55 @@
1+
# This file is generated by dune, edit dune-project instead
12
opam-version: "2.0"
2-
33
synopsis: "Promises and event-driven I/O"
4+
description: """
5+
A promise is a value that may become determined in the future.
6+
7+
Lwt provides typed, composable promises. Promises that are resolved by I/O are
8+
resolved by Lwt in parallel.
49

5-
version: "5.7.0"
10+
Meanwhile, OCaml code, including code creating and waiting on promises, runs in
11+
a single thread by default. This reduces the need for locks or other
12+
synchronization primitives. Code can be run in parallel on an opt-in basis.
13+
"""
14+
maintainer: [
15+
"Raphaël Proust <code@bnwr.net>" "Anton Bachin <antonbachin@yahoo.com>"
16+
]
17+
authors: ["Jérôme Vouillon" "Jérémie Dimino"]
618
license: "MIT"
719
homepage: "https://github.com/ocsigen/lwt"
820
doc: "https://ocsigen.org/lwt"
921
bug-reports: "https://github.com/ocsigen/lwt/issues"
10-
11-
authors: [
12-
"Jérôme Vouillon"
13-
"Jérémie Dimino"
14-
]
15-
maintainer: [
16-
"Raphaël Proust <code@bnwr.net>"
17-
"Anton Bachin <antonbachin@yahoo.com>"
18-
]
19-
dev-repo: "git+https://github.com/ocsigen/lwt.git"
20-
2122
depends: [
23+
"dune" {>= "1.12"}
24+
"ocaml" {>= "4.08"}
2225
"cppo" {build & >= "1.1.0"}
23-
"dune" {>= "1.8.0"}
26+
"ocamlfind" {dev & >= "1.7.3-1"}
2427
"dune-configurator"
25-
"ocaml" {>= "4.08"}
2628
"ocplib-endian"
27-
28-
# Until https://github.com/aantron/bisect_ppx/pull/327.
29-
# "bisect_ppx" {dev & >= "2.0.0"}
30-
"ocamlfind" {dev & >= "1.7.3-1"}
3129
]
32-
33-
depopts: [
34-
"base-threads"
35-
"base-unix"
36-
"conf-libev"
37-
]
38-
30+
depopts: ["base-threads" "base-unix" "conf-libev"]
31+
dev-repo: "git+https://github.com/ocsigen/lwt.git"
3932
build: [
40-
["dune" "exec" "-p" name "src/unix/config/discover.exe" "--" "--save"
41-
"--use-libev" "%{conf-libev:installed}%"]
42-
["dune" "build" "-p" name "-j" jobs]
33+
["dune" "subst"] {pinned}
34+
[
35+
"dune"
36+
"exec"
37+
"-p"
38+
name
39+
"src/unix/config/discover.exe"
40+
"--"
41+
"--save"
42+
"--use-libev" "%{conf-libev:installed}%"
43+
]
44+
[
45+
"dune"
46+
"build"
47+
"-p"
48+
name
49+
"-j"
50+
jobs
51+
"@install"
52+
"@runtest" {with-test}
53+
"@doc" {with-doc}
54+
]
4355
]
44-
45-
description: "A promise is a value that may become determined in the future.
46-
47-
Lwt provides typed, composable promises. Promises that are resolved by I/O are
48-
resolved by Lwt in parallel.
49-
50-
Meanwhile, OCaml code, including code creating and waiting on promises, runs in
51-
a single thread by default. This reduces the need for locks or other
52-
synchronization primitives. Code can be run in parallel on an opt-in basis."

lwt.opam.template

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
build: [
2+
["dune" "subst"] {pinned}
3+
[
4+
"dune"
5+
"exec"
6+
"-p"
7+
name
8+
"src/unix/config/discover.exe"
9+
"--"
10+
"--save"
11+
"--use-libev" "%{conf-libev:installed}%"
12+
]
13+
[
14+
"dune"
15+
"build"
16+
"-p"
17+
name
18+
"-j"
19+
jobs
20+
"@install"
21+
"@runtest" {with-test}
22+
"@doc" {with-doc}
23+
]
24+
]

lwt_ppx.opam

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
1+
# This file is generated by dune, edit dune-project instead
12
opam-version: "2.0"
2-
3-
synopsis: "PPX syntax for Lwt, providing something similar to async/await from JavaScript"
4-
5-
version: "2.1.0"
3+
synopsis:
4+
"PPX syntax for Lwt, providing something similar to async/await from JavaScript"
5+
maintainer: [
6+
"Raphaël Proust <code@bnwr.net>" "Anton Bachin <antonbachin@yahoo.com>"
7+
]
8+
authors: ["Jérôme Vouillon" "Jérémie Dimino"]
69
license: "MIT"
710
homepage: "https://github.com/ocsigen/lwt"
8-
doc: "https://ocsigen.org/lwt/dev/api/Ppx_lwt"
11+
doc: "https://ocsigen.org/lwt"
912
bug-reports: "https://github.com/ocsigen/lwt/issues"
10-
11-
authors: [
12-
"Gabriel Radanne"
13-
]
14-
maintainer: [
15-
"Anton Bachin <antonbachin@yahoo.com>"
16-
]
17-
dev-repo: "git+https://github.com/ocsigen/lwt.git"
18-
1913
depends: [
20-
"dune" {>= "1.8.0"}
21-
"lwt"
14+
"dune" {>= "1.12"}
2215
"ocaml" {>= "4.08"}
2316
"ppxlib" {>= "0.16.0"}
17+
"lwt"
2418
]
25-
2619
build: [
27-
["dune" "build" "-p" name "-j" jobs]
20+
["dune" "subst"] {pinned}
21+
[
22+
"dune"
23+
"build"
24+
"-p"
25+
name
26+
"-j"
27+
jobs
28+
"@install"
29+
"@runtest" {with-test}
30+
"@doc" {with-doc}
31+
]
2832
]
33+
dev-repo: "git+https://github.com/ocsigen/lwt.git"

lwt_ppx_let.opam

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
1+
# This file is generated by dune, edit dune-project instead
12
opam-version: "2.0"
2-
33
synopsis: "Dummy package context for ppx_let tests"
4-
5-
version: "5.7.0"
4+
description: "Internal package used to partition ppx_let tests."
5+
maintainer: [
6+
"Raphaël Proust <code@bnwr.net>" "Anton Bachin <antonbachin@yahoo.com>"
7+
]
8+
authors: ["Jérôme Vouillon" "Jérémie Dimino"]
69
license: "MIT"
710
homepage: "https://github.com/ocsigen/lwt"
811
doc: "https://ocsigen.org/lwt"
912
bug-reports: "https://github.com/ocsigen/lwt/issues"
10-
11-
authors: [
12-
"Jérôme Vouillon"
13-
"Jérémie Dimino"
14-
]
15-
maintainer: [
16-
"Raphaël Proust <code@bnwr.net>"
17-
"Anton Bachin <antonbachin@yahoo.com>"
18-
]
19-
dev-repo: "git+https://github.com/ocsigen/lwt.git"
20-
2113
depends: [
22-
"dune" {>= "1.8.0"}
23-
"lwt"
24-
"ppx_let" {with-test}
14+
"dune" {>= "1.12"}
2515
"ocaml" {>= "4.08"}
16+
"ppx_let" {with-test}
17+
"lwt"
2618
]
27-
28-
description: "Internal package used to partition ppx_let tests."
19+
build: [
20+
["dune" "subst"] {pinned}
21+
[
22+
"dune"
23+
"build"
24+
"-p"
25+
name
26+
"-j"
27+
jobs
28+
"@install"
29+
"@runtest" {with-test}
30+
"@doc" {with-doc}
31+
]
32+
]
33+
dev-repo: "git+https://github.com/ocsigen/lwt.git"

0 commit comments

Comments
 (0)