diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..cb9798d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Check the proofs + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Install EasyCrypt dependencies + run: | + sudo apt-get update + sudo apt install -y opam cvc4 pkg-config libgmp-dev libpcre3-dev zlib1g-dev libmpfr-dev libppl-dev autoconf + pip install z3-solver==4.8.7 --break-system-packages + - name: Install EC deps (opam) + run: | + opam init --disable-sandboxing + opam update + opam pin -y alt-ergo 2.4.2 + opam pin -y why3 1.7.0 + opam pin add -y easycrypt https://github.com/EasyCrypt/easycrypt.git#86db790a841b6a182a7efd67d39c86e5bbaceb1a --update-invariant + opam install -y easycrypt jasmin.2022.09.3 --update-invariant + opam install -y alt-ergo + opam install -y why3 + eval $(opam env --switch=default) + - name: Check'em all + run: | + eval $(opam env --switch=default) + cd src/ + bash ../script/checkall \ No newline at end of file diff --git a/justfile b/justfile index 06d2bbe..6a0f9e5 100644 --- a/justfile +++ b/justfile @@ -5,7 +5,7 @@ build: @echo "Building the {{image}}." docker build -t {{image}} . -xhost-docker: +xhost-docker: xhost +local:docker bash: build xhost-docker @@ -26,4 +26,12 @@ emacs: build xhost-docker --mount type=bind,source=$(readlink -f ./src),target={{project_dir}} \ --mount type=bind,source=$(readlink -f ./script),target=/tmp/script \ -it {{image}} \ - -c "cd /tmp/script; bash entrypoint.sh emacs-gtk" \ No newline at end of file + -c "cd /tmp/script; bash entrypoint.sh emacs-gtk" + +test: build + docker run -h {{image}} \ + --net=host \ + --mount type=bind,source=$(readlink -f ./src),target={{project_dir}} \ + --mount type=bind,source=$(readlink -f ./script),target=/tmp/script \ + {{image}} \ + -c "cd /tmp/script; bash test.sh" diff --git a/script/checkall b/script/checkall index 88b1063..4311ff1 100755 --- a/script/checkall +++ b/script/checkall @@ -1,6 +1,6 @@ #!/bin/bash -timeout=20 +timeout=100000 check() { echo checking $1;