Skip to content

Commit fc63ae9

Browse files
authored
Merge pull request #102 from MisterDA/updates
Collection of updates
2 parents 17faf38 + 371c3d8 commit fc63ae9

File tree

16 files changed

+543
-444
lines changed

16 files changed

+543
-444
lines changed

.github/workflows/ci.yaml

Lines changed: 52 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,70 @@
1-
name: CI
1+
name: Builds, tests & co
22

33
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
4+
- push
5+
- pull_request
6+
7+
permissions: read-all
88

99
jobs:
1010
build:
1111
strategy:
1212
fail-fast: false
1313
matrix:
1414
os:
15-
- windows-2022
16-
15+
- ubuntu-latest
16+
- macos-latest
17+
- windows-latest
1718
ocaml-compiler:
18-
- "ocaml-variants.4.14.1+mingw64c"
19-
- "ocaml.5.0.0,ocaml-option-mingw"
20-
- "ocaml.5.1.0,ocaml-option-mingw"
19+
- "4.14"
20+
- "5"
2121

2222
runs-on: ${{ matrix.os }}
2323

2424
steps:
25-
- name: Checkout code
25+
- name: Checkout tree
2626
uses: actions/checkout@v5
2727

28-
- name: Use OCaml ${{ matrix.ocaml-compiler }}
29-
uses: ocaml/setup-ocaml@v2
28+
- name: Set-up OCaml
29+
uses: ocaml/setup-ocaml@v3
3030
with:
3131
ocaml-compiler: ${{ matrix.ocaml-compiler }}
32-
opam-repositories: |
33-
dra27: https://github.com/dra27/opam-repository.git#windows-5.0
34-
default: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
35-
standard: https://github.com/ocaml/opam-repository.git
36-
37-
- name: Install dependencies
38-
run: |
39-
opam install . --deps-only --with-test
40-
41-
- name: Build
42-
run: |
43-
opam exec -- dune build @all
44-
45-
- name: Tests
46-
run: |
47-
opam exec -- dune build @runtest
48-
49-
- name: Opam Lint
50-
run: |
51-
opam lint gitlab-unix.opam gitlab.opam lab.opam
32+
33+
- run: opam install . --deps-only --with-test
34+
35+
- run: opam exec -- dune build
36+
37+
- run: opam exec -- dune runtest
38+
39+
lint-doc:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout tree
43+
uses: actions/checkout@v5
44+
- name: Set-up OCaml
45+
uses: ocaml/setup-ocaml@v3
46+
with:
47+
ocaml-compiler: "5"
48+
- uses: ocaml/setup-ocaml/lint-doc@v3
49+
50+
lint-fmt:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout tree
54+
uses: actions/checkout@v5
55+
- name: Set-up OCaml
56+
uses: ocaml/setup-ocaml@v3
57+
with:
58+
ocaml-compiler: "5"
59+
- uses: ocaml/setup-ocaml/lint-fmt@v3
60+
61+
lint-opam:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Checkout tree
65+
uses: actions/checkout@v5
66+
- name: Set-up OCaml
67+
uses: ocaml/setup-ocaml@v3
68+
with:
69+
ocaml-compiler: "5"
70+
- uses: ocaml/setup-ocaml/lint-opam@v3

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
profile = default
2-
version = 0.21.0
2+
version = 0.28.1
33
ocaml-version = 4.08.0

cli/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
(mdx
99
(files lab.md)
1010
(package lab)
11-
(packages lab))
11+
(deps (package lab)))

cli/gitconfig/resolve.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ val find_dot_git : unit -> string option
44

55
val parse_dot_git : unit -> (Types.config, string) result
66
(** Search for a [.git] directory from the current directory upwards, and parse
7-
it. Return [Error] with an error message if none could be found, or in
8-
case of parse error. *)
7+
it. Return [Error] with an error message if none could be found, or in case
8+
of parse error. *)
99

