Skip to content

Commit

Permalink
Merge pull request #48 from mbarbin/ci-5.3
Browse files Browse the repository at this point in the history
Ci 5.3
  • Loading branch information
mbarbin authored Jan 22, 2025
2 parents b277cb8 + 187b133 commit 1b288aa
Show file tree
Hide file tree
Showing 16 changed files with 414 additions and 129 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
os:
- ubuntu-latest
ocaml-compiler:
- 5.2.x
- 5.3.x

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

Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/more-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This workflow file is named 'more-ci' and is used to run additional CI checks
# that complement the main CI workflow. It ensures that our code is tested
# across multiple operating systems and OCaml compiler versions.
#
# Compared to the main 'ci.yml' job, this skips some steps that are not
# necessary to check for every combination of os and ocaml-compiler, such as
# generating coverage report, linting odoc, opam and fmt, etc.
#
# We prefer to keep it separate from the main CI workflow because we find it
# more readable, over having too many conditional steps in the same job.

name: more-ci

on:
push:
branches:
- main
pull_request:
branches:
- "**" # This will match pull requests targeting any branch

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
# We currently disabled macos because of test failures that requires further investigations.
# - macos-latest
- ubuntu-latest
ocaml-compiler:
- 5.3.x
- 5.2.x
exclude:
# We exclude the combination already tested in the 'ci' workflow.
- os: ubuntu-latest
ocaml-compiler: 5.3.x

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

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
default: https://github.com/ocaml/opam-repository.git
mbarbin: https://github.com/mbarbin/opam-repository.git
# janestreet-bleeding: https://github.com/janestreet/opam-repository.git
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages

# We build and run tests for a subset of packages. More tests are run in
# the development workflow and as part of the main CI job. These are the
# tests that are checked for every combination of os and ocaml-compiler.
- name: Install dependencies
run: opam install ./vcs.opam ./vcs-base.opam ./vcs-command.opam ./vcs-git-blocking.opam ./vcs-git-eio.opam ./vcs-git-provider.opam ./vcs-test-helpers.opam ./vcs-tests.opam --deps-only --with-test

- name: Build & Run tests
run: opam exec -- dune build @all @runtest -p vcs,vcs-base,vcs-command,vcs-git-blocking,vcs-git-eio,vcs-git-provider,vcs-test-helpers,vcs-tests
2 changes: 2 additions & 0 deletions .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
version=0.27.0
ocaml-version=5.2
profile=janestreet
parse-docstrings=true
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 0.0.11 (unreleased)

### Added

### Changed

### Deprecated

### Fixed

### Removed

## 0.0.10 (2024-11-05)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion doc/docs/explanation/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(mdx
(package vcs-tests)
(package vcs-dev)
(deps
(package vcs)
(package vcs-command))
Expand Down
140 changes: 137 additions & 3 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,57 @@
(vcs-git-provider
(= :version))))

(package
(name vcs-test-helpers)
(synopsis "Helper library to write tests using vcs")
(depends
(ocaml
(>= 5.2))
(base
(and
(>= v0.17)
(< v0.18)))
(eio
(>= 1.0))
(fpath
(>= 0.7.3))
(fpath-sexp0
(>= 0.2.2))
(ppx_compare
(and
(>= v0.17)
(< v0.18)))
(ppx_enumerate
(and
(>= v0.17)
(< v0.18)))
(ppx_hash
(and
(>= v0.17)
(< v0.18)))
(ppx_here
(and
(>= v0.17)
(< v0.18)))
(ppx_let
(and
(>= v0.17)
(< v0.18)))
(ppx_sexp_conv
(and
(>= v0.17)
(< v0.18)))
(ppx_sexp_value
(and
(>= v0.17)
(< v0.18)))
(ppxlib
(>= 0.33))
(provider
(>= 0.0.11))
(vcs
(= :version))))

(package
(name vcs-tests)
(synopsis "Tests & Examples for [Vcs]")
Expand Down Expand Up @@ -366,21 +417,61 @@
(>= 0.2)))))

