Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
thotypous committed Apr 12, 2020
1 parent 9dfe8f5 commit 834e835
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Install dependencies
shell: bash
run: ".github/workflows/install_dependencies_ubuntu.sh"
run: "sudo .github/workflows/install_dependencies_ubuntu.sh"
- name: Build
run: |
make -j2 GHCJOBS=2 GHCRTSFLAGS='+RTS -M5G -A128m -RTS'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install_dependencies_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env bash
sudo apt-get update
apt-get update

# Install the latest version of itcl/itk -- itk3-dev or tk-itk4-dev.
# NB itk depends on itcl, tk and tcl, so no need to install those separately
ITK_DEV_PKG=$(apt-cache search -n '^(tk-)?itk[0-9]-dev' | cut -f1 -d' ' | sort | tail -1)

sudo apt-get install -y \
apt-get install -y \
autoconf \
bison \
build-essential \
Expand Down
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ubuntu:18.04 as build
ADD .github/workflows/install_dependencies_ubuntu.sh /build/
RUN DEBIAN_FRONTEND=noninteractive \
/build/install_dependencies_ubuntu.sh
ADD . /build/
RUN make -C /build -j2 GHCJOBS=2 GHCRTSFLAGS='+RTS -M5G -A128m -RTS'
RUN make -C /build check

FROM ubuntu:18.04
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
build-essential iverilog \
$(apt-cache search -n '^(tk-)?itk[0-9]-dev' | cut -f1 -d' ' | sort | tail -1) \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /build/inst /opt/bluespec/
ENV PATH /opt/bluespec/bin:$PATH

0 comments on commit 834e835

Please sign in to comment.