-
Notifications
You must be signed in to change notification settings - Fork 274
Introduction of Dockerfile for building and running CBMC in a Docker container. #5715
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
public class Test { | ||
public static void main(String[] args) { | ||
System.out.println("Hi"); | ||
assert(1 == 1); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <assert.h> | ||
NlightNFotis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#define return_val 0; | ||
|
||
int main(void) | ||
{ | ||
assert(1 == 1); | ||
return return_val; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM ubuntu:20.04 as builder | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV DEBCONF_NONINTERACTIVE_SEEN true | ||
# Timezone data is needed during the installation of dependencies, | ||
# since cmake depends on the tzdata package. In an interactive terminal, | ||
# the user selects the timezone at installation time. Since this needs | ||
# to be a non-interactive terminal, we need to setup some sort of default. | ||
# The UTC one seemed the most suitable one. | ||
RUN echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \ | ||
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \ | ||
NlightNFotis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y \ | ||
cmake \ | ||
ninja-build \ | ||
gcc \ | ||
g++ \ | ||
maven \ | ||
flex \ | ||
bison \ | ||
libxml2-utils \ | ||
patch | ||
COPY . /tmp/cbmc | ||
WORKDIR /tmp/cbmc | ||
RUN cmake -S . -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ && cd build; ninja -j2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, when it comes to the What do you think about this? |
||
|
||
FROM ubuntu:20.04 as runner | ||
COPY --from=builder /tmp/cbmc/build/bin/* /usr/local/bin/ | ||
NlightNFotis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
RUN apt-get update && apt-get install -y gcc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Might be worth stating in the commit title that this is PR check. Otherwise it might be confused with the release actions when looking through the commit history later. Something like - "Add github action on PRs to check the Dockerfile"
⛏️ The commit title should not end with a full stop. See point "4. Do not end the subject line with a period", here - How to Write a Git Commit Message