(package
(name vcs-test-helpers)
(synopsis "Helper library to write tests using vcs")
(name vcs-dev)
(synopsis
"Package to regroup dev targets for the vcs project, documentation, and more")
(allow_empty) ; The package is attached to stanza in doc/ however dune doesn't see it.
(depends
(ocaml
(>= 5.2))
(ocamlformat
(and
:with-dev-setup
(= 0.27.0)))
(astring
(>= 0.8.5))
(base
(and
(>= v0.17)
(< v0.18)))
(base_quickcheck
(and
(>= v0.17)
(< v0.18)))
(bisect_ppx
(and
:with-dev-setup
(>= 2.8.3)))
(cmdlang
(>= 0.0.9))
(cmdlang-cmdliner-runner
(>= 0.0.8))
(cmdlang-to-cmdliner
(>= 0.0.9))
(cmdliner
(>= 1.3.0))
(core
(and
(>= v0.17)
(< v0.18)))
(eio
(>= 1.0))
(eio_main
(>= 1.0))
(expect_test_helpers_core
(and
(>= v0.17)
(< v0.18)))
(fpath
(>= 0.7.3))
(fpath-base
(>= 0.2.2))
(fpath-sexp0
(>= 0.2.2))
(mdx
(>= 2.4))
(pp-log
(>= 0.0.8))
(ppx_compare
(and
(>= v0.17)
Expand All @@ -389,6 +480,10 @@
(and
(>= v0.17)
(< v0.18)))
(ppx_expect
(and
(>= v0.17)
(< v0.18)))
(ppx_hash
(and
(>= v0.17)
Expand All @@ -397,6 +492,11 @@
(and
(>= v0.17)
(< v0.18)))
(ppx_js_style
(and
:with-dev-setup
(>= v0.17)
(< v0.18)))
(ppx_let
(and
(>= v0.17)
Expand All @@ -405,11 +505,45 @@
(and
(>= v0.17)
(< v0.18)))
(ppx_sexp_message
(and
(>= v0.17)
(< v0.18)))
(ppx_sexp_value
(and
(>= v0.17)
(< v0.18)))
(ppxlib
(>= 0.33))
(provider
(>= 0.0.11))))
(>= 0.0.11))
(re
(>= 1.8.0))
(sexp_pretty
(and
(>= v0.17)
(< v0.18)))
(stdio
(and
(>= v0.17)
(< v0.18)))
(vcs
(= :version))
(vcs-base
(= :version))
(vcs-command
(= :version))
(vcs-git-blocking
(= :version))
(vcs-git-eio
(= :version))
(vcs-git-provider
(= :version))
(vcs-test-helpers
(= :version))
(vcs-tests
(= :version))
(sherlodoc
(and
:with-doc
(>= 0.2)))))
3 changes: 2 additions & 1 deletion lib/vcs/src/err.mli
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ type t
(** [sexp_of_t t] allows printing the information contained by [t]. *)
val sexp_of_t : t -> Sexp.t

(** [to_string_hum t] is a convenience wrapper around [t |> sexp_of_t |> Sexp.to_string_hum]. *)
(** [to_string_hum t] is a convenience wrapper around
[t |> sexp_of_t |> Sexp.to_string_hum]. *)
val to_string_hum : t -> string

(** {1 Building} *)
Expand Down
42 changes: 21 additions & 21 deletions lib/vcs/src/name_status.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@
(*******************************************************************************)

(* This module is partially derived from Iron (v0.9.114.44+47), file
* [./hg/hg.ml], which is released under Apache 2.0:
*
* Copyright (c) 2016-2017 Jane Street Group, LLC <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* See the file `NOTICE.md` at the root of this repository for more details.
*
* Changes: This has similarities with the module [Hg.Status]. We added support
* for renames, removed support for [Changed_by Rev.t], added [similarity] values
* which are available in Git.
* [./hg/hg.ml], which is released under Apache 2.0:
*
* Copyright (c) 2016-2017 Jane Street Group, LLC <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* See the file `NOTICE.md` at the root of this repository for more details.
*
* Changes: This has similarities with the module [Hg.Status]. We added support
* for renames, removed support for [Changed_by Rev.t], added [similarity] values
* which are available in Git.
*)

open! Import
Expand Down
40 changes: 20 additions & 20 deletions lib/vcs/src/name_status.mli
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@
(*_******************************************************************************)

(*_ This module is partially derived from Iron (v0.9.114.44+47), file
* [./hg/hg.mli], which is released under Apache 2.0:
*
* Copyright (c) 2016-2017 Jane Street Group, LLC <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* See the file `NOTICE.md` at the root of this repository for more details.
*
* The file [name_status.ml] contains a detailed description of the changes made
* to the original file.
* [./hg/hg.mli], which is released under Apache 2.0:
*
* Copyright (c) 2016-2017 Jane Street Group, LLC <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* See the file `NOTICE.md` at the root of this repository for more details.
*
* The file [name_status.ml] contains a detailed description of the changes made
* to the original file.
*)

module Change : sig
Expand Down
Loading

0 comments on commit 1b288aa

Please sign in to comment.