Skip to content

Commit

Permalink
create a script to clone libraries and check them and call it from pi…
Browse files Browse the repository at this point in the history
…peline
  • Loading branch information
Alidra committed Apr 30, 2024
1 parent 0a22cf9 commit f3e8ade
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
eval $(opam env)
#why3 config detect
make tests
- name: cheking libraries ...
run: |
eval $(opam env)
#why3 config detect
make checkLibraries
build_vscode_extension:
strategy:
fail-fast: false
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ doc: bnf
bnf:
$(MAKE) -C doc -f Makefile.bnf

.PHONY: checkLibraries
checkLibraries: lambdapi
@dune exec --only-packages lambdapi -- tests/checkBibs.sh https://github.com/Deducteam/lambdapi-logics.git lambdapi-logics

#### Unit tests and sanity check #############################################

.PHONY: tests
Expand Down
22 changes: 22 additions & 0 deletions tests/checkBibs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

lambdapi='dune exec -- lambdapi check'
TIMEFORMAT="%Es"
out=/tmp/lambdapi.output

checkoutLib() {
git clone $1 $2
}

checkLib() {
for f in $(find $1 -name *.lp)
do
echo lambdapi check $options $f ...
$lambdapi "$f" > $out 2>&1
if test $? -ne 0; then cat $out; exit 1; fi;
done
}

checkoutLib $1 $2
options='-w'
checkLib $2

0 comments on commit f3e8ade

Please sign in to comment.