Skip to content

Commit

Permalink
Makefile: + test_all target to test against multiple opam switches
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrek committed Apr 24, 2020
1 parent 8d36a91 commit a6f34d8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,17 @@ release:
git tag -a -m $(RELEASE) $(RELEASE)
git archive --prefix=$(NAME)/ $(RELEASE) | gzip > $(NAME).tar.gz
gpg -a -b $(NAME).tar.gz

.PHONY: test_all

define gen_test =
test_all:: test_$(1)

.PHONY: test_$(1)
test_$(1):
opam exec --switch=$(1) -- make clean build test > /dev/null
# expected to fail < 4.03.0
# opam exec --switch=$(1) -- ocaml test/std.ml
endef

$(foreach version,3.12.1 4.00.1 4.01.0 4.02.3 4.03.0 4.04.2 4.05.0 4.06.0 4.06.1 4.07.1 4.08.0 4.09.0 4.10.0,$(eval $(call gen_test,$(version))))

0 comments on commit a6f34d8

Please sign in to comment.