Skip to content
Snippets Groups Projects
Commit 44bc6b68 authored by erwan's avatar erwan
Browse files

Build: now use a custom bash script to build opam packages

parents f859bb9b 615ffc50
No related branches found
No related tags found
No related merge requests found
#######################################################################################
# Workflow:
# C=make cia ; A=make amend ; U=make uv ; P=make opam-rel
# - to make sure the sha and the version are good, one should never
# do U and then A.
# - to make sure gtit is not confused, one should never do A and the P
#
# therefore, to avoid such problems, legal trace are defined by this automata:
# 0 -C-> 1
# 1 -A-> 1
# 1 -P-> 2
# 2 -U-> 0
# 1 -U-> 0
# to implement such a workflow, C puts a lock (state 1) and U removes it (state 0)
###############################
# typical workflow:
# uv -> cia -> amend* -> push ->
# wait for gitlab release job -> pull (to get the release tag)
# and then; optionnaly, to release an opam version:
# opam-rel
......@@ -78,51 +100,12 @@ amend:
# opam-ing
NAME=lustre-v6
PACKNAME=$(NAME).$(PRE_VERSION)
WWW=/import/www/DIST-TOOLS/SYNCHRONE
HTTP=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE
# for testing opam packages before publishing
WWWTEST=/import/www/DIST-TOOLS/SYNCHRONE/test
HTTPTEST=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/test
OPAM_FILE=$(shell find $(WWW)/opam-repository/packages -name opam | grep lustre | sort | tail -1 | sed -e 's/^./\U&/')
OPAM_FILE_TEST=$(shell find $(WWW)/test/opam-repository/packages -name opam | grep lustre | sort | tail -1 | sed -e 's/^./\U&/')
OPAM_DIR=$(shell dirname $(OPAM_FILE))
OFFICIAL_OPAM_DIR=/home/jahier/local/opam-repository/packages/lustre-v6
$(PACKNAME).tgz:
git archive --prefix=$(PACKNAME)/ -o $(PACKNAME).tgz HEAD
$(WWW)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
cp $^ $@
$(WWWTEST)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
cp $^ $@
opam : $(WWW)/pool/$(PACKNAME).tgz
[ "$(BRANCH)" = "master" ] && ( \
cd $(WWW)/opam-repository/packages && \
oasis2opam $(HTTP)/pool/$(PACKNAME).tgz && \
cp ~/lus2lic/opam $(OPAM_FILE) && \
cd .. ; opam-admin check && opam-admin make -g \
) || echo "*** I won't make an opam package\n*** until you commit something!" && \
echo 'post-messages: ["A more up-to-date version can be obtained from (opam repo add) http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository/ "]' >> $(OPAM_FILE) && \
cp -rf $(OPAM_DIR) $(OFFICIAL_OPAM_DIR)
opam-test : $(WWWTEST)/pool/$(PACKNAME).tgz
[ "$(BRANCH)" = "master" ] && cd $(WWWTEST)/opam-repository/packages && \
oasis2opam $(HTTPTEST)/pool/$(PACKNAME).tgz && \
cp $(OPAM_FILE_TEST) $(PWD)/opam.oasis2opam && \
diff -u $(PWD)/opam.oasis2opam $(PWD)/opam | \
grep -v opam.oasis2opam > $(PWD)/opam.diff &&\
diff $(PWD)/opam.diff $(PWD)/opam.diff.exp && \
cp $(PWD)/opam $(OPAM_FILE_TEST) || \
(echo "The opam file needs some update"; exit 2) && \
cd .. ; opam-admin check && opam-admin make -g
opam-rel :
make-opam-pack $(NAME)
opam-test :
make-opam-pack $(NAME) -test
......
OASISFormat: 0.4
Name: lustre-v6
Version: 6.100.2
Version: 6.100.1
Synopsis: The Lustre V6 Verimag compiler
Description: This package contains:
- lv6: the (current) name of the compiler (and interpreter via -exec)
......
File added
(** Automatically generated from Makefile.version *)
let tool = "lv6"
let str="6.100.2"
let sha="615ffc5"
let str="6.100.1"
let sha="9beabcb"
let branch = "master"
let maintainer = "erwan.jahier@univ-grenoble-alpes.fr"
==> lus2lic0.sum <==
Test run by jahier on Mon Dec 3 11:11:28
Test run by jahier on Tue Jan 29 15:01:26
Native configuration is x86_64-pc-linux-gnu
=== lus2lic0 tests ===
......@@ -66,7 +66,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte
XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
==> lus2lic1.sum <==
Test run by jahier on Mon Dec 3 11:11:29
Test run by jahier on Tue Jan 29 15:01:26
Native configuration is x86_64-pc-linux-gnu
=== lus2lic1 tests ===
......@@ -409,7 +409,7 @@ PASS: sh multipar.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {}
==> lus2lic2.sum <==
Test run by jahier on Mon Dec 3 11:11:54
Test run by jahier on Tue Jan 29 15:01:57
Native configuration is x86_64-pc-linux-gnu
=== lus2lic2 tests ===
......@@ -749,7 +749,7 @@ PASS: sh zzz2.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {}
==> lus2lic3.sum <==
Test run by jahier on Mon Dec 3 11:12:25
Test run by jahier on Tue Jan 29 15:02:29
Native configuration is x86_64-pc-linux-gnu
=== lus2lic3 tests ===
......@@ -1259,7 +1259,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <==
Test run by jahier on Mon Dec 3 11:13:04
Test run by jahier on Tue Jan 29 15:03:08
Native configuration is x86_64-pc-linux-gnu
=== lus2lic4 tests ===
......@@ -1776,14 +1776,14 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
# of unexpected failures 7
===============================
# Total number of failures: 15
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 25 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 30 seconds
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 0 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 31 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 32 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 39 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 17 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 16 seconds
* Ref time:
59.55user 20.27system 1:52.76elapsed 70%CPU (0avgtext+0avgdata 280660maxresident)k
0inputs+143272outputs (0major+11018831minor)pagefaults 0swaps
64.00user 21.71system 1:58.26elapsed 72%CPU (0avgtext+0avgdata 280768maxresident)k
0inputs+143256outputs (0major+11029937minor)pagefaults 0swaps
* Quick time (-j 4):
66.52user 21.59system 0:57.33elapsed 153%CPU (0avgtext+0avgdata 280000maxresident)k
0inputs+137184outputs (0major+10636737minor)pagefaults 0swaps
62.45user 21.00system 1:08.07elapsed 122%CPU (0avgtext+0avgdata 278680maxresident)k
4144inputs+136200outputs (2major+10560155minor)pagefaults 0swaps
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment