From 4882b41cb999ec4053ed611de9a0691b5aec1794 Mon Sep 17 00:00:00 2001 From: EmperorOrokuSaki Date: Wed, 22 May 2024 19:56:16 +0400 Subject: [PATCH 1/2] feat: add the dockerfile for installing dependencies --- Dockerfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..e1495c7c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# Start with an Ubuntu base image +FROM ubuntu:22.04 + +# Install necessary packages +RUN apt-get update && apt-get install -y \ + curl \ + git \ + python3-pip \ + build-essential \ + wget \ + unzip \ + autoconf \ + software-properties-common + +# Install Yices +RUN add-apt-repository ppa:sri-csl/formal-methods +RUN apt-get update +RUN apt-get install yices2 -y + +# Install Foundry +RUN curl -L https://foundry.paradigm.xyz | bash + +# Set up Python and Install Halmos +RUN pip3 install pytest setuptools +RUN pip3 install z3-solver==4.12.2.0 + +# Add your application files +WORKDIR /app +COPY . /app + +# Set the default command for the container +CMD ["bash"] From 1b1f9d720c9b8e182291a84aad7c7c7493ff512a Mon Sep 17 00:00:00 2001 From: EmperorOrokuSaki Date: Wed, 22 May 2024 19:56:43 +0400 Subject: [PATCH 2/2] refactor: update the test-long workflow to use the docker file --- .github/workflows/test-long.yml | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test-long.yml b/.github/workflows/test-long.yml index b624ea7d..be49f495 100644 --- a/.github/workflows/test-long.yml +++ b/.github/workflows/test-long.yml @@ -3,13 +3,13 @@ name: Test long on: push: branches: [main] -# pull_request: -# branches: [main] workflow_dispatch: jobs: test: - runs-on: macos-latest + runs-on: ubuntu-latest # Change to a suitable runner that can run Docker containers + container: + image: ghcr.io/emperororokusaki/halmos:0.1 strategy: fail-fast: false @@ -25,28 +25,5 @@ jobs: with: submodules: recursive - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Install yices - run: | - brew install SRI-CSL/sri-csl/yices2 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install pytest - python -m pip install setuptools - - - name: Install Halmos - run: | - python -m pip install z3-solver==4.12.2.0 - python -m pip install -e . - - name: Run pytest run: pytest -x -v tests/test_halmos.py -k ${{ matrix.testname }} --halmos-options='-v -st --solver-timeout-assertion 0 --solver-threads 6 --solver-command=yices-smt2' -s --log-cli-level=