# HG changeset patch # User Malcolm Matalka # Date 1605390660 -3600 # Sat Nov 14 22:51:00 2020 +0100 # Node ID 7e9965e1971657bd4dfbe2692e325dd965c0252d # Parent e7a3831e9da8c9d288ef81ff1fea20fa3df9412f ADD Get building diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml new file mode 100644 --- /dev/null +++ b/.builds/freebsd.yml @@ -0,0 +1,44 @@ +image: freebsd/latest +packages: + - gmake + - ocaml-opam +secrets: + - c662a15d-dfb4-43c9-8057-1a1e5fbcb76e + - 8b37ab4f-8ff6-4b79-b815-806a1768d44b + - c18138d1-abe5-4bcf-899e-02f9bf650a8f +sources: + - hg+ssh://hg@hg.sr.ht/~mmatalka/uritmpl +tasks: + - opam-init: | + opam init -ay + - build-compiler: | + eval $(opam env) + opam switch create -y 4.09.0 + - setup-environment: | + eval $(opam env) + opam install -y hll pds + mkdir -p opam-repo/{compilers,packages} + echo 'opam-version: "2.0"' > opam-repo/repo + opam repository add opam-repo opam-repo + cd uritmpl + hll generate --opam-dir ../../opam-repo --tag 1.0 --test-deps-as-regular-deps + opam update opam-repo + opam info uritmpl + opam install -j4 -y --strict --deps-only uritmpl + - build: | + eval $(opam env) + cd uritmpl + time gmake -j4 + - test: | + eval $(opam env) + cd uritmpl + set +e + time env OCAMLRUNPARAM=b gmake -j4 -k test + test_ret=$? + set -x + find . -name '*.tap' -exec cat '{}' \; + exit $test_ret + # - deploy: | + # eval $(open env) + # cd uritmpl + # time gmake cicd-deploy diff --git a/.hgignore b/.hgignore new file mode 100644 --- /dev/null +++ b/.hgignore @@ -0,0 +1,6 @@ +.*~ +pds.mk +Ocamlrules.mk.in +build/ +.merlin + diff --git a/Makefile b/Makefile new file mode 100644 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +all: + +pds.mk: pds.conf + pds + +-include pds.mk diff --git a/hll.conf b/hll.conf new file mode 100644 --- /dev/null +++ b/hll.conf @@ -0,0 +1,14 @@ +pds = {major_version = 5} +desc = "URI templates (RFC 6570) " +maintainer = "malcolm.matalka@acsl.se" +authors = [ "malcolm.matalka@acsl.se" ] +homepage = "https://hg.sr.ht/~mmatalka/uritmpl" +dev_repo = "ssh://hg@hg.sr.ht/~mmatalka/uritmpl" + +url_template = "https://hg.sr.ht/~mmatalka/mono/archive/{tag}.tar.gz" +url_pattern = "{tag}" +url_protocol = "http" + +[deps_map] +ppx_deriving = ["ppx_deriving.show", "ppx_deriving.eq"] +sedlex = ["sedlex.ppx"] diff --git a/pds.conf b/pds.conf new file mode 100644 --- /dev/null +++ b/pds.conf @@ -0,0 +1,36 @@ +[global] +selector = [ "opam", "config", "var", "os",] + +[global.release] +extra_compiler_opts = "-bin-annot -strict-sequence -strict-formats -safe-string -noassert -w '+d+f+p+u+s+40+K'" + +[global.debug] +extra_compiler_opts = "-g -bin-annot -strict-sequence -strict-formats -safe-string -w '@d@f@p@u@s@40+K'" + +[global.profile] +extra_compiler_opts = "-safe-string" + +[global.test-release] +extra_compiler_opts = "-safe-string" + +[global.test-debug] +extra_compiler_opts = "-safe-string" + +[global.test-profile] +extra_compiler_opts = "-safe-string" + +[src.revops] +install = true +deps = [ "containers",] + +[src.oth] +install = true +deps = [ "duration", "containers", "revops",] + +[src.uritmpl] +type = "library" +install = true +deps = [ "sedlex", "sedlex.ppx", "ppx_deriving", "ppx_deriving.show", "ppx_deriving.eq", "uri",] + +[tests.uritmpl] +deps = [ "uritmpl", "oth",]