Skip to content

Commit

Permalink
Merge branch 'master' into stable for 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jan 14, 2018
2 parents 26bb161 + 98aa228 commit 7d93f1f
Showing 36 changed files with 229 additions and 9,749 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -4,6 +4,5 @@ _build
*.docdir
*.html
man/
sequence.install
setup.log
setup.data
*.install
.merlin
6 changes: 2 additions & 4 deletions .merlin
Original file line number Diff line number Diff line change
@@ -4,7 +4,5 @@ S tests/
B _build/src
B _build/tests/
B _build/bench/
PKG oUnit qcheck
PKG benchmark
FLG -safe-string
FLG -w+a-4-44-48-60@8
PKG oUnit qcheck result benchmark
FLG -safe-string -w+a-4-44-48-60@8
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
language: c
env:
- OCAML_VERSION=4.01.0
- OCAML_VERSION=4.02.3
- OCAML_VERSION=4.04.2
- OCAML_VERSION=4.05.0
- OCAML_VERSION=4.05.0+flambda
- OCAML_VERSION=4.06.0
addons:
apt:
sources:
- avsm
packages:
- opam
# Caching may take a lot of space with so many ocaml versions
#cache:
# directories:
# - $HOME/.opam
before_install:
# Some opam boilerplate
- export OPAMYES=1
- export OPAMVERBOSE=1
- opam init
- opam switch ${OCAML_VERSION}
- eval `opam config env`
install:
# Install dependencies
- opam pin add --no-action sequence .
- opam install oasis
- opam install --deps-only sequence
script:
- make build
- opam install qcheck qtest
- ./configure --enable-tests
- make test
33 changes: 0 additions & 33 deletions META

This file was deleted.

87 changes: 13 additions & 74 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,79 +1,30 @@
# OASIS_START
# DO NOT EDIT (digest: a3c674b4239234cbbe53afe090018954)

SETUP = ocaml setup.ml
all: build test

build: setup.data
$(SETUP) -build $(BUILDFLAGS)
build:
jbuilder build @install

doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)

test: setup.data build
$(SETUP) -test $(TESTFLAGS)

all:
$(SETUP) -all $(ALLFLAGS)

install: setup.data
$(SETUP) -install $(INSTALLFLAGS)

uninstall: setup.data
$(SETUP) -uninstall $(UNINSTALLFLAGS)

reinstall: setup.data
$(SETUP) -reinstall $(REINSTALLFLAGS)
test:
jbuilder runtest

clean:
$(SETUP) -clean $(CLEANFLAGS)

distclean:
$(SETUP) -distclean $(DISTCLEANFLAGS)

setup.data:
$(SETUP) -configure $(CONFIGUREFLAGS)
jbuilder clean

configure:
$(SETUP) -configure $(CONFIGUREFLAGS)
doc:
jbuilder build @doc

.PHONY: build doc test all install uninstall reinstall clean distclean configure
BENCH_TARGETS=bench_persistent_read.exe bench_persistent.exe

# OASIS_STOP

QTEST_PREAMBLE=''
DONTTEST=src/sequenceLabels.ml
QTESTABLE=$(filter-out $(DONTTEST), \
$(wildcard src/*.ml) \
$(wildcard src/*.mli) \
)

qtest-clean:
@rm -rf qtest/

qtest-gen:
@mkdir -p qtest
@if which qtest > /dev/null ; then \
qtest extract --preamble $(QTEST_PREAMBLE) \
-o qtest/run_qtest.ml \
$(QTESTABLE) 2> /dev/null ; \
else touch qtest/run_qtest.ml ; \
fi
benchs:
jbuilder build $(addprefix bench/, $(BENCH_TARGETS))

examples:
ocamlbuild examples/test_sexpr.native
jbuilder build examples/test_sexpr.exe

push_doc: all doc
scp -r sequence.docdir/* cedeela.fr:~/simon/root/software/sequence/

push_stable: all
git checkout stable
git merge master -m 'merge from master'
oasis setup
git commit -a -m 'oasis files'
git push origin
git checkout master

VERSION=$(shell awk '/^Version:/ {print $$2}' _oasis)
VERSION=$(shell awk '/^version:/ {print $$2}' sequence.opam)

SOURCE=$(addprefix src/, *.ml *.mli invert/*.ml invert/*.mli bigarray/*.ml bigarray/*.mli)

@@ -82,18 +33,6 @@ update_next_tag:
sed -i "s/NEXT_VERSION/$(VERSION)/g" $(SOURCE)
sed -i "s/NEXT_RELEASE/$(VERSION)/g" $(SOURCE)

NAME_VERSION := sequence.$(VERSION)
URL := https://github.com/c-cube/sequence/archive/$(VERSION).tar.gz

release:
git tag -a $(VERSION) -m "Version $(VERSION)."
git push origin $(VERSION)
opam publish prepare $(NAME_VERSION) $(URL)
cp descr $(NAME_VERSION)
echo "submit?"
@read
opam publish submit $(NAME_VERSION)

watch:
while find src/ -print0 | xargs -0 inotifywait -e delete_self -e modify ; do \
echo "============ at `date` ==========" ; \
6 changes: 4 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -13,6 +13,8 @@ way of iterating on a finite number of values, only allocating (most of the time
one intermediate closure to do so. For instance, iterating on keys, or values,
of a `Hashtbl.t`, without creating a list.

image::https://travis-ci.org/c-cube/sequence.svg?branch=master[alt="Build Status", link="https://travis-ci.org/c-cube/sequence"]

toc::[]

== Documentation
@@ -23,13 +25,13 @@ To get an overview of sequence, its origins and why it was created,
you can start with http://cedeela.fr/~simon/talks/sequence.pdf[the slides of a talk]
I (@c-cube) made at some OCaml meeting.

See https://c-cube.github.io/sequence/api/[the online API]
See https://c-cube.github.io/sequence/[the online API]
for more details on the set of available functions.

== Build

1. via opam `opam install sequence`
2. manually (need OCaml >= 3.12): `make all install`
2. manually (need OCaml >= 4.02.0): `make all install`

If you have https://github.com/vincent-hugot/iTeML[qtest] installed,
you can build and run tests with
103 changes: 0 additions & 103 deletions _oasis

This file was deleted.

58 changes: 0 additions & 58 deletions _tags

This file was deleted.

8 changes: 8 additions & 0 deletions bench/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

(executables
((names (bench_persistent_read bench_persistent))
(libraries (sequence benchmark))
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -color always))
(ocamlopt_flags (:standard -O3 -color always
-unbox-closures -unbox-closures-factor 20))
))
Loading

0 comments on commit 7d93f1f

Please sign in to comment.