-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4bcf41b
Showing
19 changed files
with
260 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Tell github that .ml and .mli files are OCaml | ||
*.ml linguist-language=OCaml | ||
*.mli linguist-language=OCaml | ||
|
||
# Disable syntax detection for cram tests | ||
*.t linguist-language=Text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: ci | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
ocaml-compiler: | ||
- 5.1.x | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup OCaml | ||
uses: ocaml/setup-ocaml@v2 | ||
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://ocaml.janestreet.com/opam-repository | ||
# janestreet-bleeding-external: https://github.com/janestreet/opam-repository.git#external-packages | ||
|
||
- name: Install dependencies | ||
run: | ||
opam install . --deps-only --with-doc --with-test | ||
|
||
- name: Build | ||
run: opam exec -- dune build | ||
|
||
- name: Run tests | ||
run: opam exec -- dune runtest | ||
|
||
- name: Lint opam | ||
uses: ocaml/setup-ocaml/lint-opam@v2 | ||
|
||
- name: Lint fmt | ||
uses: ocaml/setup-ocaml/lint-fmt@v2 | ||
|
||
- name: Lint doc | ||
uses: ocaml/setup-ocaml/lint-doc@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
version=0.26.1 | ||
profile=janestreet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"cSpell.words": [ | ||
"janestreet", | ||
"odoc", | ||
"opam" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## unreleased | ||
|
||
### Added | ||
### Changed | ||
### Fixed | ||
### Removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: build | ||
build: | ||
opam exec -- dune build | ||
|
||
.PHONY: test | ||
test: | ||
opam exec -- dune runtest | ||
|
||
.PHONY: fmt | ||
fmt: | ||
opam exec -- dune build @fmt --auto-promote | ||
|
||
.PHONY: lint | ||
lint: | ||
opam lint | ||
opam exec -- opam-dune-lint | ||
|
||
.PHONY: deps | ||
deps: | ||
opam install . --deps-only --with-doc --with-test | ||
|
||
.PHONY: doc | ||
doc: | ||
opam exec -- dune build @doc | ||
|
||
.PHONY: clean | ||
clean: | ||
opam exec -- dune clean | ||
|
||
.PHONY: check-all | ||
check-all: deps all test doc clean lint fmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# vcs | ||
|
||
[](https://github.com/mbarbin/vcs/actions/workflows/ci.yml) | ||
|
||
## Code documentation | ||
|
||
The code documentation of the latest release is built with `odoc` and published | ||
to `GitHub` pages [here](https://mbarbin.github.io/vcs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(executable | ||
(name main) | ||
(public_name vcs) | ||
(package vcs) | ||
(flags :standard -w +a-4-40-41-42-44-45-48-66 -warn-error +a) | ||
(libraries command-unix-for-opam vcs)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
let () = Command_unix_for_opam.run Vcs.main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(env | ||
(dev | ||
(odoc | ||
(warnings fatal)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
(lang dune 3.14) | ||
|
||
(name vcs) | ||
|
||
(generate_opam_files) | ||
|
||
(authors "Mathieu Barbin") | ||
|
||
(maintainers "Mathieu Barbin") | ||
|
||
(source | ||
(github mbarbin/vcs)) | ||
|
||
(documentation "https://mbarbin.github.io/vcs/") | ||
|
||
(package | ||
(name vcs) | ||
(synopsis "A collection of OCaml libraries defining interfaces and providers to interact with git repositories") | ||
(depends | ||
(ocaml | ||
(>= 5.1)) | ||
(base | ||
(and | ||
(>= v0.16) | ||
(< v0.17))) | ||
(command-unix-for-opam | ||
(>= 0.0.2)) | ||
(core | ||
(and | ||
(>= v0.16) | ||
(< v0.17))) | ||
(expect_test_helpers_core | ||
(and | ||
:with-test | ||
(>= v0.16) | ||
(< v0.17))) | ||
(ppx_jane | ||
(and | ||
(>= v0.16) | ||
(< v0.17))) | ||
(ppx_js_style | ||
(and | ||
(>= v0.16) | ||
(< v0.17))) | ||
(stdio | ||
(and | ||
(>= v0.16) | ||
(< v0.17))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(library | ||
(name vcs) | ||
(public_name vcs) | ||
(flags | ||
:standard | ||
-w | ||
+a-4-40-41-42-44-45-48-66 | ||
-warn-error | ||
+a | ||
-open | ||
Base | ||
-open | ||
Stdio) | ||
(libraries base core.command stdio) | ||
(preprocess | ||
(pps ppx_jane ppx_js_style -check-doc-comments))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
let hello_world = [%sexp "Hello, World!"] | ||
|
||
let print_cmd = | ||
Command.basic | ||
~summary:"print hello world" | ||
(let%map_open.Command () = return () in | ||
fun () -> print_s hello_world) | ||
;; | ||
|
||
let main = Command.group ~summary:"" [ "print", print_cmd ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
val hello_world : Sexp.t | ||
val main : Command.t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(library | ||
(name vcs_test) | ||
(flags | ||
:standard | ||
-w | ||
+a-4-40-41-42-44-45-48-66 | ||
-warn-error | ||
+a | ||
-open | ||
Base | ||
-open | ||
Stdio | ||
-open | ||
Expect_test_helpers_base) | ||
(libraries base expect_test_helpers_core.expect_test_helpers_base stdio vcs) | ||
(inline_tests) | ||
(preprocess | ||
(pps ppx_jane ppx_js_style -check-doc-comments))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
let%expect_test "hello" = | ||
print_s Vcs.hello_world; | ||
[%expect {| "Hello, World!" |}] | ||
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(*_ This signature is deliberately empty. *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
synopsis: | ||
"A collection of OCaml libraries defining interfaces and providers to interact with git repositories" | ||
maintainer: ["Mathieu Barbin"] | ||
authors: ["Mathieu Barbin"] | ||
homepage: "https://github.com/mbarbin/vcs" | ||
doc: "https://mbarbin.github.io/vcs/" | ||
bug-reports: "https://github.com/mbarbin/vcs/issues" | ||
depends: [ | ||
"dune" {>= "3.14"} | ||
"ocaml" {>= "5.1"} | ||
"base" {>= "v0.16" & < "v0.17"} | ||
"command-unix-for-opam" {>= "0.0.2"} | ||
"core" {>= "v0.16" & < "v0.17"} | ||
"expect_test_helpers_core" {with-test & >= "v0.16" & < "v0.17"} | ||
"ppx_jane" {>= "v0.16" & < "v0.17"} | ||
"ppx_js_style" {>= "v0.16" & < "v0.17"} | ||
"stdio" {>= "v0.16" & < "v0.17"} | ||
"odoc" {with-doc} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/mbarbin/vcs.git" |