Skip to content

Commit

Permalink
CI: check EC extraction of ARM examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vbgl authored and bgregoir committed May 4, 2023
1 parent 9642d9e commit 295860d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ test-extract-to-ec:
- ocaml
script:
- nix-shell --arg inCI true $EXTRA_NIX_ARGUMENTS --run 'easycrypt why3config -why3 $WHY3_CONF'
- nix-shell --arg inCI true $EXTRA_NIX_ARGUMENTS --run 'make -C compiler CHECKCATS=x86-64-extraction check'
- nix-shell --arg inCI true $EXTRA_NIX_ARGUMENTS --run 'make -C compiler CHECKCATS="x86-64-extraction arm-m4-extraction" check'
artifacts:
when: always
paths:
Expand Down
6 changes: 6 additions & 0 deletions compiler/config/tests.config
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ kodirs = tests/fail/**/arm-m4
bin = ./scripts/parse-print-parse
args = arm
okdirs = tests/success/**/arm-m4

[test-arm-m4-extraction]
bin = ./scripts/extract-and-check
args = arm
okdirs = examples/**/arm-m4 tests/success/**/arm-m4
exclude = !tests/success/noextract
12 changes: 10 additions & 2 deletions compiler/scripts/extract-and-check
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ DIR=$(mktemp -d jasminXXXXXX)
EC=${DIR}/jasmin.ec
CT=${DIR}/jasmin_ct.ec

if [ "$1" = "arm" ]
then
shift
ARCH="-arch arm-m4"
else
ARCH="-arch x86-64"
fi

trap "rm -r ${DIR}" EXIT

set -x

$(dirname $0)/../jasminc -oecarray ${DIR} -oec ${EC} "$@"
$(dirname $0)/../jasminc -oecarray ${DIR} -CT -oec ${CT} "$@"
$(dirname $0)/../jasminc ${ARCH} -oecarray ${DIR} -oec ${EC} "$@"
$(dirname $0)/../jasminc ${ARCH} -oecarray ${DIR} -CT -oec ${CT} "$@"

easycrypt ${ECARGS} ${EC}
easycrypt ${ECARGS} ${CT}

0 comments on commit 295860d

Please sign in to comment.