Skip to content

Commit

Permalink
update sw_test_all
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrek committed Jan 18, 2021
1 parent bb4a2d3 commit a6b1aed
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 8 deletions.
44 changes: 36 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,44 @@ release:
git archive --prefix=$(NAME)/ $(RELEASE) | gzip > $(NAME).tar.gz
gpg -a -b $(NAME).tar.gz

.PHONY: test_all
.PHONY: sw_test_all sw_deps_all

define gen_test =
test_all:: test_$(1)
define gen_sw =
sw_test_all:: sw_test_$(1)
sw_deps_all:: sw_deps_$(1)

.PHONY: test_$(1)
test_$(1):
opam exec --switch=$(1) -- make clean build test > /dev/null
.PHONY: sw_deps_$(1)
sw_deps_$(1):
opam install --switch=$(1) -y --deps-only .

.PHONY: sw_test_$(1)
sw_test_$(1):
-opam exec --switch=$(1) -- make clean build test >/dev/null 2>/dev/null
# expected to fail < 4.03.0
# opam exec --switch=$(1) -- ocaml test/std.ml
ifneq "$(1)" "3.12.1"
ifneq "$(1)" "4.00.1"
ifneq "$(1)" "4.01.0"
ifneq "$(1)" "4.02.3"
-opam exec --switch=$(1) -- ocaml test/std.ml
endif
endif
endif
endif
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))))
$(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.1\
4.07.1\
4.08.0\
4.09.1\
4.10.2\
4.11.1\
4.12.0~beta1\
,$(eval $(call gen_sw,$(version))))
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ Generate and read the documentation.
Release
-------

* Check for changes in stdlib (e.g. with ocaml test/std.ml)
* Update sw_test_all target for new OCaml release
* `make sw_test_all`
* Review `git log` and update CHANGES
* Update version in Makefile
* Commit
Expand Down

0 comments on commit a6b1aed

Please sign in to comment.