1010
val gitlab_project_name : ?remote:string -> Types.config -> string option
1111
(** [gitlab_project_name ~remote config] extracts the Gitlab project name from
1212
the URL of the remote named [remote] in [config]. If [remote] is not
1313
specified, and there is more than one remote, returns [None]. Also returns
14-
[None] if no suitable remote URL can be found. *)
14+
[None] if no suitable remote URL can be found. *)

cli/issue.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let issue_printer issue =
2929
issue.issue_iid issue.issue_title issue.issue_project_id
3030
(string_of_state issue.issue_state)
3131
(if issue.issue_labels = [] then "<none>"
32-
else String.concat ", " issue.issue_labels)
32+
else String.concat ", " issue.issue_labels)
3333
issue.issue_web_url);
3434
Gitlab.Monad.return ()
3535

dune-project

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
(lang dune 3.0)
1+
(lang dune 3.18)
22
(name gitlab)
33
(generate_opam_files true)
44
(formatting (enabled_for ocaml))
5-
(using mdx 0.1)
5+
(using menhir 3.0)
6+
(using mdx 0.4)
67

78
(license BSD-3-clause)
89
(maintainers "Tim McGilchrist <timmcgil@gmail.com>")
@@ -16,8 +17,9 @@
1617
(ocaml (>= 4.08.0))
1718
(uri (>= 1.9.0))
1819
(cohttp-lwt (>= 4.0))
19-
(atdgen (>= 2.8.0))
20-
(yojson (>= 1.7.0))
20+
(atdgen (>= 2.16.0))
21+
(atdgen-runtime (>= 2.16.0))
22+
(yojson (>= 2.2.2))
2123
(ISO8601 (>= 0.2.6))
2224
stringext)
2325
(synopsis "GitLab APIv4 OCaml library")
@@ -32,10 +34,9 @@ JavaScript via [js_of_ocaml](http://ocsigen.org/js_of_ocaml)."))
3234
(depends
3335
(ocaml (>= 4.08.0))
3436
(gitlab (= :version))
35-
(cmdliner (>= 1.1.0))
37+
(cmdliner (>= 2.0.0))
3638
(cohttp (>= 4.0))
3739
(cohttp-lwt-unix (>= 4.0))
38-
(tls (>= 0.11.0))
3940
(lwt (>= 2.4.4))
4041
stringext
4142
base-unix
@@ -62,13 +63,11 @@ This library installs the JavaScript version, which uses [js_of_ocaml](http://oc
6263
(name lab)
6364
(depends
6465
(ocaml (>= 4.08.0))
65-
(cmdliner (>= 1.1.0))
66+
(cmdliner (>= 2.0.0))
6667
(gitlab-unix (= :version))
6768
(cohttp-lwt-unix (>= 4.0))
6869
(otoml (>= 0.9.0))
6970
(fmt (>= 0.9.0))
7071
(mdx (and (>= 2.1) :with-test)))
7172
(synopsis "GitLab cli")
7273
(description "Experimental GitLab cli in the style of GitHub's gh and hub commands."))
73-
74-
(using menhir 2.1)

gitlab-jsoo.opam

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ homepage: "https://github.com/tmcgilchrist/ocaml-gitlab"
1212
doc: "https://tmcgilchrist.github.io/ocaml-gitlab/"
1313
bug-reports: "https://github.com/tmcgilchrist/ocaml-gitlab/issues"
1414
depends: [
15-
"dune" {>= "3.0"}
15+
"dune" {>= "3.18"}
1616
"ocaml" {>= "4.08.0"}
1717
"gitlab" {= version}
1818
"cohttp" {>= "4.0"}
@@ -35,4 +35,5 @@ build: [
3535
]
3636
]
3737
dev-repo: "git+https://github.com/tmcgilchrist/ocaml-gitlab.git"
38+
x-maintenance-intent: ["(latest)"]
3839
available: [ arch != "x86_32" & arch != "arm32" & arch != "ppc32" ]

gitlab-unix.opam

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ homepage: "https://github.com/tmcgilchrist/ocaml-gitlab"
1212
doc: "https://tmcgilchrist.github.io/ocaml-gitlab/"
1313
bug-reports: "https://github.com/tmcgilchrist/ocaml-gitlab/issues"
1414
depends: [
15-
"dune" {>= "3.0"}
15+
"dune" {>= "3.18"}
1616
"ocaml" {>= "4.08.0"}
1717
"gitlab" {= version}
18-
"cmdliner" {>= "1.1.0"}
18+
"cmdliner" {>= "2.0.0"}
1919
"cohttp" {>= "4.0"}
2020
"cohttp-lwt-unix" {>= "4.0"}
21-
"tls" {>= "0.11.0"}
2221
"lwt" {>= "2.4.4"}
2322
"stringext"
2423
"base-unix"
2524
"alcotest" {with-test}
2625
"odoc" {with-doc}
2726
]
2827
dev-repo: "git+https://github.com/tmcgilchrist/ocaml-gitlab.git"
28+
x-maintenance-intent: ["(latest)"]
2929
build: [
3030
["dune" "subst"] {dev}
3131
[

gitlab.opam

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,20 @@ homepage: "https://github.com/tmcgilchrist/ocaml-gitlab"
1414
doc: "https://tmcgilchrist.github.io/ocaml-gitlab/"
1515
bug-reports: "https://github.com/tmcgilchrist/ocaml-gitlab/issues"
1616
depends: [
17-
"dune" {>= "3.0"}
17+
"dune" {>= "3.18"}
1818
"ocaml" {>= "4.08.0"}
1919
"uri" {>= "1.9.0"}
2020
"cohttp-lwt" {>= "4.0"}
21-
"atdgen" {>= "2.8.0"}
22-
"yojson" {>= "1.7.0"}
21+
"atdgen" {>= "2.16.0"}
22+
"atdgen-runtime" {>= "2.16.0"}
23+
"yojson" {>= "2.2.2"}
2324
"ISO8601" {>= "0.2.6"}
2425
"stringext"
2526
"odoc" {with-doc}
2627
]
28+
dev-repo: "git+https://github.com/tmcgilchrist/ocaml-gitlab.git"
29+
x-maintenance-intent: ["(latest)"]
30+
available: [ arch != "x86_32" & arch != "arm32" & arch != "ppc32" ]
2731
build: [
2832
["dune" "subst"] {dev}
2933
[
@@ -37,6 +41,11 @@ build: [
3741
"@runtest" {with-test}
3842
"@doc" {with-doc}
3943
]
44+
[
45+
"cmdliner" "install" "tool-support"
46+
"--update-opam-install=%{_:name}%.install"
47+
"_build/install/default/bin/lab" {os-family != "windows"}
48+
"_build/install/default/bin/lab.exe" {os-family = "windows"}
49+
"_build/cmdliner-install"
50+
]
4051
]
41-
dev-repo: "git+https://github.com/tmcgilchrist/ocaml-gitlab.git"
42-
available: [ arch != "x86_32" & arch != "arm32" & arch != "ppc32" ]

gitlab.opam.template

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,22 @@
1-
available: [ arch != "x86_32" & arch != "arm32" & arch != "ppc32" ]
1+
available: [ arch != "x86_32" & arch != "arm32" & arch != "ppc32" ]
2+
build: [
3+
["dune" "subst"] {dev}
4+
[
5+
"dune"
6+
"build"
7+
"-p"
8+
name
9+
"-j"
10+
jobs
11+
"@install"
12+
"@runtest" {with-test}
13+
"@doc" {with-doc}
14+
]
15+
[
16+
"cmdliner" "install" "tool-support"
17+
"--update-opam-install=%{_:name}%.install"
18+
"_build/install/default/bin/lab" {os-family != "windows"}
19+
"_build/install/default/bin/lab.exe" {os-family = "windows"}
20+
"_build/cmdliner-install"
21+
]
22+
]

0 commit comments

Comments
 (0)