Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add docker image to the workflow #1

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 3 additions & 26 deletions .github/workflows/test-long.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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=
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
Loading