-
Notifications
You must be signed in to change notification settings - Fork 0
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 36808ac
Showing
15 changed files
with
197 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,27 @@ | ||
name: OCaml CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Setup OCaml | ||
uses: avsm/setup-ocaml@v2 | ||
with: | ||
ocaml-compiler: '4.14.0' | ||
|
||
- name: Check | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libssl-dev | ||
opam install . --deps-only --with-test --with-doc | ||
opam install ocamlformat | ||
eval $(opam env) | ||
make lint | ||
make test | ||
make |
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,3 @@ | ||
_opam/ | ||
_build/ | ||
_coverage/ |
Empty file.
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Andreas Krühlmann | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
include make/ocaml/main.mk |
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,46 @@ | ||
(lang dune 3.10) | ||
|
||
(name relic-sdk) | ||
|
||
(generate_opam_files true) | ||
|
||
(source | ||
(github AoeCenter/relic-sdk)) | ||
|
||
(authors "Andreas Kr\195\188hlmann") | ||
|
||
(maintainers "echo 'YW5kcmVhc0BrcnVobG1hbm4uZGV2Cg==' | base64 -d") | ||
|
||
(license MIT) | ||
|
||
(documentation https://github.com/AoeCenter/relic-sdk) | ||
|
||
(package | ||
(name relic-sdk) | ||
(depends | ||
(ocaml | ||
(>= 4.14)) | ||
(cohttp-lwt-unix | ||
(>= 5.3.0)) | ||
(yojson | ||
(>= 2.1.2)) | ||
(lwt | ||
(>= 5.7.0)) | ||
(lwt_ssl | ||
(>= 1.2.0)) | ||
(alcotest | ||
(and | ||
:with-test | ||
(>= 1.3.0))) | ||
(bisect_ppx | ||
(and | ||
:with-test | ||
(>= 2.3.0))) | ||
(ocamlformat | ||
(and | ||
:with-dev-setup | ||
(>= 0.26.1))) | ||
(base | ||
(>= v0.12.0)) | ||
dune | ||
dune-build-info)) |
Empty file.
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 @@ | ||
(include_subdirs qualified) | ||
|
||
(library | ||
(name relic_sdk) | ||
(public_name relic-sdk) | ||
(libraries yojson cohttp-lwt-unix) | ||
(instrumentation | ||
(backend bisect_ppx))) |
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 @@ | ||
.PHONY: watch | ||
build: $(BUILD_DEPS) | ||
dune build | ||
|
||
.PHONY: watch | ||
watch: $(BUILD_DEPS) | ||
dune build -w |
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 @@ | ||
.PHONY: install | ||
install: | ||
opam install . --deps-only | ||
|
||
.PHONY: install-all | ||
install-all: | ||
opam install . --deps-only --with-test --with-doc |
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 @@ | ||
.PHONY: lint | ||
lint: | ||
dune build @fmt | ||
|
||
.PHONY: fix | ||
fix: | ||
dune build @fmt --auto-promote |
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 @@ | ||
.PHONY: test | ||
test: | ||
find . -name '*.coverage' | xargs rm -f | ||
dune runtest --instrument-with bisect_ppx --force | ||
bisect-ppx-report html | ||
bisect-ppx-report summary |
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,11 @@ | ||
.ONESHELL: | ||
SELF_DIR := $(dir $(lastword $(MAKEFILE_LIST))) | ||
|
||
.PHONY: all | ||
all: build | ||
|
||
include $(SELF_DIR)/_build.mk | ||
include $(SELF_DIR)/_install.mk | ||
include $(SELF_DIR)/_lint.mk | ||
include $(SELF_DIR)/_test.mk | ||
|
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,37 @@ | ||
# This file is generated by dune, edit dune-project instead | ||
opam-version: "2.0" | ||
maintainer: ["echo 'YW5kcmVhc0BrcnVobG1hbm4uZGV2Cg==' | base64 -d"] | ||
authors: ["Andreas Krühlmann"] | ||
license: "MIT" | ||
homepage: "https://github.com/AoeCenter/relic-sdk" | ||
doc: "https://github.com/AoeCenter/relic-sdk" | ||
bug-reports: "https://github.com/AoeCenter/relic-sdk/issues" | ||
depends: [ | ||
"ocaml" {>= "4.14"} | ||
"cohttp-lwt-unix" {>= "5.3.0"} | ||
"yojson" {>= "2.1.2"} | ||
"lwt" {>= "5.7.0"} | ||
"lwt_ssl" {>= "1.2.0"} | ||
"alcotest" {with-test & >= "1.3.0"} | ||
"bisect_ppx" {with-test & >= "2.3.0"} | ||
"ocamlformat" {with-dev-setup & >= "0.26.1"} | ||
"base" {>= "v0.12.0"} | ||
"dune" {>= "3.10"} | ||
"dune-build-info" | ||
"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/AoeCenter/relic-sdk.git" |
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 @@ | ||
let | ||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11"; | ||
pkgs = import nixpkgs { config = {}; overlays = []; }; | ||
in | ||
|
||
|
||
pkgs.mkShell{ | ||
packages = with pkgs; [ | ||
gmp | ||
ocaml | ||
opam | ||
openssl | ||
ocamlPackages.ocamlformat | ||
pkg-config | ||
]; | ||
} |